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
helmet: Add featurePolicy #39673
helmet: Add featurePolicy #39673
Conversation
feture-policy provides TS typings with it, but it doesn't export the interface for the options parameter. We could have used conditional typings and infered the type of the parameter, but that would have restricted the minimum TS version to 2.8, so instead I created the interface definition here. Resolves DefinitelyTyped#37627
@tomi Thank you for submitting this PR!
If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead. |
Let’s review the numbers, shall we? Comparison details
|
master | #39673 | diff | |
---|---|---|---|
Batch compilation | |||
Memory usage (MiB) | 69.3 | 65.6 | -5.4% |
Type count | 9218 | 9228 | 0% |
Assignability cache size | 1057 | 1062 | 0% |
Language service | |||
Samples taken | 323 | 342 | +6% |
Identifiers in tests | 323 | 342 | +6% |
getCompletionsAtPosition |
|||
Mean duration (ms) | 380.1 | 382.9 | +0.7% |
Mean CV | 12.0% | 11.9% | |
Worst duration (ms) | 462.6 | 497.8 | +7.6% |
Worst identifier | setTo | helmet | |
getQuickInfoAtPosition |
|||
Mean duration (ms) | 396.1 | 397.2 | +0.3% |
Mean CV | 12.9% | 12.6% | -2.1% |
Worst duration (ms) | 487.8 | 521.5 | +6.9% |
Worst identifier | hpkpTest | maxAge |
It looks like nothing changed too much. I won’t post performance data again unless it gets worse.
I don't exactly understand why we can't use the built-in types from the feature-policy
module, but I trust that it's the case. Looks good to me.
A definition owner has approved this PR |
I just published |
feture-policy provides TS typings with it, but it doesn't export the
interface for the options parameter. We could have used conditional
typings and infered the type of the parameter, but that would have
restricted the minimum TS version to 2.8, so instead I created the
interface definition here.
Resolves #37627
Please fill in this template.
npm test
.)npm run lint package-name
(ortsc
if notslint.json
is present).Select one of these and delete the others:
If changing an existing definition:
tslint.json
containing{ "extends": "dtslint/dt.json" }
. If for reason the any rule need to be disabled, disable it for that line using// tslint:disable-next-line [ruleName]
and not for whole package so that the need for disabling can be reviewed.