Skip to content

Commit

Permalink
feat: mark api shape as generic const type
Browse files Browse the repository at this point in the history
downside - marked as readonly const object
  • Loading branch information
lostrepo committed May 5, 2024
1 parent c7afb67 commit 2d089da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/@typify/typify.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ type LibApiItem = { nofast: boolean; declare_only: boolean; } | {
type LibApi = Record<string, LibApiItem>;

// TODO: add lib_exports_typed to get types for lib exports
export const lib_api_typed: (api: LibApi) => LibApi;
export const lib_api_typed: <const T extends LibApi>(api: T) => T;

0 comments on commit 2d089da

Please sign in to comment.