You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update on "[compiler] Validate type configs for hooks/non-hooks"
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]
reason: `Invalid moduleTypeProvider result for module '${moduleName}', expected type for '${moduleOrPropertyName}' to be a hook based on its name, but the type was not a hook`,
reason: `Invalid moduleTypeProvider result for module '${moduleName}', expected type for '${moduleOrPropertyName}' to be a hook based on its name, but the type was not a hook`,
558
-
loc: GeneratedSource,
559
-
});
560
-
}
561
-
}else{
562
-
// Not named like a hook => must not be a hook
563
-
if(type.kind==='Function'&&type.shapeId!=null){
564
-
constfunctionType=shapes.get(type.shapeId);
565
-
if(
566
-
functionType!=null&&
567
-
functionType.functionType?.hookKind!=null
568
-
){
569
-
CompilerError.throwInvalidConfig({
570
-
reason: `Invalid moduleTypeProvider result for module '${moduleName}', expected type for '${moduleOrPropertyName}' not to be a hook, but it was typed as a hook`,
0 commit comments