-
Notifications
You must be signed in to change notification settings - Fork 43
Test that the TypeScript files in our tests actually compile with tsc #56
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
Conversation
@@ -10,7 +10,7 @@ declare module overrides { | |||
toString(): string; | |||
} | |||
|
|||
export class B extends BLike { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ $(npm bin)/tsc samples/*.ts
samples/overrides.d.ts(13,26): error TS2689: Cannot extend an interface 'BLike'. Did you mean 'implements'?
declare const hello: String; | ||
|
||
declare module mod { | ||
import { NestedImport } from "module.js"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ $(npm bin)/tsc samples/*.ts
samples/import.d.ts(14,34): error TS1147: Import declarations in a namespace cannot reference a module.
.gitignore
Outdated
@@ -5,3 +5,5 @@ target/ | |||
.classpath | |||
.project | |||
.settings/ | |||
node_modules | |||
package-lock.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the appropriate slashes so that this does not pick other stuff by mistake:
/node_modules/
/package-lock.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in d6e7ff0
.travis.yml
Outdated
script: sbt ++$TRAVIS_SCALA_VERSION samples/compile test | ||
script: | ||
- sbt ++$TRAVIS_SCALA_VERSION samples/compile test | ||
- $(npm bin)/tsc samples/*.ts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be *.d.ts
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in b4dcd54
.travis.yml
Outdated
- . $HOME/.nvm/nvm.sh | ||
- nvm install stable | ||
- nvm use stable | ||
- npm install typescript |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use fixed versions of Node.js and TypeScript. Something like
nvm use 8
npm install [email protected]
Otherwise the CI might start failing simply because a new version of Node.js or TypeScript is released.
cache: | ||
directories: | ||
- $HOME/.ivy2/cache | ||
- $HOME/.sbt/boot | ||
- node_modules |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this standard practice? Is not dangerous? As in, if a new version of the CI script does not install some package anymore, it would still be in the cached node_modules/
, and would therefore still be available, by accident?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is the standard practice.
Caching Dependencies and Directories - Travis CI
The Travis CI Blog: Speed Up Your Builds: Cache Your Dependencies
But I can understand your concerns as well. Do you want to delete it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK let's keep it that way, then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
Could you just rebase your branch on top of the latest master, and make sure that there are no leftovers .ts
in samples/
? Since I have merged a few PRs since that PR was created, there are new .ts
files in there (e.g., keyof.ts
).
cache: | ||
directories: | ||
- $HOME/.ivy2/cache | ||
- $HOME/.sbt/boot | ||
- node_modules |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK let's keep it that way, then.
… allowed in ambient contexts.
Rebase from master. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks :)
Add tests for
samples/*.d.ts
samples/*.ts
tosamples/*.d.ts
tsc does not recognize
.ts
as a type definition file.