Skip to content
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 for extension exports #63

Open
aleclarson opened this issue Jul 22, 2022 · 0 comments
Open

TypeScript for extension exports #63

aleclarson opened this issue Jul 22, 2022 · 0 comments

Comments

@aleclarson
Copy link

Something like this:

import { defineExtension } from 'zeplin-types'

export default defineExtension({
  /* methods go here, with types checked by `defineExtension` function */
})

The defineExtension function just returns the object unaltered. This is a common pattern for exports-based type-checking (see Vite for example).

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

No branches or pull requests

1 participant