Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests failing with typescript >=2.2 #4

Open
jnordberg opened this issue May 20, 2017 · 1 comment
Open

Tests failing with typescript >=2.2 #4

jnordberg opened this issue May 20, 2017 · 1 comment

Comments

@jnordberg
Copy link

$ ./test/test.js
tsc /Users/jnordberg/Development/wasm-util/test/build_factorial_test.ts -> /Users/jnordberg/Development/wasm-util/test/build/build_factorial_test.js
run build
script.runInNewContext("/Users/jnordberg/Development/wasm-util/test/build_test.js") ENTER
script.runInNewContext("/Users/jnordberg/Development/wasm-util/test/build_test.js") EXIT
run mem_align_checks
script.runInNewContext("/Users/jnordberg/Development/wasm-util/test/mem_align_checks_test.js") ENTER
script.runInNewContext("/Users/jnordberg/Development/wasm-util/test/mem_align_checks_test.js") EXIT
pass mem_align_checks
pass build
run build_factorial
script.runInNewContext("/Users/jnordberg/Development/wasm-util/test/build_factorial_test.ts") ENTER
FAIL build_factorial:
ReferenceError: exports is not defined
    at /Users/jnordberg/Development/wasm-util/test/build_factorial_test.ts:2:23
    at ContextifyScript.Script.runInContext (vm.js:32:29)
    at ContextifyScript.Script.runInNewContext (vm.js:38:15)
    at Promise (/Users/jnordberg/Development/wasm-util/test/test.js:135:14)
    at runJSTestInSandbox (/Users/jnordberg/Development/wasm-util/test/test.js:91:10)
    at catch.then.source (/Users/jnordberg/Development/wasm-util/test/test.js:239:5)
aborted by error

Works fine if I pin the ts version to 2.1

@thiloplanz
Copy link

Similar problem, when updating to Typescript 2.5, there is a compile error.

src/utf8.ts(60,11): error TS2345: Argument of type 'ArrayBuffer | SharedArrayBuffer' is not assignable to parameter of type 'ArrayBuffer'.
  Type 'SharedArrayBuffer' is not assignable to type 'ArrayBuffer'.
    Types of property 'slice' are incompatible.
      Type '(begin: number, end?: number) => SharedArrayBuffer' is not assignable to type '(begin: number, end?: number) => ArrayBuffer'.
        Type 'SharedArrayBuffer' is not assignable to type 'ArrayBuffer'.

This can also be avoided by pinning to an older version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants