-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typecheck (BREAKING CHANGES) #73
Conversation
* ImportEqualsTransformer Convert `import x = require('y')` to `import * as x from 'y'` * LegacyModules Convert `module Ident` to `namespace Ident` Skip `module 'Ident'`
If it's useful, I'm fine with bumping this lib in major semver for it? |
@orta, yeah, probably would be ok, i'm just sure that tests doesn't cover everything and this looks like major shift in implementation |
@orta anything preventing merging this? |
Nope, just me coming back and merging it :D |
OK, shipped as 1,6,0 |
@orta do you mind if I had rights to commit and label issues directly in this repo? |
I'd prefer it, but I don't have access to give to that access I'm afraid |
Was this ever released? |
Use |
Probably experimental and shouldn't be merged?
CLI
--no-module-exports
options, it disablesdeclare module.exports
syntax in favor ofdeclare export default
--flow-typed-export [folder]
instead of exporting to../exports
folder, it now exports to./exports
and you can change folder name--string-enums
flagCompiler (breaking change?)
Parser
Use transformers to remove legacy syntax with new
ImportEqualsTransformer
Replace
import x = require('y')
withimport * as x from 'y'
LegacyModules
Replace
module Identifier {}
withnamespace Identifier {}
(don't confuse with
declare module 'package-name' {}
)Use recursive
addChildren
for nested namespacesPrint enums, classes, and nested namespaces identifiers inside namespaces
Use
Symbol.for('nodejs.util.inspect')
for printing nodes in console instead of cloning themPrinters
import 'side-effect'
indeclare module
literalType
printertypeParameter
printerpropertyDeclaration
printerclass
andinterface
(resolve namespaces)export default function(): void;
Error on BigInt (I actually added parsing of BigInts to Flow in Add support for BigInt parsing facebook/flow#7471)
Error on
unique symbol
Convert
typeof import('module')
type to$Exports<'module'>