Skip to content

Commit d023d7f

Browse files
authored
fix(deno):tsc error and deno warnings (#147)
1 parent 58a9a3c commit d023d7f

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

lib/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ class Y18N {
194194
err.message = 'syntax error in ' + languageFile
195195
}
196196

197-
if (err.code === 'ENOENT') localeLookup = {}
197+
if ((err as { code?: string }).code === 'ENOENT') localeLookup = {}
198198
else throw err
199199
}
200200

lib/platform-shims/deno.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* global Deno */
22

3-
import { posix } from 'https://deno.land/std/path/mod.ts'
4-
import { sprintf } from 'https://deno.land/std/fmt/printf.ts'
3+
import { posix } from 'https://deno.land/std@0.159.0/path/mod.ts'
4+
import { sprintf } from 'https://deno.land/std@0.159.0/fmt/printf.ts'
55

66
export default {
77
fs: {

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
"prepare": "npm run compile"
4242
},
4343
"devDependencies": {
44+
"@rollup/plugin-typescript": "^8.5.0",
4445
"@types/node": "^14.6.4",
45-
"@wessberg/rollup-plugin-ts": "^1.3.1",
4646
"c8": "^7.3.0",
4747
"chai": "^4.0.1",
4848
"cross-env": "^7.0.2",
@@ -52,6 +52,7 @@
5252
"rollup": "^2.26.10",
5353
"standardx": "^7.0.0",
5454
"ts-transform-default-export": "^1.0.2",
55+
"tslib": "^2.4.1",
5556
"typescript": "^4.0.0"
5657
},
5758
"files": [

rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import ts from '@wessberg/rollup-plugin-ts'
1+
import ts from '@rollup/plugin-typescript'
22
import transformDefaultExport from 'ts-transform-default-export'
33

44
const output = {

0 commit comments

Comments
 (0)