Skip to content

Commit 72a819d

Browse files
committed
Updated
1 parent 8470379 commit 72a819d

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

scripts/tests/__snapshots__/all.test.ts.snap

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ src/04-advanced-components/28-passing-react-components-vs-passing-react-nodes.pr
9797
src/04-advanced-components/28-passing-react-components-vs-passing-react-nodes.problem.tsx(30,21): error TS7006: Parameter 'index' implicitly has an 'any' type.
9898
src/04-advanced-components/28-passing-react-components-vs-passing-react-nodes.solution.1.tsx(30,9): error TS2322: Type '(index: number) => number' is not assignable to type 'FC<number>'.
9999
Type 'number' is not assignable to type 'ReactElement<any, any>'.
100+
src/04-advanced-components/29-toggle-props.problem.tsx(25,5): error TS2578: Unused '@ts-expect-error' directive.
101+
src/04-advanced-components/29-toggle-props.problem.tsx(29,4): error TS2578: Unused '@ts-expect-error' directive.
100102
src/04-advanced-components/30-generic-props.problem.tsx(38,9): error TS2578: Unused '@ts-expect-error' directive.
101103
src/04-advanced-components/30-generic-props.problem.tsx(50,17): error TS2578: Unused '@ts-expect-error' directive.
102104
src/04-advanced-components/33-prop-groups-with-variants.problem.tsx(23,11): error TS2322: Type '{ children: string; className: string; type: string; } | { children: string; className: string; type: string; } | { children: string; className: string; type: string; }' is not assignable to type 'DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>'.
@@ -130,6 +132,11 @@ src/05-advanced-hooks/42-discriminated-tuples-from-custom-hooks.problem.tsx(31,3
130132
src/05-advanced-hooks/42-discriminated-tuples-from-custom-hooks.problem.tsx(34,16): error TS18048: 'value' is possibly 'undefined'.
131133
src/05-advanced-hooks/42-discriminated-tuples-from-custom-hooks.problem.tsx(34,22): error TS2339: Property 'title' does not exist on type 'Error | { title: string; }'.
132134
Property 'title' does not exist on type 'Error'.
135+
src/06-types-deep-dive/44-understanding-jsx-element.explainer.tsx(23,4): error TS2786: 'Component2' cannot be used as a JSX component.
136+
Its return type 'ReactNode' is not a valid JSX element.
137+
Type 'undefined' is not assignable to type 'Element | null'.
138+
src/06-types-deep-dive/47-add-new-global-element.problem.tsx(2,3): error TS2339: Property 'something' does not exist on type 'JSX.IntrinsicElements'.
139+
src/06-types-deep-dive/47-add-new-global-element.problem.tsx(2,23): error TS2339: Property 'something' does not exist on type 'JSX.IntrinsicElements'.
133140
src/06-types-deep-dive/50-add-attribute-to-div-elements.problem.tsx(6,7): error TS2717: Subsequent property declarations must have the same type. Property 'div' must be of type 'DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>', but here has type 'ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & { something?: string | undefined; }'.
134141
src/06-types-deep-dive/50-add-attribute-to-div-elements.problem.tsx(13,30): error TS2322: Type '{ something: string; }' is not assignable to type 'DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>'.
135142
Property 'something' does not exist on type 'DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>'.
@@ -142,6 +149,8 @@ src/07-advanced-patterns/51-required-context.problem.tsx(59,11): error TS2322: T
142149
src/07-advanced-patterns/53-forward-ref-with-generics.explainer.1.tsx(26,28): error TS2344: Type 'false' does not satisfy the constraint 'true'.
143150
src/07-advanced-patterns/53-forward-ref-with-generics.explainer.2.tsx(26,28): error TS2344: Type 'false' does not satisfy the constraint 'true'.
144151
src/07-advanced-patterns/55-as-prop.problem.tsx(13,5): error TS2578: Unused '@ts-expect-error' directive.
152+
src/07-advanced-patterns/55-as-prop.solution.2.tsx(10,11): error TS2322: Type '{ as: TAs; ref?: LegacyRef<HTMLDivElement> | undefined; key?: Key | null | undefined; defaultChecked?: boolean | undefined; defaultValue?: string | ... 2 more ... | undefined; ... 259 more ...; onTransitionEndCapture?: TransitionEventHandler<...> | undefined; } | ... 122 more ... | { ...; }' is not assignable to type 'IntrinsicAttributes'.
153+
Type '{ as: TAs; id: string; }' has no properties in common with type 'IntrinsicAttributes'.
145154
src/07-advanced-patterns/56-as-prop-with-custom-components.problem.tsx(5,11): error TS2604: JSX element type 'Comp' does not have any construct or call signatures.
146155
src/07-advanced-patterns/56-as-prop-with-custom-components.problem.tsx(12,22): error TS2322: Type '{ as: (props: { href: string; children?: ReactNode; }) => Element; href: string; }' is not assignable to type 'IntrinsicAttributes & { as: unknown; }'.
147156
Property 'href' does not exist on type 'IntrinsicAttributes & { as: unknown; }'.
@@ -861,7 +870,7 @@ exports[`vitest > Should have the correct Vitest errors 1`] = `
861870
},
862871
{
863872
"assertionResults": [],
864-
"message": "No test found in suite src/06-types-deep-dive/43-understand-react-namespace-export.explainer.ts",
873+
"message": "React is not defined",
865874
"name": "/src/06-types-deep-dive/43-understand-react-namespace-export.explainer.ts",
866875
"status": "passed",
867876
},
@@ -895,6 +904,12 @@ exports[`vitest > Should have the correct Vitest errors 1`] = `
895904
"name": "/src/06-types-deep-dive/47-add-new-global-element.problem.tsx",
896905
"status": "passed",
897906
},
907+
{
908+
"assertionResults": [],
909+
"message": "No test found in suite src/06-types-deep-dive/47-add-new-global-element.solution.tsx",
910+
"name": "/src/06-types-deep-dive/47-add-new-global-element.solution.tsx",
911+
"status": "passed",
912+
},
898913
{
899914
"assertionResults": [],
900915
"message": "No test found in suite src/06-types-deep-dive/48-add-attribute-to-all-elements.problem.tsx",

0 commit comments

Comments
 (0)