Skip to content

Commit

Permalink
fix(typings): simplify generated typings
Browse files Browse the repository at this point in the history
  • Loading branch information
Heymdall committed Feb 12, 2019
1 parent aba8693 commit 3998d77
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions typings/__tests__/__snapshots__/index.tests.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ export type AOptionalObjectOfFieldType = {
export type ARequiredObjectOfFieldType = {
[key: string]: number;
};
export type AOptionalObjectWithShapeSubShapeFieldType = {
export type AOptionalObjectWithShapeSubShapeShapeType = {
/**
* Even deeper documentation
*/
name?: string;
size?: number
};
export type AOptionalObjectWithShapeFieldType = {
export type AOptionalObjectWithShapeShapeType = {
color?: string;
/**
Expand All @@ -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;
Expand Down Expand Up @@ -94,7 +94,7 @@ export type AProps = DeepReadonlyObject<{
requiredObjectOf: ARequiredObjectOfFieldType;
optionalAny?: any;
requiredAny: any;
optionalObjectWithShape?: AOptionalObjectWithShapeFieldType;
optionalObjectWithShape?: AOptionalObjectWithShapeShapeType;
/**
* Callback with documentation
Expand All @@ -105,7 +105,7 @@ export type AProps = DeepReadonlyObject<{
}>;
export type APropTypes = Record<keyof AProps, Type.Validator<AProps>>;
export type APropTypes = Record<keyof AProps, Type.Validator<any>>;
/**
Expand Down
2 changes: 1 addition & 1 deletion typings/stringify-component-definition.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ function stringifyComponentDefinition(info) {
${propsDef}
export type ${propTypesTypeName} = Record<keyof ${propsInterfaceName}, Type.Validator<${propsInterfaceName}>>;
export type ${propTypesTypeName} = Record<keyof ${propsInterfaceName}, Type.Validator<any>>;
${stringifyDescription(info.description, info.docblock)}
export default class ${info.displayName} extends React.Component<${propsInterfaceName}> {
Expand Down

0 comments on commit 3998d77

Please sign in to comment.