Issue 1:
Bug Report

Current Behavior

The most recent recent publish of @babel/types is not compiling with TypeScript. The error is TS8020, JSDoc types can only be used inside documentation comments.

Input Code

https://github.com/o15y/staart/pulls

node_modules/@babel/types/lib/index.d.ts:2098:30 - error TS8020: JSDoc types can only be used inside documentation comments.
2098 export function isNode(node: ?object): boolean
~~~~~~~
node_modules/@babel/types/lib/index.d.ts:2100:52 - error TS8020: JSDoc types can only be used inside documentation comments.
2100 export function isPlaceholderType(placeholderType: ?string, targetType: string): boolean
~~~~~~~
node_modules/@babel/types/lib/index.d.ts:2104:34 - error TS8020: JSDoc types can only be used inside documentation comments.
2104 export function isType(nodetype: ?string, targetType: string): boolean
~~~~~~~
Found 3 errors.

Issue 2:
Bug Report

Current Behavior

$ babel ./test.js --no-babelrc --presets=module:@babel/preset-react --plugins=module:@babel/plugin-transform-regenerator
TypeError: /Users/stevefar/sc/labeltron/test.js: Duplicate declaration "newSessionId" (This is an error on an internal node. Probably an internal error.)
at File.buildCodeFrameError (/Users/stevefar/sc/labeltron/node_modules/@babel/core/lib/transformation/file/file.js:259:12)
at Scope.checkBlockScopedCollisions (/Users/stevefar/sc/labeltron/node_modules/@babel/traverse/lib/scope/index.js:347:22)
at Scope.registerBinding (/Users/stevefar/sc/labeltron/node_modules/@babel/traverse/lib/scope/index.js:504:16)
at Scope.registerDeclaration (/Users/stevefar/sc/labeltron/node_modules/@babel/traverse/lib/scope/index.js:444:14)
at Object.Declaration (/Users/stevefar/sc/labeltron/node_modules/@babel/traverse/lib/scope/index.js:125:12)
at NodePath._call (/Users/stevefar/sc/labeltron/node_modules/@babel/traverse/lib/path/context.js:53:20)
at NodePath.call (/Users/stevefar/sc/labeltron/node_modules/@babel/traverse/lib/path/context.js:40:17)
at NodePath.visit (/Users/stevefar/sc/labeltron/node_modules/@babel/traverse/lib/path/context.js:88:12)
at TraversalContext.visitQueue (/Users/stevefar/sc/labeltron/node_modules/@babel/traverse/lib/context.js:118:16)
at TraversalContext.visitMultiple (/Users/stevefar/sc/labeltron/node_modules/@babel/traverse/lib/context.js:85:17)

Input Code

The is the contents of test.js

<Component>
{() => {
const saveSession = async () => {
const newSessionId = await someAsyncFunc();
};
}}
</Component>;

Expected behavior/code

I get a runtime error running babel, I expected it to create the transpiled code.

Babel Configuration (.babelrc, package.json, cli command)

babel ./test.js --no-babelrc --presets=module:@babel/preset-react --plugins=module:@babel/plugin-transform-regenerator

Environment

Babel version(s): 7.0.0-rc.2 (@babel/core 7.0.0-rc.2)

Node/npm version: Node 8/npm 5

OS: OSX 10.13.6

Monorepo no

How you are using Babel: cli

Additional context/Screenshots

If I do each transform as a individual step it works:

$ cat ./test.js | babel --no-babelrc --presets=module:@babel/preset-react | babel --no-babelrc --plugins=module:@babel/plugin-transform-regenerator

Its not clear why this would work, but including both the preset and plugin would not.