mirror of
https://github.com/status-im/metro.git
synced 2025-02-22 15:58:13 +00:00
Use exact types for options
Summary: Make option types exact to prevent stale options in our code base. Reviewed By: jeanlauliac Differential Revision: D4867773 fbshipit-source-id: 6aa06649735d6105f4b6ff2af7f699cf8ba336c7
This commit is contained in:
parent
41a6317fd2
commit
056a829136
@ -45,10 +45,10 @@ type GraphOptions = {|
|
|||||||
skip?: Set<string>,
|
skip?: Set<string>,
|
||||||
|};
|
|};
|
||||||
|
|
||||||
export type GraphResult = {
|
export type GraphResult = {|
|
||||||
entryModules: Array<Module>,
|
entryModules: Array<Module>,
|
||||||
modules: Array<Module>,
|
modules: Array<Module>,
|
||||||
};
|
|};
|
||||||
|
|
||||||
export type IdForPathFn = {path: string} => number;
|
export type IdForPathFn = {path: string} => number;
|
||||||
|
|
||||||
@ -75,10 +75,10 @@ export type OutputFn = (
|
|||||||
idForPath: IdForPathFn,
|
idForPath: IdForPathFn,
|
||||||
) => OutputResult;
|
) => OutputResult;
|
||||||
|
|
||||||
type OutputResult = {
|
type OutputResult = {|
|
||||||
code: string,
|
code: string,
|
||||||
map: SourceMap,
|
map: SourceMap,
|
||||||
};
|
|};
|
||||||
|
|
||||||
export type PackageData = {|
|
export type PackageData = {|
|
||||||
browser?: Object | string,
|
browser?: Object | string,
|
||||||
@ -99,11 +99,11 @@ type ResolveOptions = {
|
|||||||
log?: Console,
|
log?: Console,
|
||||||
};
|
};
|
||||||
|
|
||||||
export type TransformerResult = {
|
export type TransformerResult = {|
|
||||||
ast: ?Ast,
|
ast: ?Ast,
|
||||||
code: string,
|
code: string,
|
||||||
map: ?SourceMap,
|
map: ?SourceMap,
|
||||||
};
|
|};
|
||||||
|
|
||||||
export type Transformer = {
|
export type Transformer = {
|
||||||
transform: (
|
transform: (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user