-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
Shared TS types & enhancement #101
Labels
Comments
Planned to publish it to npm Explicit exported module/namespace: import type { InitFn } from '@pengu.lol/types'
export const init: InitFn = ctx => { /*...*/ } Global implicit, like vite/client does: /// <reference types="pengu/global" /> Or using "typeRoots": ["pengu/global"] |
nomi-san
added
enhancement
New feature or request
idea
Suggest or ideas for new features
labels
Dec 28, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Idea
I need types for life cycle hooks (entry points) like
init
orload
. As far as I know there're two ways to get typesafety with typescript:'pengu-loader'
. In this case the package should be published on npmjs orExplicit
Exported interfaces from
'pengu-loader'
Interfaces that can be exported from
'pengu-loader'
, tooUsage
Implicit
At this point we need some dev server running in the background that generates interfaces silently. I think about vite.
Usage
Obviously the first option is way simpler than the second one.
It'd be great to get some feedback, whether that fits the philosophy etc. or not.
The text was updated successfully, but these errors were encountered: