-
Notifications
You must be signed in to change notification settings - Fork 77
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
TypeScript definitions for config & lifecycles #311
Conversation
}; | ||
|
||
type HttpsSettings = | ||
& CustomHttpsSettings |
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.
Should there be something before the &
or is this a typescript syntax that I'm not familiar with?
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.
It's something TypeScript supports. |
as well. It's just a syntax thing that lets you do a list of unions/intersections in a nicer-looking way.
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, that's fine. I'm just surprised that a leading &
is allowed. I'd have expected something more like:
type HttpsSettings =
CustomHttpsSettings &
Omit<
SecureContextOptions,
keyof CustomHttpsSettings | 'secureProtocol' | 'secureOptions'
>;
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.
Perhaps we can lint on code styles here (see comment).
@@ -33,13 +34,16 @@ | |||
}, | |||
"homepage": "https://github.com/godaddy/gasket/tree/master/packages/gasket-plugin-service-worker#readme", | |||
"dependencies": { | |||
"@types/lru-cache": "^5.1.1", | |||
"@types/uglify-js": "^3.13.1", | |||
"deepmerge": "^4.2.2", | |||
"lru-cache": "^5.1.1", | |||
"mkdirp": "^0.5.1", | |||
"uglify-js": "^3.5.3", |
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.
Not really related to this PR, but @kinetifex -- should this move to terser
?
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.
It should be updated, but we'll probably go with swc modification.
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.
Very cool and thorough @jpage-godaddy! There are some lifecycles that are executed from the @gasket/cli
package that were missed. Also, what are you thinking for the non-plugin packages? - Not going to block on those for the PR, but it'd be good to have follow-up tickets/issues so we do not lose track.
The only thing blocking really is just marking the test package as private. Besides that, some possible lint cleanup, and what are your thoughts on a follow-up to include .ts
type files with our linting rules?
c259614
to
afa4ba7
Compare
afa4ba7
to
686c32a
Compare
Thanks. Added those.
It can be much the same, just adding to a
Fixed.
If eslint supports that sure! I'd think we'd have to switch to |
686c32a
to
75283cb
Compare
- Create types for the core gasket engine - Create core interfaces which plugins can extend - Add config & lifecycle typings for all plugins - Add unit tests to check that type validation works - Get everything on the same jest version - Fix `@gasket/redux` test
75283cb
to
613945e
Compare
Summary
Changelog
TBD