Bump flow to 0.80 and fix sourceType error (#8630)
This commit is contained in:
@@ -5,8 +5,10 @@ import type { PluginList } from "./plugin-utils";
|
||||
// A second optional argument can be given to further configure
|
||||
// the parser process. These options are recognized:
|
||||
|
||||
export type SourceType = "script" | "module" | "unambiguous";
|
||||
|
||||
export type Options = {
|
||||
sourceType: "script" | "module" | "unambiguous",
|
||||
sourceType: SourceType,
|
||||
sourceFilename?: string,
|
||||
startLine: number,
|
||||
allowAwaitOutsideFunction: boolean,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// @flow
|
||||
|
||||
import type { SourceType } from "./options";
|
||||
import type { Token } from "./tokenizer";
|
||||
import type { SourceLocation } from "./util/location";
|
||||
|
||||
@@ -135,7 +136,7 @@ export type File = NodeBase & {
|
||||
|
||||
export type Program = NodeBase & {
|
||||
type: "Program",
|
||||
sourceType: "script" | "module",
|
||||
sourceType: SourceType,
|
||||
body: Array<Statement | ModuleDeclaration>, // TODO: $ReadOnlyArray
|
||||
directives: $ReadOnlyArray<Directive>, // TODO: Not in spec
|
||||
interpreter: InterpreterDirective | null,
|
||||
|
||||
Reference in New Issue
Block a user