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

Migrate to typescript 4 #47

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

Termina1
Copy link

@Termina1 Termina1 commented Jun 2, 2022

Found 2 differences:

  1. Nill is now a literal, fixed code to produce the same output
  2. Do not understand why simply concat string with + became "".concat(...), but looks like its identical in terms of behavior

Copy link
Member

@dsagal dsagal left a comment

Choose a reason for hiding this comment

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

Sorry I never got to this sooner, but thank you for the changes. They look good, I only have a couple of very minor cleanup requests.

@@ -12,6 +12,7 @@
"watch": "tsc -w",
"test-only": "mocha 'test/*.ts'",
"test": "npm run build && npm run test-only",
"prepare": "tsc",
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is needed because the built dist directory is included in the package (part of prepack step).

case ts.SyntaxKind.LiteralType: return this._compileLiteralTypeNode(node as ts.LiteralTypeNode);
case ts.SyntaxKind.LiteralType:
let tnode = node as ts.LiteralTypeNode
if (tnode.literal.kind === ts.SyntaxKind.NullKeyword) {
Copy link
Member

Choose a reason for hiding this comment

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

This would be a bit cleaner if moved into _compileLiteralTypeNode helper (where node is already known to have the right type)

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.

None yet

2 participants