-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Props: #8143 repro for imported types
- Loading branch information
Showing
5 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
addons/docs/src/frameworks/react/__testfixtures__/8143-ts-imported-types/docgen.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`react component properties 8143-ts-imported-types 1`] = ` | ||
"import React from 'react'; | ||
export const FooComponent = foo => React.createElement(React.Fragment, null, JSON.stringify(foo)); | ||
export const component = FooComponent; | ||
FooComponent.__docgenInfo = { | ||
\\"description\\": \\"\\", | ||
\\"methods\\": [], | ||
\\"displayName\\": \\"FooComponent\\", | ||
\\"props\\": { | ||
\\"bar\\": { | ||
\\"required\\": true, | ||
\\"tsType\\": { | ||
\\"name\\": \\"Foo['bar']\\", | ||
\\"raw\\": \\"Foo['bar']\\" | ||
}, | ||
\\"description\\": \\"\\" | ||
} | ||
} | ||
};" | ||
`; |
10 changes: 10 additions & 0 deletions
10
addons/docs/src/frameworks/react/__testfixtures__/8143-ts-imported-types/input.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react'; | ||
import { Foo } from './types'; | ||
|
||
interface FooProps { | ||
bar: Foo['bar']; | ||
} | ||
|
||
export const FooComponent = (foo: FooProps) => <>{JSON.stringify(foo)}</>; | ||
|
||
export const component = FooComponent; |
21 changes: 21 additions & 0 deletions
21
addons/docs/src/frameworks/react/__testfixtures__/8143-ts-imported-types/properties.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`react component properties 8143-ts-imported-types 1`] = ` | ||
Object { | ||
"rows": Array [ | ||
Object { | ||
"defaultValue": Object { | ||
"detail": undefined, | ||
"summary": "0", | ||
}, | ||
"description": "", | ||
"name": "bar", | ||
"required": true, | ||
"type": Object { | ||
"detail": undefined, | ||
"summary": "Foo['bar']", | ||
}, | ||
}, | ||
], | ||
} | ||
`; |
3 changes: 3 additions & 0 deletions
3
addons/docs/src/frameworks/react/__testfixtures__/8143-ts-imported-types/types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export interface Foo { | ||
bar: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters