Skip to content

Introduce Typescript - #137

Closed
grant wants to merge 4 commits into
cloudevents:masterfrom
grant:typescript
Closed

grant wants to merge 4 commits into
cloudevents:masterfrom
grant:typescript

Conversation

@grant

@grant grant commented May 7, 2020

Copy link
Copy Markdown
Member

This PR introduces TypeScript to this repo. This is the first step to fix the top-voted issue, #9.

  • It includes a minimal setup for TypeScript.
  • It does not introduce any features.
  • It does not change any syntax you're used to, only renaming a file from js to ts

It does require running npm run watch to incrementally build or npm run build to build once. - For development, it's common to just run npm run watch in one tab.

  • For publishing, it's common to run npm run build one time before publishing.

We can't really see benefits right now, but features such as autocompletion, refactoring, automatic type annotation would come for free.

grant added 3 commits May 7, 2020 16:31
Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>
Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>
Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>
@grant
grant requested a review from lance May 7, 2020 23:42
@grant grant self-assigned this May 7, 2020
@grant grant mentioned this pull request May 7, 2020
Comment thread package.json Resolved
Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>

@lance lance left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would like to propose an alternative, as a stepping stone on a potential path to full TS support in #155

@grant

grant commented May 15, 2020

Copy link
Copy Markdown
Member Author

Closed in favor of #155.

@grant grant closed this May 15, 2020
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