mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-06 03:50:18 +02:00
doc(struct): update README
This commit is contained in:
parent
943aa96cab
commit
36d44243cc
25 changed files with 283 additions and 176 deletions
|
@ -48,9 +48,17 @@ export function placeholder<T>(): T {
|
|||
return undefined as unknown as T;
|
||||
}
|
||||
|
||||
// @ts-expect-error @types/node missing `TextEncoder`
|
||||
// This library can't use `@types/node` or `lib: dom`
|
||||
// because they will pollute the global scope
|
||||
// So `TextEncoder` and `TextDecoder` are not available
|
||||
|
||||
// Node.js 8.3 ships `TextEncoder` and `TextDecoder` in `util` module.
|
||||
// But using top level await to load them requires Node.js 14.1.
|
||||
// So there is no point to do that. Let's just assume they exists in global.
|
||||
|
||||
// @ts-expect-error
|
||||
const Utf8Encoder = new TextEncoder();
|
||||
// @ts-expect-error @types/node missing `TextDecoder`
|
||||
// @ts-expect-error
|
||||
const Utf8Decoder = new TextDecoder();
|
||||
|
||||
export function encodeUtf8(input: string): Uint8Array {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue