Skip to content

@link JSDoc annotation cause to fatal error #1058

@Toliak

Description

@Toliak

Description
I have updated TypeScriptToLua from 0.39.3 to the latest, 0.41.0, and received an error:

error TS2304: Cannot find name 'https'

However, I use https only in my JSDoc comment.
I have prepared the simple example to reproduce the error.

Code

/**
 * @see {@link https://toliak.ru/ SomeWebsite }
 */
function helloWorld() {
    return 'Hello World';
}

Also those lines cause to error:

  • * @see a a a a {@link https://toliak.ru/ SomeWebsite }
  • * @asdadasd {@link https://toliak.ru/ SomeWebsite }
  • * @asdadasd a a a {@link https://toliak.ru/ SomeWebsite }

And those lines works fine:

  • * aboba {@link https://toliak.ru/ SomeWebsite }
  • * {@link https://toliak.ru/ SomeWebsite }

I think that is a bug, because I use https in the comment and there is no rules, that prohibit me from using link here.

My environment version info:

NPM version

{
  p_20210801: '1.0.0',
  npm: '6.14.10',
  ares: '1.16.1',
  brotli: '1.0.9',
  cldr: '37.0',
  icu: '67.1',
  llhttp: '2.1.3',
  modules: '83',
  napi: '7',
  nghttp2: '1.41.0',
  node: '14.15.4',
  openssl: '1.1.1i',
  tz: '2020a',
  unicode: '13.0',
  uv: '1.40.0',
  v8: '8.4.371.19-node.17',
  zlib: '1.2.11'
}

NPM Packages

+-- typescript@4.3.5
`-- typescript-to-lua@0.41.0
  +-- enhanced-resolve@5.8.2
  | +-- graceful-fs@4.2.6
  | `-- tapable@2.2.0
  +-- resolve@1.20.0
  | +-- is-core-module@2.5.0
  | | `-- has@1.0.3
  | |   `-- function-bind@1.1.1
  | `-- path-parse@1.0.7
  +-- source-map@0.7.3
  `-- typescript@4.3.5 deduped

What about tsc
It works correctly

> tsc -b --verbose

[6:34:37 PM] Projects in this build:
    * tsconfig.json

[6:34:37 PM] Project 'tsconfig.json' is out of date because output file 'index.js' does not exist

[6:34:37 PM] Building project 'C:/Users/Toliak/WebstormProjects/p_20210801/tsconfig.json'...

Process finished with exit code 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions