mirror of
https://github.com/github/codeql.git
synced 2026-01-06 11:10:23 +01:00
We no longer need the platform-specific directories, so simplify the test organization. If you don't want this change, just skip merging this PR. It's purely optional. The PR also deletes a spurious qlpack.yml that I missed when converting the tests to pytest.
18 lines
468 B
TypeScript
18 lines
468 B
TypeScript
type Output<K, S extends any[]> = {
|
|
(...args: S): any;
|
|
};
|
|
|
|
declare function createThing<K extends string, S extends any[]>(
|
|
type: K,
|
|
fn: (...args: S) => any
|
|
): Output<K, S>;
|
|
|
|
const one = createThing("one", () => ({}));
|
|
|
|
const two = createThing("two", () => ({}));
|
|
|
|
const three = createThing("three", (cursor: string) => null);
|
|
const four = createThing("four", (error: number) => null);
|
|
|
|
type Events = Array<typeof one | typeof two | typeof three | typeof four>;
|