From 3998d77568e6cc01adf97fc4d5ce349495fcebc9 Mon Sep 17 00:00:00 2001 From: heymdall Date: Tue, 12 Feb 2019 11:54:09 +0300 Subject: [PATCH] fix(typings): simplify generated typings --- typings/__tests__/__snapshots__/index.tests.js.snap | 10 +++++----- typings/stringify-component-definition.js | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/typings/__tests__/__snapshots__/index.tests.js.snap b/typings/__tests__/__snapshots__/index.tests.js.snap index 84b20d3..5f491a4 100644 --- a/typings/__tests__/__snapshots__/index.tests.js.snap +++ b/typings/__tests__/__snapshots__/index.tests.js.snap @@ -29,7 +29,7 @@ export type AOptionalObjectOfFieldType = { export type ARequiredObjectOfFieldType = { [key: string]: number; }; -export type AOptionalObjectWithShapeSubShapeFieldType = { +export type AOptionalObjectWithShapeSubShapeShapeType = { /** * Even deeper documentation @@ -37,7 +37,7 @@ export type AOptionalObjectWithShapeSubShapeFieldType = { name?: string; size?: number }; -export type AOptionalObjectWithShapeFieldType = { +export type AOptionalObjectWithShapeShapeType = { color?: string; /** @@ -49,7 +49,7 @@ export type AOptionalObjectWithShapeFieldType = { * @param {string} value */ onChange?: Function; - subShape?: AOptionalObjectWithShapeSubShapeFieldType + subShape?: AOptionalObjectWithShapeSubShapeShapeType }; export type AOnClickReturnFieldType = string | number; export type APublicWithParamsUnionParamFieldType = string | number; @@ -94,7 +94,7 @@ export type AProps = DeepReadonlyObject<{ requiredObjectOf: ARequiredObjectOfFieldType; optionalAny?: any; requiredAny: any; - optionalObjectWithShape?: AOptionalObjectWithShapeFieldType; + optionalObjectWithShape?: AOptionalObjectWithShapeShapeType; /** * Callback with documentation @@ -105,7 +105,7 @@ export type AProps = DeepReadonlyObject<{ }>; -export type APropTypes = Record>; +export type APropTypes = Record>; /** diff --git a/typings/stringify-component-definition.js b/typings/stringify-component-definition.js index b9b91d7..97ce25c 100644 --- a/typings/stringify-component-definition.js +++ b/typings/stringify-component-definition.js @@ -199,7 +199,7 @@ function stringifyComponentDefinition(info) { ${propsDef} - export type ${propTypesTypeName} = Record>; + export type ${propTypesTypeName} = Record>; ${stringifyDescription(info.description, info.docblock)} export default class ${info.displayName} extends React.Component<${propsInterfaceName}> {