1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
|
=== tests/cases/compiler/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts ===
interface Robot {
>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 0, 0))
name?: string;
>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 0, 17))
skill?: string;
>skill : Symbol(Robot.skill, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 1, 18))
}
declare var console: {
>console : Symbol(console, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 4, 11))
log(msg: string): void;
>log : Symbol(log, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 4, 22))
>msg : Symbol(msg, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 5, 8))
}
var hello = "hello";
>hello : Symbol(hello, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 7, 3))
var robotA: Robot = { name: "mower", skill: "mowing" };
>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 8, 3))
>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 0, 0))
>name : Symbol(name, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 8, 21))
>skill : Symbol(skill, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 8, 36))
function foo1({ name: nameA = "<NoName>" }: Robot = { }) {
>foo1 : Symbol(foo1, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 8, 55))
>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 0, 17))
>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 10, 15))
>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 0, 0))
console.log(nameA);
>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 4, 22))
>console : Symbol(console, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 4, 11))
>log : Symbol(log, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 4, 22))
>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 10, 15))
}
function foo2({ name: nameB = "<NoName>", skill: skillB = "noSkill" }: Robot = {}) {
>foo2 : Symbol(foo2, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 12, 1))
>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 0, 17))
>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 13, 15))
>skill : Symbol(Robot.skill, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 1, 18))
>skillB : Symbol(skillB, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 13, 41))
>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 0, 0))
console.log(nameB);
>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 4, 22))
>console : Symbol(console, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 4, 11))
>log : Symbol(log, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 4, 22))
>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 13, 15))
}
function foo3({ name = "<NoName>" }: Robot = {}) {
>foo3 : Symbol(foo3, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 15, 1))
>name : Symbol(name, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 16, 15))
>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 0, 0))
console.log(name);
>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 4, 22))
>console : Symbol(console, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 4, 11))
>log : Symbol(log, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 4, 22))
>name : Symbol(name, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 16, 15))
}
foo1(robotA);
>foo1 : Symbol(foo1, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 8, 55))
>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 8, 3))
foo1({ name: "Edger", skill: "cutting edges" });
>foo1 : Symbol(foo1, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 8, 55))
>name : Symbol(name, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 21, 6))
>skill : Symbol(skill, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 21, 21))
foo2(robotA);
>foo2 : Symbol(foo2, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 12, 1))
>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 8, 3))
foo2({ name: "Edger", skill: "cutting edges" });
>foo2 : Symbol(foo2, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 12, 1))
>name : Symbol(name, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 24, 6))
>skill : Symbol(skill, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 24, 21))
foo3(robotA);
>foo3 : Symbol(foo3, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 15, 1))
>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 8, 3))
foo3({ name: "Edger", skill: "cutting edges" });
>foo3 : Symbol(foo3, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 15, 1))
>name : Symbol(name, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 27, 6))
>skill : Symbol(skill, Decl(sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.ts, 27, 21))
|