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

Bypass TS6133 error by allowing function declarations that are unused #323

Merged
merged 1 commit into from
Nov 29, 2017

Conversation

OmarDarwish
Copy link

With the release of TypeScript 2.6.1, we now have the option to suppress errors in .ts files using '// @ts-ignore' comments.

Fixes #322

"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.4.2.tgz",
"integrity": "sha1-+DlfhdRZJ2BnyYiqQYN6j4KHCEQ=",
"version": "2.6.1",
"resolved": "http://artifactory.es.ad.adp.com:8081/artifactory/api/npm/ohcm-npms/typescript/-/typescript-2.6.1.tgz",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pointing to an internal registry

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved. Thanks!

@OmarDarwish OmarDarwish force-pushed the bugfix/allow-unused-ts-functions branch from ae51c05 to b2888cf Compare November 1, 2017 20:45
@OmarDarwish
Copy link
Author

Here's a benchmark run and test suites for these changes:

bash-3.2$ npm run benchmark && npm test
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info lifecycle [email protected]~prebenchmark: [email protected]
npm info lifecycle [email protected]~benchmark: [email protected]

> [email protected] benchmark /Users/darwisho/code/nearley
> benchr test/benchmark.js

• test/benchmark.js:

  • calculator.

    ✔  nearley  13,480.40  ops/sec  ±0.88%  (87 runs)

  • json.

    ✔  nearley  110.40  ops/sec  ±4.29%  (73 runs)

  • tosh.

    ✔  nearley  2,179.87  ops/sec  ±0.89%  (87 runs)

npm info lifecycle [email protected]~postbenchmark: [email protected]
npm info ok
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info lifecycle [email protected]~pretest: [email protected]
npm info lifecycle [email protected]~test: [email protected]

> [email protected] test /Users/darwisho/code/nearley
> mocha test/*.test.js



  Linter
    ✓ runs without warnings on empty rules
    ✓ warns about undefined symbol
    ✓ doesn't warn about defined symbol
    ✓ doesn't warn about duplicate symbol

  bin/nearleyc
    ✓ builds for ES5 (295ms)
    ✓ builds for ES6+ (1566ms)
    ✓ builds for CoffeeScript (614ms)
    ✓ builds for TypeScript (1854ms)
    ✓ builds modules in folders (297ms)
    ✓ builds modules with multiple includes of the same file (289ms)
    ✓ warns about undefined symbol (295ms)
    ✓ doesn't warn when used with the --quiet option (283ms)

  nearleyc: example grammars
    ✓ calculator example
    ✓ csscolor example
    ✓ exponential whitespace bug
    ✓ percent bug
    ✓ json
    ✓ classic crontab (54ms)
    ✓ case-insensitive strings

  nearleyc: builtins
    ✓ generate includes id
    - nuller

  nearleyc: macros
    ✓ seems to work
    ✓ must be defined before use
    ✓ compiles a simple macro from external file

  Parser: API
    ✓ shows line number in errors
    ✓ shows token index in errors
    ✓ can save state
    ✓ can rewind
    ✓ won't rewind without `keepHistory` option
    ✓ restores line numbers
    ✓ restores column number

  Parser: examples
    ✓ nullable whitespace bug
    ✓ parentheses
    ✓ tokens
    ✓ json
    ✓ tosh (227ms)


  35 passing (6s)
  1 pending

npm info lifecycle [email protected]~posttest: [email protected]
npm info ok

@tjvr
Copy link
Collaborator

tjvr commented Nov 29, 2017

Looks good, thank you :)

@tjvr tjvr merged commit 3776752 into kach:master Nov 29, 2017
@OmarDarwish OmarDarwish deleted the bugfix/allow-unused-ts-functions branch November 29, 2017 15:10
@OmarDarwish
Copy link
Author

Thanks @tjvr. What's the npm release cadence for Nearley?

@tjvr
Copy link
Collaborator

tjvr commented Nov 29, 2017

Um, whenever someone bugs me to do a release, I suppose? :)

@OmarDarwish
Copy link
Author

@tjvr I am officially bugging you to do a release 😁

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

Successfully merging this pull request may close these issues.

3 participants