flow2schema/tests/samples/skipFunctions/source.js

53 lines
657 B
JavaScript
Raw Normal View History

2017-12-03 14:57:44 +03:00
// TODO: disassembly the test.
2017-10-29 16:14:21 +03:00
type Type = {
a: string,
foo(): void,
2017-11-28 16:35:28 +03:00
b: boolean,
2017-11-03 10:41:36 +03:00
2017-11-28 17:22:49 +03:00
baz: (() => void)[],
2017-11-03 10:41:36 +03:00
bar: () => void,
2017-11-28 17:22:49 +03:00
[string]: () => void,
2017-11-28 18:38:55 +03:00
c: string & () => void,
kek: [() => void],
2017-10-29 16:14:21 +03:00
};
interface Interface {
a: string;
foo(): void;
2017-11-28 16:35:28 +03:00
b: boolean;
2017-11-03 10:41:36 +03:00
2017-11-28 17:22:49 +03:00
baz: ?() => void;
2017-11-03 10:41:36 +03:00
bar: () => void;
2017-11-28 17:22:49 +03:00
[() => void]: string;
c: string | () => void;
kek: (() => string) & (() => void);
2017-10-29 16:14:21 +03:00
}
class Class {
a: string;
foo() {}
get bar() {}
set bar(a) {}
2017-11-28 16:35:28 +03:00
b: boolean;
2017-11-03 10:41:36 +03:00
2017-11-28 17:22:49 +03:00
static baz() {}
2017-11-03 10:41:36 +03:00
baz: () => void;
2017-11-28 17:22:49 +03:00
kek: (() => string) | (() => void);
2017-10-29 16:14:21 +03:00
}
2017-11-09 12:10:21 +03:00
export {Type, Interface, Class};