mirror of
https://github.com/github/codeql.git
synced 2026-05-02 12:15:17 +02:00
add test diagnostics test for internal error
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
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>;
|
||||
Reference in New Issue
Block a user