typecheck.macro
typecheck.macro copied to clipboard
Support typeof tuple[number] pattern
// Use this to get an iterable of possible values.
const namingConvention = ['snake_case', 'camelCase'] as const;
type NamingConvention = typeof namingConvention[number];
registerType('NamingConvention');
export const isValidNamingConvention = createValidator<NamingConvention>();
got error:
Unexpected error because TSIndexedAccessType was not expected. Please report this to the developer.