Closed gajus closed 7 years ago
Code:
type TypeAdCampaign = { movieId: number, language: string, initialState: ?('collapsed' | 'expanded'), latitude: ?string, longitude: ?string }; export default (adCampaign: TypeAdCampaign = {}) => { // ... };
Error:
Uncaught TypeError: Value of argument "adCampaign" violates contract. Expected: TypeAdCampaign Got: { movieId: string; movieName: string; language: string; }
Expected error:
Uncaught TypeError: Value of argument "adCampaign" violates contract. Expected: TypeAdCampaign { movieId: number, language: string, initialState: ?('collapsed' | 'expanded'), latitude: ?string, longitude: ?string } Got: { movieId: string; movieName: string; language: string; }
I think this was recently introduced because babel removed support for caching paths on nodes. I'd definitely like to get this back in.
Code:
Error:
Expected error: