TextEncoder/TextDecoder not yet available
- Dominant language
- Rust
- Stars
- 1.3k
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Description
First of all, thank you for the great work behind DNT and Deno itself!
`TextDecoder` and `TextEncoder` cannot be used yet to compile to NPM modules. I know it is expected, just adding for reference.
Source:
```ts
const hexDecode = (s: string) => new TextEncoder().encode(s);
console.log(hexDecode("1234"));
```
Build output:
```
[dnt] Building project...
[dnt] Type checking...
src/mod.ts:9:38 - error TS2304: Cannot find name 'TextEncoder'.
9 const hexDecode = (s: string) => new TextEncoder().encode(s);
~~~~~~~~~~~
error: Uncaught (in promise) Error: Had 1 diagnostics.
throw new Error(`Had ${diagnostics.length} diagnostics.`);
^
at build (https://deno.land/x/dnt@0.27.0/mod.ts:299:15)
```
Thank you!
Contributor guide
Assessment
This issue has not been assessed yet.