GitHub Documentation Patreon donate button

Typescript error with



  • I am trying to compile the colyseus-examples project to javascript. For some reason I get this typescript compilation error from the colyseus package:

    C:\projects\colyseus-examples>tsc --version
    Version 3.5.3

    C:\projects\colyseus-examples>npm run tsc

    colyseus-examples@1.0.0 tsc C:\projects\colyseus-examples
    tsc

    node_modules/colyseus/lib/MatchMaker.d.ts:12:45 - error TS8020: JSDoc types can only be used inside documentation comments.

    12 declare type RemoteRoomResponse<T = any> = [string?, T?];
    ~~~~~~~

    node_modules/colyseus/lib/MatchMaker.d.ts:12:54 - error TS8020: JSDoc types can only be used inside documentation comments.

    12 declare type RemoteRoomResponse<T = any> = [string?, T?];
    ~~

    npm ERR! code ELIFECYCLE
    npm ERR! errno 2
    npm ERR! colyseus-examples@1.0.0 tsc: tsc
    npm ERR! Exit status 2
    npm ERR!
    npm ERR! Failed at the colyseus-examples@1.0.0 tsc script.

    What could be the issue here?

    To perform the compilation to javascript, I added tsc command to the colyseus-examples' package.json file under scripts:
    "scripts": {
    "tsc": "tsc",
    "start": "nodemon --watch '*/.ts' --exec ts-node index.ts",
    "heroku-postbuild": "npm run build"
    },


 

GitHub Documentation Patreon donate button

© 2019 Endel Dreyer