Skip to content

Commit

Permalink
Update on "[compiler] Validate type configs for hooks/non-hooks"
Browse files Browse the repository at this point in the history
Alternative to #30868. The goal is to ensure that the types coming out of moduleTypeProvider are valid wrt to hook typing. If something is named like a hook, then it must be typed as a hook (or don't type it).

[ghstack-poisoned]
  • Loading branch information
josephsavona committed Sep 5, 2024
1 parent 6e4115a commit 7a6efb2
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,13 @@ export type BuiltInTypeConfig =
| 'Ref'
| 'Array'
| 'Primitive'
| 'MixedReadonly'
| 'JSX';
| 'MixedReadonly';
export const BuiltInTypeSchema: z.ZodType<BuiltInTypeConfig> = z.union([
z.literal('Any'),
z.literal('Ref'),
z.literal('Array'),
z.literal('Primitive'),
z.literal('MixedReadonly'),
z.literal('JSX'),
]);

export type TypeReferenceConfig = {
Expand Down

0 comments on commit 7a6efb2

Please sign in to comment.