Skip to content
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.

Migration to TS2.0 #178

Merged
merged 36 commits into from
Aug 12, 2016
Merged

Migration to TS2.0 #178

merged 36 commits into from
Aug 12, 2016

Conversation

agubler
Copy link
Member

@agubler agubler commented Jul 19, 2016

Dependant on dojo/shim#2

  • Upgrade to TS2.0 (beta)
  • Add strictNullChecks
  • Add noImplicitThis

Fixes #147

@kitsonk kitsonk added this to the 2016.07 milestone Jul 19, 2016
@kitsonk kitsonk self-assigned this Jul 19, 2016
@@ -36,7 +36,7 @@ export interface DateProperties {
year: number;
}

const days = [ null, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ];
const days = [ -1, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ];
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should add a comment here overall... because this is an odd array and has no documentation. Would NaN be appropriate here instead of -1?

@@ -115,21 +118,22 @@ export default class UrlSearchParams {
* @param key The key to return the first value for
* @return The first string value for the key
*/
get(key: string): string {
get(key: string): string | undefined {
Copy link
Member

Choose a reason for hiding this comment

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

There are two spaces here... I know, being pedantic.

@kitsonk
Copy link
Member

kitsonk commented Aug 12, 2016

Also for the record, I am currently getting:

src/async/iteration.ts(169,43): error TS2345: Argument of type '(i?: number | undefined) => T | Thenable<T> | undefined' is not assignable to parameter of type '((value?: number | undefined) => T | Thenable<T>) | undefined'.
  Type '(i?: number | undefined) => T | Thenable<T> | undefined' is not assignable to type '(value?: number | undefined) => T | Thenable<T>'.
    Type 'T | Thenable<T> | undefined' is not assignable to type 'T | Thenable<T>'.
      Type 'undefined' is not assignable to type 'T | Thenable<T>'.
src/async/iteration.ts(202,15): error TS2345: Argument of type '(result: { values: T[] | undefined; results: U[] | undefined; } | undefined) => U[] | null | unde...' is not assignable to parameter of type '((value?: { values: T[] | undefined; results: U[] | undefined; } | undefined) => U[] | Thenable<U...'.
  Type '(result: { values: T[] | undefined; results: U[] | undefined; } | undefined) => U[] | null | unde...' is not assignable to type '(value?: { values: T[] | undefined; results: U[] | undefined; } | undefined) => U[] | Thenable<U[]>'.
    Type 'U[] | null | undefined' is not assignable to type 'U[] | Thenable<U[]>'.
      Type 'null' is not assignable to type 'U[] | Thenable<U[]>'.

When doing a grunt on this branch.

@agubler
Copy link
Member Author

agubler commented Aug 12, 2016

@kitsonk if you remove the typings directory it should compile correctly, do you think we should clean the typings dir as part of the dev and dist tasks?

@kitsonk
Copy link
Member

kitsonk commented Aug 12, 2016

Ah, ok, but as far as cleaning typings, see dojo/grunt-dojo2#4 which has been open for a while, because it isn't the first time it has happened... 😭

@kitsonk
Copy link
Member

kitsonk commented Aug 12, 2016

👍

@agubler
Copy link
Member Author

agubler commented Aug 12, 2016

There are some test failure, fixing.

@agubler
Copy link
Member Author

agubler commented Aug 12, 2016

Unit tests failures fixed.

@agubler agubler merged commit 679e24f into dojo:master Aug 12, 2016
@agubler agubler deleted the feature-TS2.0 branch August 12, 2016 13:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants