Skip to content

Commit

Permalink
fix(deno):tsc error and deno warnings (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
rivy committed Nov 11, 2022
1 parent 58a9a3c commit d023d7f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class Y18N {
err.message = 'syntax error in ' + languageFile
}

if (err.code === 'ENOENT') localeLookup = {}
if ((err as { code?: string }).code === 'ENOENT') localeLookup = {}
else throw err
}

Expand Down
4 changes: 2 additions & 2 deletions lib/platform-shims/deno.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* global Deno */

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

export default {
fs: {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
"prepare": "npm run compile"
},
"devDependencies": {
"@rollup/plugin-typescript": "^8.5.0",
"@types/node": "^14.6.4",
"@wessberg/rollup-plugin-ts": "^1.3.1",
"c8": "^7.3.0",
"chai": "^4.0.1",
"cross-env": "^7.0.2",
Expand All @@ -52,6 +52,7 @@
"rollup": "^2.26.10",
"standardx": "^7.0.0",
"ts-transform-default-export": "^1.0.2",
"tslib": "^2.4.1",
"typescript": "^4.0.0"
},
"files": [
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ts from '@wessberg/rollup-plugin-ts'
import ts from '@rollup/plugin-typescript'
import transformDefaultExport from 'ts-transform-default-export'

const output = {
Expand Down

0 comments on commit d023d7f

Please sign in to comment.