chore: add js-doc (#275)

This commit is contained in:
doprz
2024-10-07 23:06:35 -05:00
committed by GitHub
parent 668c8d0075
commit b3632c0196
7 changed files with 22 additions and 5 deletions

View File

@@ -12,6 +12,9 @@ const MIMEType = {
ANY: '*/*',
} as const satisfies Record<string, string>;
/**
* Represents a key of the MIMEType object
*/
export type MIMETypeKey = keyof typeof MIMEType;
export default MIMEType;

View File

@@ -52,11 +52,15 @@ type NestedKeys<T> = {
export type ThemeColor = NestedKeys<typeof colors>;
/**
* Represents a Tailwind colorway: a colorway is a key in the theme.colors object that has an object as its value.
* Represents a Tailwind colorway: a colorway is a key in the theme.colors object that has an object as its value
*/
export type TWColorway = {
[K in keyof typeof theme.colors]: (typeof theme.colors)[K] extends Record<string, unknown> ? K : never;
}[keyof typeof theme.colors];
/**
* Represents the index type for accessing the theme colors based on the specified TWColorway
*/
export type TWIndex = keyof (typeof theme.colors)[TWColorway];
/**