mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 07:13:45 -05:00
Merge branch 'master' into fixAsyncReferecedImport
This commit is contained in:
@@ -11,4 +11,22 @@ let x = async function() {
|
||||
// async function with which promised type is void - return can be omitted
|
||||
async function f2(): Promise<void> {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
async function f3(x) {
|
||||
if (x) return 10;
|
||||
}
|
||||
|
||||
async function f4(): Promise<number> {
|
||||
|
||||
}
|
||||
|
||||
function voidFunc(): void {
|
||||
}
|
||||
|
||||
function calltoVoidFunc(x) {
|
||||
if (x) return voidFunc();
|
||||
}
|
||||
|
||||
declare function use(s: string): void;
|
||||
let x1 = () => { use("Test"); }
|
||||
5
tests/cases/conformance/async/es6/asyncMultiFile.ts
Normal file
5
tests/cases/conformance/async/es6/asyncMultiFile.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
// @target: es6
|
||||
// @filename: a.ts
|
||||
async function f() {}
|
||||
// @filename: b.ts
|
||||
function g() { }
|
||||
60
tests/cases/fourslash/breakpointValidationDecorators.ts
Normal file
60
tests/cases/fourslash/breakpointValidationDecorators.ts
Normal file
@@ -0,0 +1,60 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
// @BaselineFile: bpSpan_decorators.baseline
|
||||
// @Filename: bpSpan_decorators.ts
|
||||
////declare function ClassDecorator1(target: Function): void;
|
||||
////declare function ClassDecorator2(x: number): (target: Function) => void;
|
||||
////declare function PropertyDecorator1(target: Object, key: string | symbol, descriptor?: PropertyDescriptor): void;
|
||||
////declare function PropertyDecorator2(x: number): (target: Object, key: string | symbol, descriptor?: PropertyDescriptor) => void;
|
||||
////declare function ParameterDecorator1(target: Object, key: string | symbol, paramIndex: number): void;
|
||||
////declare function ParameterDecorator2(x: number): (target: Object, key: string | symbol, paramIndex: number) => void;
|
||||
////
|
||||
////@ClassDecorator1
|
||||
////@ClassDecorator2(10)
|
||||
////class Greeter {
|
||||
//// constructor(
|
||||
//// @ParameterDecorator1
|
||||
//// @ParameterDecorator2(20)
|
||||
//// public greeting: string,
|
||||
////
|
||||
//// @ParameterDecorator1
|
||||
//// @ParameterDecorator2(30)
|
||||
//// ...b: string[]) {
|
||||
//// }
|
||||
////
|
||||
//// @PropertyDecorator1
|
||||
//// @PropertyDecorator2(40)
|
||||
//// greet() {
|
||||
//// return "<h1>" + this.greeting + "</h1>";
|
||||
//// }
|
||||
////
|
||||
//// @PropertyDecorator1
|
||||
//// @PropertyDecorator2(50)
|
||||
//// private x: string;
|
||||
////
|
||||
//// @PropertyDecorator1
|
||||
//// @PropertyDecorator2(60)
|
||||
//// private static x1: number = 10;
|
||||
////
|
||||
//// private fn(
|
||||
//// @ParameterDecorator1
|
||||
//// @ParameterDecorator2(70)
|
||||
//// x: number) {
|
||||
//// return this.greeting;
|
||||
//// }
|
||||
////
|
||||
//// @PropertyDecorator1
|
||||
//// @PropertyDecorator2(80)
|
||||
//// get greetings() {
|
||||
//// return this.greeting;
|
||||
//// }
|
||||
////
|
||||
//// set greetings(
|
||||
//// @ParameterDecorator1
|
||||
//// @ParameterDecorator2(90)
|
||||
//// greetings: string) {
|
||||
//// this.greeting = greetings;
|
||||
//// }
|
||||
////}
|
||||
|
||||
verify.baselineCurrentFileBreakpointLocations();
|
||||
Reference in New Issue
Block a user