babel-plugin-flow-comments
Advanced tools
Comparing version 1.0.4 to 1.0.5
{ | ||
"name": "babel-plugin-flow-comments", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Turn flow type annotations into comments", | ||
@@ -5,0 +5,0 @@ "repository": "babel-plugins/babel-plugin-flow-comments", |
@@ -5,2 +5,4 @@ # babel-plugin-flow-comments | ||
When using this plugin, you might want to also blacklist the `flow` transformer to preserve the `/* @flow */` directive. | ||
http://flowtype.org/blog/2015/02/20/Flow-Comments.html | ||
@@ -19,2 +21,5 @@ | ||
}; | ||
export type GraphQLFormattedError = number; | ||
import type A, { B, C } from './types'; | ||
import typeof D, { E, F } from './types'; | ||
``` | ||
@@ -33,2 +38,5 @@ | ||
};*/ | ||
/*:: export type GraphQLFormattedError = number;*/ | ||
/*:: import type A, { B, C } from './types';*/ | ||
/*:: import typeof D, { E, F } from './types';*/ | ||
``` | ||
@@ -50,3 +58,4 @@ | ||
{ | ||
"plugins": ["flow-comments"] | ||
"plugins": ["flow-comments"], | ||
"blacklist": ["flow"] | ||
} | ||
@@ -58,3 +67,3 @@ ``` | ||
```sh | ||
$ babel --plugins flow-comments script.js | ||
$ babel --plugins flow-comments --blacklist flow script.js | ||
``` | ||
@@ -66,4 +75,5 @@ | ||
require("babel-core").transform("code", { | ||
plugins: ["flow-comments"] | ||
plugins: ["flow-comments"], | ||
blacklist: ["flow"] | ||
}); | ||
``` |
@@ -0,1 +1,2 @@ | ||
export type GraphQLFormattedError = number; | ||
export type GraphQLFormattedError = { | ||
@@ -2,0 +3,0 @@ message: string, |
@@ -7,2 +7,3 @@ "use strict"; | ||
/*:: export type GraphQLFormattedError = number;*/ | ||
/*:: export type GraphQLFormattedError = { | ||
@@ -9,0 +10,0 @@ message: string, |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
5074
18
105
74
0