From ac2295cf1c35a7a8fb3f6568b32fa0df257070ab Mon Sep 17 00:00:00 2001 From: Dan Schuman Date: Thu, 8 Feb 2018 11:34:59 -0800 Subject: [PATCH] Update failing Typescript failure snapshot --- .gitignore | 1 + .../__snapshots__/typescript.js.snap | 59 ++++++++++--------- 2 files changed, 32 insertions(+), 28 deletions(-) diff --git a/.gitignore b/.gitignore index fe3b7f1e..5d710721 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ yarn.lock package-lock.json .vscode preact/ +.eslintcache diff --git a/src/__tests__/__snapshots__/typescript.js.snap b/src/__tests__/__snapshots__/typescript.js.snap index cacbb720..eb9de2ac 100644 --- a/src/__tests__/__snapshots__/typescript.js.snap +++ b/src/__tests__/__snapshots__/typescript.js.snap @@ -1,7 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Typescript: Typescript expected failures 1`] = ` -"test/should-fail.test.tsx(10,3): error TS2345: Argument of type '{ fillRule: \\"cat\\"; }' is not assignable to parameter of type 'StyleArgument'. +"test/glamorous.test.tsx(537,43): error TS2322: Type '{}' is not assignable to type 'IntrinsicAttributes & CSSProperties & ExtraGlamorousProps & HTMLProps & { childre...'. + Type '{}' is not assignable to type 'CSSProperties'. + Index signature is missing in type '{}'. +test/should-fail.test.tsx(10,3): error TS2345: Argument of type '{ fillRule: \\"cat\\"; }' is not assignable to parameter of type 'StyleArgument'. Type '{ fillRule: \\"cat\\"; }' is not assignable to type '(string | SVGProperties | StyleFunction)[]'. Property 'length' is missing in type '{ fillRule: \\"cat\\"; }'. test/should-fail.test.tsx(16,3): error TS2345: Argument of type '{ fillRule: \\"cat\\"; }' is not assignable to parameter of type 'StyleArgument'. @@ -45,23 +48,23 @@ test/should-fail.test.tsx(135,20): error TS2551: Property 'visibles' does not ex test/should-fail.test.tsx(140,3): error TS2345: Argument of type '(props: { visible: boolean; } & object) => { display: \\"none\\" | \\"hidden\\"; }' is not assignable to parameter of type 'StyleArgument'. Type '(props: { visible: boolean; } & object) => { display: \\"none\\" | \\"hidden\\"; }' is not assignable to type '(string | CSSProperties | StyleFunction)[]'. Property 'push' is missing in type '(props: { visible: boolean; } & object) => { display: \\"none\\" | \\"hidden\\"; }'. -test/should-fail.test.tsx(150,29): error TS2322: Type '{ visible: \\"string\\"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes'. +test/should-fail.test.tsx(150,29): error TS2322: Type '{ visible: string; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes'. Types of property 'visible' are incompatible. - Type '\\"string\\"' is not assignable to type 'boolean'. + Type 'string' is not assignable to type 'boolean'. test/should-fail.test.tsx(151,5): error TS2322: Type '{}' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes'. Property 'visible' is missing in type '{}'. -test/should-fail.test.tsx(152,32): error TS2322: Type '{ visible: \\"string\\"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & { visible: b...'. - Type '{ visible: \\"string\\"; }' is not assignable to type 'Readonly & { visible: boolean; } & object & ExtraGlamorousProps>'. +test/should-fail.test.tsx(152,32): error TS2322: Type '{ visible: string; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & { visible: b...'. + Type '{ visible: string; }' is not assignable to type 'Readonly & { visible: boolean; } & object & ExtraGlamorousProps>'. Types of property 'visible' are incompatible. - Type '\\"string\\"' is not assignable to type 'boolean'. + Type 'string' is not assignable to type 'boolean'. test/should-fail.test.tsx(153,5): error TS2322: Type '{}' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & { visible: b...'. Type '{}' is not assignable to type 'Readonly & { visible: boolean; } & object & ExtraGlamorousProps>'. Property 'visible' is missing in type '{}'. -test/should-fail.test.tsx(157,21): error TS2345: Argument of type '{ allowReorder: false; }' is not assignable to parameter of type 'StyleArgument'. - Type '{ allowReorder: false; }' is not assignable to type '(string | SVGProperties | StyleFunction)[]'. - Property 'length' is missing in type '{ allowReorder: false; }'. +test/should-fail.test.tsx(157,21): error TS2345: Argument of type '{ allowReorder: boolean; }' is not assignable to parameter of type 'StyleArgument'. + Type '{ allowReorder: boolean; }' is not assignable to type '(string | SVGProperties | StyleFunction)[]'. + Property 'length' is missing in type '{ allowReorder: boolean; }'. test/should-fail.test.tsx(158,18): error TS2345: Argument of type '{ color: boolean; }' is not assignable to parameter of type 'StyleArgument'. Type '{ color: boolean; }' is not assignable to type '(string | CSSProperties | StyleFunction)[]'. Property 'length' is missing in type '{ color: boolean; }'. @@ -81,21 +84,21 @@ test/should-fail.test.tsx(224,3): error TS2345: Argument of type '(props: { visi test/should-fail.test.tsx(229,1): error TS2554: Expected 1 arguments, but got 0. test/should-fail.test.tsx(230,30): error TS2345: Argument of type '\\"\\"' is not assignable to parameter of type 'object'. test/should-fail.test.tsx(231,30): error TS2345: Argument of type 'false' is not assignable to parameter of type 'object'. -test/should-fail.test.tsx(257,19): error TS2559: Type '{ d: \\"\\"; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & Partial<{ pr...'. -test/should-fail.test.tsx(258,19): error TS2322: Type '{ primaryColor: 1; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & Partial<{ pr...'. - Type '{ primaryColor: 1; }' is not assignable to type 'Readonly & Partial<{ primaryColor: string; }> & Pick<{ theme?: any; }, ...'. +test/should-fail.test.tsx(257,19): error TS2559: Type '{ d: string; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & Partial<{ pr...'. +test/should-fail.test.tsx(258,19): error TS2322: Type '{ primaryColor: number; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & Partial<{ pr...'. + Type '{ primaryColor: number; }' is not assignable to type 'Readonly & Partial<{ primaryColor: string; }> & Pick<{ theme?: any; }, ...'. Types of property 'primaryColor' are incompatible. - Type '1' is not assignable to type 'string | undefined'. -test/should-fail.test.tsx(259,31): error TS2559: Type '{ d: \\"\\"; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & Pic...'. -test/should-fail.test.tsx(260,31): error TS2322: Type '{ primaryColor: 1; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & Pic...'. - Type '{ primaryColor: 1; }' is not assignable to type 'Readonly & Pick<{ theme: any; }, never> & ExtraGlamorousProps>'. + Type 'number' is not assignable to type 'string | undefined'. +test/should-fail.test.tsx(259,31): error TS2559: Type '{ d: string; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & Pic...'. +test/should-fail.test.tsx(260,31): error TS2322: Type '{ primaryColor: number; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & Pic...'. + Type '{ primaryColor: number; }' is not assignable to type 'Readonly & Pick<{ theme: any; }, never> & ExtraGlamorousProps>'. Types of property 'primaryColor' are incompatible. - Type '1' is not assignable to type 'string | undefined'. -test/should-fail.test.tsx(261,31): error TS2559: Type '{ d: \\"\\"; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & ExtraGlamorousProps>'. + Type 'number' is not assignable to type 'string | undefined'. +test/should-fail.test.tsx(261,31): error TS2559: Type '{ d: string; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & ExtraGlamorousProps>'. Types of property 'primaryColor' are incompatible. - Type '1' is not assignable to type 'string | undefined'. + Type 'number' is not assignable to type 'string | undefined'. test/should-fail.test.tsx(267,15): error TS2345: Argument of type '{ textAlign: \\"center\\"; display: (\\"block\\" | \\"flexs\\")[]; }' is not assignable to parameter of type 'StyleArgument'. Type '{ textAlign: \\"center\\"; display: (\\"block\\" | \\"flexs\\")[]; }' is not assignable to type '(string | CSSProperties | StyleFunction)[]'. Property 'length' is missing in type '{ textAlign: \\"center\\"; display: (\\"block\\" | \\"flexs\\")[]; }'. @@ -105,14 +108,14 @@ test/should-fail.test.tsx(272,18): error TS2345: Argument of type '{ textAlign: test/should-fail.test.tsx(289,35): error TS2322: Type '{ display: \\"blocks\\"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes'. Types of property 'display' are incompatible. - Type '\\"blocks\\"' is not assignable to type '\\"none\\" | \\"table\\" | \\"ruby\\" | \\"initial\\" | \\"inherit\\" | \\"unset\\" | \\"block\\" | \\"inline\\" | \\"run-in\\" | \\"fl...'. -test/should-fail.test.tsx(290,38): error TS2559: Type '{ display: \\"block\\"; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & object & CSS...'. Type '{ display: \\"blocks\\"; }' is not assignable to type 'Readonly & object & CSSProperties & ExtraGlamorousProps>'. Types of property 'display' are incompatible. - Type '\\"blocks\\"' is not assignable to type '\\"none\\" | \\"table\\" | \\"ruby\\" | \\"initial\\" | \\"inherit\\" | \\"unset\\" | \\"block\\" | \\"inline\\" | \\"run-in\\" | \\"fl...'. -test/should-fail.test.tsx(294,32): error TS2559: Type '{ display: \\"block\\"; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & object & Ext...'. -test/should-fail.test.tsx(295,36): error TS2559: Type '{ display: \\"block\\"; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & object & Ext...'. + Type '\\"blocks\\"' is not assignable to type '\\"none\\" | \\"ruby\\" | \\"table\\" | \\"inline\\" | \\"grid\\" | \\"initial\\" | \\"inherit\\" | \\"unset\\" | \\"block\\" | \\"run-...'. +test/should-fail.test.tsx(294,32): error TS2559: Type '{ display: string; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & object & Ext...'. +test/should-fail.test.tsx(295,36): error TS2559: Type '{ display: string; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & object & Ext...'. " `;