Skip to content

Commit 7214e92

Browse files
author
Keyan Zhang
committed
added TypeParameter and NullTypeAnnotation to ast-types
1 parent da84faf commit 7214e92

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

transforms/__testfixtures__/class-flow5.input.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22

33
var React = require('react');
44

5+
type SomeStuff<A> = { // TypeParameter
6+
fetch: () => Promise<A>,
7+
};
8+
59
var Component = React.createClass({
610
statics: {
711
notTyped: true,
12+
nothing: (null: null), // NullTypeAnnotation
813
numberOrBool: (true: number | boolean),
914
logger: (x: any): void => { console.log(x); },
1015
logger2: function(x: any): void {

transforms/__testfixtures__/class-flow5.output.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@
22

33
var React = require('react');
44

5+
type SomeStuff<A> = { // TypeParameter
6+
fetch: () => Promise<A>,
7+
};
8+
59
class Component extends React.Component {
610
static notTyped = true;
11+
static nothing: null = null; // NullTypeAnnotation
712
static numberOrBool: number | boolean = true;
813
static logger = (x: any): void => { console.log(x); };
914

0 commit comments

Comments
 (0)