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
I've noticed we might not be implementing the main schematic rule properly. TypeScript throws a type error. Fortunately, I believe it doesn't have an impact on functionality, and the schematics work.
exportfunctionmain(options: Options): Rule{return(tree: Tree,context: SchematicContext): Rule=>{context.logger.info('Creating .nvmrc file and updating package.json...');consttemplateSource=apply(url('./files'),[template({...options}),move(normalize(options.directory)),]);returnchain([mergeWith(templateSource,MergeStrategy.Overwrite),updatePackageJson(options),])(tree,context);// no need for calling the second function};}
Possible Fix
Return the result of the schematics function used (which in turn returns a Rule; e.g. mergeWith, chain, etc)
The text was updated successfully, but these errors were encountered:
Description
I've noticed we might not be implementing the main schematic rule properly. TypeScript throws a type error. Fortunately, I believe it doesn't have an impact on functionality, and the schematics work.
Expected Behavior
The
return
should yield aRule
Actual Behavior
Possible Fix
Return the result of the schematics function used (which in turn returns a
Rule
; e.g.mergeWith
,chain
, etc)The text was updated successfully, but these errors were encountered: