-
Notifications
You must be signed in to change notification settings - Fork 565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interface types aren't compatible in 2.3.2 #294
Comments
import classNames from 'classnames';
export interface ValidateType {
error: boolean;
[key: string]: any;
}
const result: ValidateType = {
error: true,
};
const data = classNames(result);
console.log(`🚀 ~ file: index.ts ~ line 10 ~ data`, data); this one is work. |
Issue broken down type Foo = {
bar: boolean
}
const foo: Foo = { bar: true }
classNames(foo) // ok interface Foo { // hmmm
bar: boolean
}
const foo: Foo = { bar: true }
classNames(foo) // Argument of type '[Foo]' is not assignable to parameter of type 'ArgumentArray' |
@dcousens do we have a solution in the works for this issue? Anything that can be added to the failing test PR to fix this? |
So the reason for this regression is that the type for |
I meet a typing issue in 2.3.2:
it worked on 2.3.1.
The text was updated successfully, but these errors were encountered: