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
error TS2345: Argument of type 'Foo' is not assignable to parameter of type 'Foo'.
Given the exact same exported type, Typescript isn't able to deal with enums from multiple source locations. Here's an example with a Core project and a Bar project:
// some other importsimport{convertFooToString}exportdefaultclassSomeComponentextendsReact.Component<any,any>{render(){// Note, this.props.foo IS a Foo typereturn(<div>{convertFooToString(this.props.foo)}</div>);}}
it is not clear what is going on from your description, i do not know where the error is reported, and where hte import is coming from etc.. but this looks like a duplicate of #4800..
This issue was long ago marked as a duplicate. Shouldn't it be closed (especially since the issue it is supposedly a duplicate of, #4800, is actually closed)?
Error message says:
Given the exact same exported type, Typescript isn't able to deal with enums from multiple source locations. Here's an example with a Core project and a Bar project:
SomeComponent.tsx:
foo.ts:
convertFooToString:
The text was updated successfully, but these errors were encountered: