You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

react-docgen-typescript

Package Overview
Dependencies
Maintainers
1
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-docgen-typescript - npm Package Compare versions

Comparing version

to
1.12.5

9

lib/__tests__/parser.js

@@ -728,3 +728,12 @@ "use strict";

});
describe('issues tests', function () {
it('188', function () {
testUtils_1.check('Issue188', {
Header: {
content: { type: 'string', required: true, description: '' },
},
}, true, '');
});
});
});
//# sourceMappingURL=parser.js.map

4

lib/__tests__/testUtils.d.ts

@@ -19,3 +19,3 @@ import { ComponentDoc, ParserOptions } from '../parser';

export declare function fixturePath(componentName: string): string;
export declare function check(componentName: string, expected: ExpectedComponents, exactProperties?: boolean, description?: string, parserOpts?: ParserOptions): void;
export declare function checkComponent(actual: ComponentDoc[], expected: ExpectedComponents, exactProperties?: boolean, description?: string): void;
export declare function check(componentName: string, expected: ExpectedComponents, exactProperties?: boolean, description?: string | null, parserOpts?: ParserOptions): void;
export declare function checkComponent(actual: ComponentDoc[], expected: ExpectedComponents, exactProperties?: boolean, description?: string | null): void;

@@ -34,6 +34,9 @@ "use strict";

var compName = componentDoc.displayName;
var expectedComponentDescription = description || compName + " description";
var expectedComponentDescription = compName + " description";
if (description !== undefined) {
expectedComponentDescription = description || '';
}
if (componentDoc.description !== expectedComponentDescription) {
// tslint:disable-next-line:max-line-length
errors.push(compName + " description is different - expected: '" + compName + " description', actual: '" + componentDoc.description + "'");
errors.push(compName + " description is different - expected: '" + expectedComponentDescription + "', actual: '" + componentDoc.description + "'");
}

@@ -40,0 +43,0 @@ if (propNames.length !== expectedPropNames.length &&

{
"name": "react-docgen-typescript",
"version": "1.12.4",
"version": "1.12.5",
"description": "",
"homepage": "https://github.com/styleguidist/react-docgen-typescript/",
"bugs": "https://github.com/styleguidist/react-docgen-typescript/issues",
"main": "lib/index.js",

@@ -44,3 +46,7 @@ "types": "lib/index.d.ts",

"README.md"
]
],
"repository": {
"type": "git",
"url": "https://github.com/styleguidist/react-docgen-typescript.git"
}
}

@@ -104,3 +104,3 @@ # react-docgen-typescript

![Stylesheet example](./stylesheet-example-column.png "Stylesheet example")
![Stylesheet example](https://github.com/styleguidist/react-docgen-typescript/raw/master/stylesheet-example-column.png "Stylesheet example")

@@ -139,3 +139,3 @@ The functional component [`Grid.tsx`](./examples/react-styleguidist-example/components/Grid.tsx)

![Stylesheet example](./stylesheet-example-grid.png "Stylesheet example")
![Stylesheet example](https://github.com/styleguidist/react-docgen-typescript/raw/master/stylesheet-example-grid.png "Stylesheet example")

@@ -142,0 +142,0 @@ ## Contributions

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet