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

Typescript 2.6.1 Compilation Errors #64

Closed
thejohnhoffer opened this issue Nov 9, 2017 · 0 comments
Closed

Typescript 2.6.1 Compilation Errors #64

thejohnhoffer opened this issue Nov 9, 2017 · 0 comments

Comments

@thejohnhoffer
Copy link
Contributor

thejohnhoffer commented Nov 9, 2017

If I checkout master today into an empty directory and run npm i from npm v5.0.3 for node v8.0.0, I've installed all the packages in the this package-lock.json, which includes typescript v2.6.1.

When I try to run npm run dev-server as usual, typescript highlights an unused variable:

    ERROR in ./src/neuroglancer/chunk_manager/backend.ts
    [tsl] ERROR in /Users/John/2017/fall/neuroglancer/src/neuroglancer/chunk_manager/backend.ts(586,9)
          TS6133: 'visibleChunksChanged' is declared but its value is never read.

as well as a couple technical edge cases:

    ERROR in ./src/neuroglancer/util/google_oauth2.ts
    [tsl] ERROR in /Users/John/2017/fall/neuroglancer/src/neuroglancer/util/google_oauth2.ts(254,9)
          TS2531: Object is possibly 'null'.

    ERROR in ./src/neuroglancer/webgl/shader.ts
    [tsl] ERROR in /Users/John/2017/fall/neuroglancer/src/neuroglancer/webgl/shader.ts(109,9)
          TS2531: Object is possibly 'null'.

    ERROR in ./src/neuroglancer/chunk_manager/frontend.ts
    [tsl] ERROR in /Users/John/2017/fall/neuroglancer/src/neuroglancer/chunk_manager/frontend.ts(222,5)
          TS2322: Type 'RefCounted' is not assignable to type 'T'.

A quick fix

Anyway, I just took the simplest possible steps to fix these errors in this pull request.

A side note

Before or after the changes, here is a potentially relevant warning that I ignore on every build:

ts-loader: Using /Users/John/2017/fall/neuroglancer/config/typescript_compiler_shim.js@2.6.1. This version may or may not be compatible with ts-loader.
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