Closed bcakmakoglu closed 2 years ago
Oh this is a good catch, thanks! I'll get a fix out soon
Hey, I've had some trouble reproducing this. Could you provide a reproduction?
@wheatjs Tbh i can't seem to reproduce the issue in a sandbox for some reason.
When I try something like this
type StringFunc<N = any> = (node: Node<N> | GraphNode<N>) => string
interface MiniMapProps<N = any> {
nodeColor?: string | StringFunc<N>
nodeStrokeColor?: string | StringFunc<N>
nodeClassName?: string | StringFunc<N>
nodeBorderRadius?: number
nodeStrokeWidth?: number
maskColor?: string
}
I end up with the error that StringFunc
is declared multiple times.
In other instances this exact schema does work though, for example my original Issue showed an example where I tried using
type Foo = [[number, number], [number, number]]
type Bar = Foo
interface Props {
foo: Foo
bar: Bar
}
which resulted in an error. Somehow that issue resolved itself though and I am not really sure why 😅 I didn't actually change anything regarding the implementation or the types.
Also I noticed that using
interface PropsBase {
foo: string
bar: number
}
interface Props extends PropsBase {
baz: boolean
}
doesn't work - it doesn't throw any errors as far as I can tell but the props aren't defined i.e. inside the component the fields are never defined even though values are passed.
Could there be an issue with me using Vue@^3.2.22?
Other than that I am a little at a loss on how to replicate the issue :(
I get the following error when I try to import an interface which uses a Type that is equal to another type.
If it's relevant, I'm on Mac (M1) BigSur.
When I change it to
it works properly.
For obvious reasons it would be nice if the first implementation worked as well :)
Thanks for the plugin though, it helps remove a lot of duplicated code 👍