Skip to content

Commit

Permalink
chore: get rid of non-test usage of Deno global (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
harrysolovay authored Jul 22, 2022
1 parent 1ca5c77 commit 6e7f9b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion _tasks/build_npm_pkg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ await build({
repository: "github:paritytech/parity-scale-codec-ts",
},
shims: {
deno: true,
deno: {
test: true,
},
},
compilerOptions: {
sourceMap: true,
Expand Down
2 changes: 1 addition & 1 deletion constantPattern/codec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function constantPattern<T>(value: T, c: Pick<Codec<T>, "encode"> | Uint8
_staticSize: 0,
_encode(buffer, got) {
if (got !== value) {
throw new Error(`Invalid value; expected ${Deno.inspect(value)}, got ${Deno.inspect(got)}`);
throw new Error(`Invalid value; expected ${value}, got ${got}`);
}
buffer.insertArray(pattern);
},
Expand Down

0 comments on commit 6e7f9b7

Please sign in to comment.