Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Use UnderlyingType for *Type exports #28

Closed
bengreenier opened this issue Jan 6, 2022 · 0 comments · Fixed by #31
Closed

Use UnderlyingType for *Type exports #28

bengreenier opened this issue Jan 6, 2022 · 0 comments · Fixed by #31
Assignees
Labels
enhancement New feature or request

Comments

@bengreenier
Copy link
Contributor

There is still some inconsistency between what a *Def stores, and what a *Type represents. To avoid this, it's probably better to use UnderlyingType from ref-napi rather than generating it ourselves. E.g:

type MyStructType = UnderlyingType<typeof MyStructDef>;

instead of

type MyStructType = StructObject<MyStruct>;

since the TS typing and the coerced ref-napi NamedType may not align exactly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant