Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add tests and baselines
  • Loading branch information
Kanchalai Tanglertsampan committed Jun 27, 2016
commit a7cdd38f922d76f6a5122e961f0d2ef221e0f69b
14 changes: 14 additions & 0 deletions tests/baselines/reference/destructuringParameterDeclaration7ES5.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//// [destructuringParameterDeclaration7ES5.ts]

interface ISomething {
foo: string,
bar: string
}

function foo({}, {foo, bar}: ISomething) {}


//// [destructuringParameterDeclaration7ES5.js]
function foo(_a, _b) {
var foo = _b.foo, bar = _b.bar;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
=== tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration7ES5.ts ===

interface ISomething {
>ISomething : Symbol(ISomething, Decl(destructuringParameterDeclaration7ES5.ts, 0, 0))

foo: string,
>foo : Symbol(ISomething.foo, Decl(destructuringParameterDeclaration7ES5.ts, 1, 22))

bar: string
>bar : Symbol(ISomething.bar, Decl(destructuringParameterDeclaration7ES5.ts, 2, 16))
}

function foo({}, {foo, bar}: ISomething) {}
>foo : Symbol(foo, Decl(destructuringParameterDeclaration7ES5.ts, 4, 1))
>foo : Symbol(foo, Decl(destructuringParameterDeclaration7ES5.ts, 6, 18))
>bar : Symbol(bar, Decl(destructuringParameterDeclaration7ES5.ts, 6, 22))
>ISomething : Symbol(ISomething, Decl(destructuringParameterDeclaration7ES5.ts, 0, 0))

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
=== tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration7ES5.ts ===

interface ISomething {
>ISomething : ISomething

foo: string,
>foo : string

bar: string
>bar : string
}

function foo({}, {foo, bar}: ISomething) {}
>foo : ({}: {}, {foo, bar}: ISomething) => void
>foo : string
>bar : string
>ISomething : ISomething

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// @target: es5

interface ISomething {
foo: string,
bar: string
}

function foo({}, {foo, bar}: ISomething) {}