Skip to content

[node-static] Add type declaration file - #17141

Merged
minestarks merged 1 commit into
DefinitelyTyped:masterfrom
Morfent:node-static
Jun 15, 2017
Merged

minestarks merged 1 commit into
DefinitelyTyped:masterfrom
Morfent:node-static

Conversation

@Morfent

@Morfent Morfent commented Jun 13, 2017

Copy link
Copy Markdown
Contributor

Please fill in this template.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run npm run lint package-name (or tsc if no tslint.json is present).

Select one of these and delete the others:

If adding a new definition:

  • The package does not provide its own types, and you can not add them.
  • If this is for an NPM package, match the name. If not, do not conflict with the name of an NPM package.
  • Create it with dts-gen --dt, not by basing it on an existing project.
  • tslint.json should be present, and tsconfig.json should have noImplicitAny, noImplicitThis, and strictNullChecks set to true.

@dt-bot

dt-bot commented Jun 13, 2017

Copy link
Copy Markdown
Member

@Morfent
Morfent force-pushed the node-static branch 3 times, most recently from 1095084 to 2e24942 Compare June 13, 2017 05:04
@minestarks
minestarks merged commit eb6d7b7 into DefinitelyTyped:master Jun 15, 2017
@ghost

ghost commented Jun 16, 2017 •

Copy link
Copy Markdown

@Morfent Tests are failing on this -- don't know how that wasn't caught before. mime.lookup takes 2 arguments and the test only provides one. Should mime declare its second argument optional, or should the test be updated?

@Morfent

Morfent commented Jun 16, 2017 •

Copy link
Copy Markdown
Contributor Author

It should be optional, since the second parametre's not mentioned in mime's documentation. It's just a fallback to return in case the mimetype for the file at the path given as the first parametre is unknown, but will still fall back to mime.default_type if the fallback's absent.

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