Skip to content

Commit

Permalink
Fix type errors on TS 3.6, 3.7, build on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
chancancode committed Jun 7, 2020
1 parent 09a8e42 commit 2f0c735
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,17 @@ jobs:
- env: EMBER_TRY_SCENARIO=ember-lts-2.18
- env: EMBER_TRY_SCENARIO=ember-lts-3.4
- env: EMBER_TRY_SCENARIO=ember-lts-3.8
- env: EMBER_TRY_SCENARIO=ember-lts-3.12
- env: EMBER_TRY_SCENARIO=ember-lts-3.16
- env: EMBER_TRY_SCENARIO=ember-release
- env: EMBER_TRY_SCENARIO=ember-beta
- env: EMBER_TRY_SCENARIO=ember-canary
- env: EMBER_TRY_SCENARIO=ember-default-with-jquery
- env: EMBER_TRY_SCENARIO=typescript-3.6
before_script: sed -i 's/@ts-expect-error/@ts-ignore/g' tests/types/**/*.ts
- env: EMBER_TRY_SCENARIO=typescript-3.7
before_script: sed -i 's/@ts-expect-error/@ts-ignore/g' tests/types/**/*.ts
- env: EMBER_TRY_SCENARIO=typescript-3.9

script:
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO
43 changes: 43 additions & 0 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,22 @@ module.exports = async function() {
}
}
},
{
name: 'ember-lts-3.12',
npm: {
devDependencies: {
'ember-source': '~3.12.0'
}
}
},
{
name: 'ember-lts-3.16',
npm: {
devDependencies: {
'ember-source': '~3.16.0'
}
}
},
{
name: 'ember-release',
npm: {
Expand Down Expand Up @@ -131,6 +147,33 @@ module.exports = async function() {
'@ember/jquery': '^0.6.1'
}
}
},
{
name: 'typescript-3.6',
npm: {
devDependencies: {
'typescript': '~3.6.0'
}
},
command: 'tsc'
},
{
name: 'typescript-3.7',
npm: {
devDependencies: {
'typescript': '~3.7.0'
}
},
command: 'tsc'
},
{
name: 'typescript-3.9',
npm: {
devDependencies: {
'typescript': '~3.9.0'
}
},
command: 'tsc'
}
]
};
Expand Down
4 changes: 3 additions & 1 deletion tests/dummy/snippets/ts/yield/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ export function taskFor(task: AnyTaskFunction | AnyAsyncTaskFunction): AnyTask {
return task as any;
}

export type JSON = string | number | boolean | null | JSON[] | { [key: string]: JSON };
export type JSON = string | number | boolean | null | JSONArray | JSONObject;
export interface JSONArray extends Array<JSON> {}
export interface JSONObject extends Record<string, JSON> {}

0 comments on commit 2f0c735

Please sign in to comment.