mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
Merge branch 'master' into vfs
This commit is contained in:
commit
646c32cb09
265 files changed
+4441
-3417
No files matched your search
@@ -13,7 +13,7 @@ module m {
|
||||
export class public2 {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export class c {
|
||||
// getter with annotation
|
||||
get foo1(): private1 {
|
||||
@@ -42,7 +42,7 @@ module m {
|
||||
}
|
||||
set foo5(param: private1) {
|
||||
}
|
||||
|
||||
|
||||
// getter with annotation
|
||||
get foo11(): public1 {
|
||||
return;
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
// @declaration: true
|
||||
// @filename: /a.ts
|
||||
class C {}
|
||||
export { C as D }
|
||||
|
||||
// @filename: /b.ts
|
||||
import * as a from "./a";
|
||||
export default a.D;
|
||||
@@ -0,0 +1,25 @@
|
||||
// https://github.com/Microsoft/TypeScript/issues/19799
|
||||
// @experimentalDecorators: true
|
||||
// @emitDecoratorMetadata: true
|
||||
// @filename: yoha.ts
|
||||
export class Yoha {}
|
||||
|
||||
// @filename: index.ts
|
||||
import {Yoha} from './yoha';
|
||||
|
||||
function foo(...args: any[]) {}
|
||||
|
||||
class Bar {
|
||||
yoha(@foo yoha, bar: Yoha) {}
|
||||
// ^^^^
|
||||
}
|
||||
|
||||
// @filename: index2.ts
|
||||
import {Yoha} from './yoha';
|
||||
|
||||
function foo(...args: any[]) {}
|
||||
|
||||
class Bar {
|
||||
yoha(@foo yoha, ...bar: Yoha[]) {}
|
||||
// ^^^^
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export default interface A {}
|
||||
interface B {}
|
||||
export default B;
|
||||
@@ -0,0 +1,11 @@
|
||||
// @allowJS: true
|
||||
// @outDir: ./out
|
||||
// @module: commonjs
|
||||
// @noEmitHelpers: true
|
||||
// @importHelpers: true
|
||||
// @filename: index.js
|
||||
class Foo {}
|
||||
|
||||
class Bar extends Foo {}
|
||||
|
||||
module.exports = Bar;
|
||||
@@ -0,0 +1,6 @@
|
||||
// @Filename: /a.ts
|
||||
export default abstract class {}
|
||||
|
||||
// @Filename: /b.ts
|
||||
import A from "./a";
|
||||
new A();
|
||||
@@ -0,0 +1,18 @@
|
||||
// https://github.com/Microsoft/TypeScript/issues/8612
|
||||
// @declaration: true
|
||||
// @filename: ThingA.ts
|
||||
export class ThingA { }
|
||||
|
||||
// @filename: ThingB.ts
|
||||
export class ThingB { }
|
||||
|
||||
// @filename: Things.ts
|
||||
export {ThingA} from "./ThingA";
|
||||
export {ThingB} from "./ThingB";
|
||||
|
||||
// @filename: Test.ts
|
||||
import * as things from "./Things";
|
||||
|
||||
export class Test {
|
||||
public method = (input: things.ThingA) => { };
|
||||
}
|
||||
@@ -15,7 +15,7 @@ t = []; // Error
|
||||
t = [1]; // Error
|
||||
t = [1, "hello"]; // Ok
|
||||
t = ["hello", 1]; // Error
|
||||
t = [1, "hello", 2]; // Ok
|
||||
t = [1, "hello", 2]; // Error
|
||||
|
||||
var tf: [string, (x: string) => number] = ["hello", x => x.length];
|
||||
|
||||
|
||||
Reference in new issue
Block a user