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

Adds @types/node per #4546 #4547

Merged
merged 2 commits into from Dec 10, 2017

Conversation

Projects
None yet
3 participants
@jamestharpe

jamestharpe commented Dec 9, 2017

What did you implement:

Closes #4546

How did you implement it:

Modified package.json to reference @types/node.

How can we verify it:

Use the template and call npm install:

$ serverless create --template aws-nodejs-typescript && npm install

Todos:

  • Write tests
  • Write documentation
  • Fix linting errors
  • [ x] Make sure code coverage hasn't dropped
  • [ x] Provide verification config / commands / resources
  • [ x] Enable "Allow edits from maintainers" for this PR
  • [ x] Update the messages below

Is this ready for review?: YES
Is it a breaking change?: NO

James Tharpe
@@ -7,6 +7,7 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"devDependencies": {
"@types/node": "^8.0.57",
"serverless-webpack": "^3.0.0",

This comment has been minimized.

@HyperBrain

HyperBrain Dec 10, 2017

Member

@jamestharpe Thanks for the improvement. This is ok from my side. Although it is not in the scope of the changes, could you please also update serverless-webpack to ^4.0.0 to have it current?

This comment has been minimized.

@jamestharpe

jamestharpe Dec 10, 2017

Done. While testing, I got an error related to including "@types/aws-lambda": "0.0.22" in my test project:

ERROR in ~/my-project/node_modules/aws-sdk/lib/config.d.ts
(39,37): error TS2693: 'Promise' only refers to a type, but is being used as a value here.

I rolled back serverless-webpack, tried again, and still got the same error, so I'm not sure it was related. The fix was to include the following in my tsconfig.json compilerOptions value (based on the aws-sdk-js docs):

"lib": [
      "es5",
      "es2015.promise"
    ]

I left it out of this PR, since I don't think it's related, but wanted to document it here just in case. I'd be happy to include it in the PR if you think it wise.

This comment has been minimized.

@horike37

This comment has been minimized.

Member

horike37 commented Dec 10, 2017

Thans @jamestharpe 👍
just merging...

@horike37 horike37 merged commit 13cd6d8 into serverless:master Dec 10, 2017

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 87.962%
Details

@horike37 horike37 added this to the 1.25 milestone Dec 10, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment