Add support for $FlowFixMe
parent
563789f555
commit
cdc9304304
|
@ -198,6 +198,11 @@ function either(params: (?Type)[]): ?Type {
|
||||||
: t.createUnion(variants);
|
: t.createUnion(variants);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// $ FlowFixMe
|
||||||
|
function fixMe(): ?Type {
|
||||||
|
return t.createAny();
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
Object: object,
|
Object: object,
|
||||||
Buffer: buffer,
|
Buffer: buffer,
|
||||||
|
@ -214,4 +219,5 @@ export default {
|
||||||
$Diff: diff,
|
$Diff: diff,
|
||||||
$All: all,
|
$All: all,
|
||||||
$Either: either,
|
$Either: either,
|
||||||
|
$FlowFixMe: fixMe,
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,7 +11,8 @@ export type Query =
|
||||||
| Template
|
| Template
|
||||||
| Definition
|
| Definition
|
||||||
| External
|
| External
|
||||||
| Special;
|
| Special
|
||||||
|
;
|
||||||
|
|
||||||
export type Unknown = {
|
export type Unknown = {
|
||||||
kind: 'unknown',
|
kind: 'unknown',
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-06/schema#",
|
||||||
|
"definitions": {
|
||||||
|
"fixMe::X": true,
|
||||||
|
"fixMe::Y": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {"y": true},
|
||||||
|
"required": ["y"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
type X = $FlowFixMe;
|
||||||
|
|
||||||
|
type Y = {
|
||||||
|
y: $FlowFixMe;
|
||||||
|
};
|
||||||
|
|
||||||
|
export {X, Y};
|
|
@ -0,0 +1,8 @@
|
||||||
|
- kind: any
|
||||||
|
id: [fixMe, X]
|
||||||
|
- kind: record
|
||||||
|
fields:
|
||||||
|
- name: y
|
||||||
|
value: {kind: any}
|
||||||
|
required: true
|
||||||
|
id: [fixMe, Y]
|
Loading…
Reference in New Issue