1/*The generic type of the Promise should correspond to the 
2non-error return-type of the function. The error is implicitly 
3of type any and is not specified in the Promise generic type. */
4function test(arg: string): Promise<number> {
5    return new Promise<number>((resolve, reject) => {
6        if (arg === "a") {
7            resolve(1);
8        } else {
9            reject("1");
10        }
11    });
12}