Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix typo
  • Loading branch information
dontwanttothink committed May 16, 2025
commit ed6539c677a1e3daf19c53a4dec6b4bb3c4a9f5f
2 changes: 1 addition & 1 deletion src/compiler/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1914,7 +1914,7 @@ export const getScriptTargetFeatures: () => ScriptTargetFeatures = /* @__PURE__
"cause",
],
})),
Uint8Constructor: new Map(Object.entries({
Uint8ArrayConstructor: new Map(Object.entries({
esnext: [
"fromBase64",
"fromHex",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
toFromHexBase64.ts(1,25): error TS2339: Property 'fromBase64' does not exist on type 'Uint8ArrayConstructor'.
toFromHexBase64.ts(2,25): error TS2339: Property 'fromBase64' does not exist on type 'Uint8ArrayConstructor'.
toFromHexBase64.ts(3,25): error TS2339: Property 'fromHex' does not exist on type 'Uint8ArrayConstructor'.
toFromHexBase64.ts(1,25): error TS2550: Property 'fromBase64' does not exist on type 'Uint8ArrayConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'esnext' or later.
toFromHexBase64.ts(2,25): error TS2550: Property 'fromBase64' does not exist on type 'Uint8ArrayConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'esnext' or later.
toFromHexBase64.ts(3,25): error TS2550: Property 'fromHex' does not exist on type 'Uint8ArrayConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'esnext' or later.
toFromHexBase64.ts(12,20): error TS2550: Property 'setFromBase64' does not exist on type 'Uint8Array<ArrayBuffer>'. Do you need to change your target library? Try changing the 'lib' compiler option to 'esnext' or later.
toFromHexBase64.ts(13,20): error TS2550: Property 'setFromBase64' does not exist on type 'Uint8Array<ArrayBuffer>'. Do you need to change your target library? Try changing the 'lib' compiler option to 'esnext' or later.
toFromHexBase64.ts(14,20): error TS2550: Property 'setFromBase64' does not exist on type 'Uint8Array<ArrayBuffer>'. Do you need to change your target library? Try changing the 'lib' compiler option to 'esnext' or later.
Expand All @@ -10,13 +10,13 @@ toFromHexBase64.ts(20,20): error TS2550: Property 'setFromHex' does not exist on
==== toFromHexBase64.ts (7 errors) ====
const arr1 = Uint8Array.fromBase64("AAAAAA==");
~~~~~~~~~~
!!! error TS2339: Property 'fromBase64' does not exist on type 'Uint8ArrayConstructor'.
!!! error TS2550: Property 'fromBase64' does not exist on type 'Uint8ArrayConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'esnext' or later.
const arr2 = Uint8Array.fromBase64("AAAAAA", { alphabet: "base64url" });
~~~~~~~~~~
!!! error TS2339: Property 'fromBase64' does not exist on type 'Uint8ArrayConstructor'.
!!! error TS2550: Property 'fromBase64' does not exist on type 'Uint8ArrayConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'esnext' or later.
const arr3 = Uint8Array.fromHex("000000");
~~~~~~~
!!! error TS2339: Property 'fromHex' does not exist on type 'Uint8ArrayConstructor'.
!!! error TS2550: Property 'fromHex' does not exist on type 'Uint8ArrayConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'esnext' or later.

const encodedBase64_1 = arr1.toBase64();
const encodedBase64_2 = arr1.toBase64({ alphabet: "base64" });
Expand Down