Add support for $FlowFixMe
parent
563789f555
commit
cdc9304304
|
@ -198,6 +198,11 @@ function either(params: (?Type)[]): ?Type {
|
|||
: t.createUnion(variants);
|
||||
}
|
||||
|
||||
// $ FlowFixMe
|
||||
function fixMe(): ?Type {
|
||||
return t.createAny();
|
||||
}
|
||||
|
||||
export default {
|
||||
Object: object,
|
||||
Buffer: buffer,
|
||||
|
@ -214,4 +219,5 @@ export default {
|
|||
$Diff: diff,
|
||||
$All: all,
|
||||
$Either: either,
|
||||
$FlowFixMe: fixMe,
|
||||
};
|
||||
|
|
|
@ -11,7 +11,8 @@ export type Query =
|
|||
| Template
|
||||
| Definition
|
||||
| External
|
||||
| Special;
|
||||
| Special
|
||||
;
|
||||
|
||||
export type 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