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.3.1

10

lib/__tests__/parser.js

@@ -153,4 +153,4 @@ "use strict";

});
it('should parse react component with default props', function () {
testUtils_1.check('ComponentWithDefaultProps', {
describe('component with default props', function () {
var expectation = {
ComponentWithDefaultProps: {

@@ -187,3 +187,9 @@ sampleDefaultFromJSDoc: {

}
};
it('should parse defined props', function () {
testUtils_1.check('ComponentWithDefaultProps', expectation);
});
it('should parse referenced props', function () {
testUtils_1.check('ComponentWithReferencedDefaultProps', expectation);
});
});

@@ -190,0 +196,0 @@ it('should parse react PureComponent', function () {

@@ -276,2 +276,13 @@ "use strict";

var properties = initializer.properties;
while (ts.isIdentifier(initializer)) {
var defaultPropsReference = this.checker.getSymbolAtLocation(initializer);
if (defaultPropsReference) {
var declarations = defaultPropsReference.getDeclarations();
if (declarations) {
initializer = declarations[0]
.initializer;
properties = initializer.properties;
}
}
}
var propMap = getPropMap(properties);

@@ -278,0 +289,0 @@ return propMap;

2

package.json
{
"name": "react-docgen-typescript",
"version": "1.3.0",
"version": "1.3.1",
"description": "",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -133,2 +133,4 @@ # react-docgen-typescript

**@argshook** *Arijus Šukys*
**@asilgag** *Alberto Silva*

@@ -135,0 +137,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet