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 www to typescript #1537

Merged
merged 132 commits into from
Feb 12, 2019
Merged

Migrate www to typescript #1537

merged 132 commits into from
Feb 12, 2019

Conversation

li-kai
Copy link
Member

@li-kai li-kai commented Feb 10, 2019

This enables typescript compilation. Right now, tsc --noEmit gives 0 errors!

There are ~980 warnings in strict mode and about ~600 without. I'd like help in fixing these errors 😂

@mods-bot
Copy link

mods-bot commented Feb 11, 2019

Deploy preview for nusmods ready!

Built with commit d23a701

https://deploy-preview-1537--nusmods.netlify.com

@li-kai li-kai changed the title WIP: Migrate www to typescript Migrate www to typescript Feb 12, 2019
www/babel.config.js Outdated Show resolved Hide resolved
@ZhangYiJiang ZhangYiJiang merged commit 02d9abf into master Feb 12, 2019
@ZhangYiJiang ZhangYiJiang deleted the typescript branch February 12, 2019 03:31
Copy link
Member

@taneliang taneliang left a comment

Choose a reason for hiding this comment

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

I'll fix these


When adding a JavaScript package, Flow requires a library definition, or libdef. To try to install one from the [community repository][flow-typed], use the `flow-typed` command. If a community libdef is not available, the same command can also be used to create a stub libdef which you can use immediately in a pinch, or edit to fill in the correct definitions.
When adding a JavaScript package, Flow requires a library definition, or libdef. To try to install one from the [community repository][definitely-typed], install `@types/<package name>`. Make sure the installed libdef's version matches that of the package.
Copy link
Member

Choose a reason for hiding this comment

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

This still refers to Flow

@@ -26,13 +26,16 @@ describe('#createLocalStorageShim', () => {

test('should not throw when setting null/undefined', () => {
const shim = createLocalStorageShim();
// @ts-ignore
Copy link
Member

Choose a reason for hiding this comment

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

What were the errors here?

Copy link
Member

Choose a reason for hiding this comment

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

The storage shim doesn't conform to the Storage interface defined by TS. We should fix that by the way - it should not be doing JSON.stringify in setItem

Copy link
Member

Choose a reason for hiding this comment

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

Ah nice. I'll fix this

Copy link
Member

Choose a reason for hiding this comment

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

Already did lol #1545

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.

5 participants