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

Add typescript build test #21

Merged
merged 5 commits into from
May 30, 2018

Conversation

stifflerus
Copy link
Contributor

@stifflerus stifflerus commented May 29, 2018

Changed npm script so that typescript compiler generates declaration files. This causes the build to fail for classes and interfaces that are not properly exported.

Added an export to the typescript template code that was missed by previous fix.

Changed the tslint script to exclude declaration files.

@stifflerus stifflerus changed the title [WIP] Add typescript build test Add typescript build test May 29, 2018
Copy link
Contributor

@zewa666 zewa666 left a comment

Choose a reason for hiding this comment

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

on line 955 there is the ICached interface. Should that be exported as well?

package.json Outdated
"compile:samples": "tsc output/arithmetics.ts output/css.ts output/json.ts output/javascript.ts output/st.ts output/arithmetics-typed.ts",
"lint:samples": "tslint output/*.ts",
"compile:samples": "tsc --declaration output/arithmetics.ts output/css.ts output/json.ts output/javascript.ts output/st.ts output/arithmetics-typed.ts",
"lint:samples": "tslint `find output -not -iname *.d.ts -iname *.ts`",
Copy link
Contributor

Choose a reason for hiding this comment

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

instead of this we could add the following to the tslint.json file, which is supported since v5.8

"linterOptions": {
      "exclude": [
          "output/*d.ts"
      ]
  }

@@ -923,7 +923,7 @@ function generateTS(ast, options) {

if (options.trace) {
parts.push([
"interface ITraceEvent {",
"export interface ITraceEvent {",
Copy link
Contributor

Choose a reason for hiding this comment

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

good catch

@stifflerus
Copy link
Contributor Author

@zewa666 Yes that is a good catch. That interface is produced conditionally if caching is enabled. It would seem none of the current tests exercise that option.

@pjmolina
Copy link
Contributor

Thank you guys! Merged!

@pjmolina pjmolina closed this May 30, 2018
@pjmolina pjmolina reopened this May 30, 2018
@pjmolina pjmolina merged commit 6464c7b into metadevpro:master May 30, 2018
@stifflerus stifflerus deleted the add-typescript-build-test branch May 30, 2018 14:14
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