mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
merge with origin/master
This commit is contained in:
+13
-14
@@ -108,17 +108,6 @@ var serverCoreSources = [
|
||||
return path.join(serverDirectory, f);
|
||||
});
|
||||
|
||||
var scriptSources = [
|
||||
"tslint/booleanTriviaRule.ts",
|
||||
"tslint/nextLineRule.ts",
|
||||
"tslint/noNullRule.ts",
|
||||
"tslint/preferConstRule.ts",
|
||||
"tslint/typeOperatorSpacingRule.ts",
|
||||
"tslint/noInOperatorRule.ts"
|
||||
].map(function (f) {
|
||||
return path.join(scriptsDirectory, f);
|
||||
});
|
||||
|
||||
var serverSources = serverCoreSources.concat(servicesSources);
|
||||
|
||||
var languageServiceLibrarySources = [
|
||||
@@ -878,7 +867,8 @@ var tslintRules = ([
|
||||
"preferConstRule",
|
||||
"booleanTriviaRule",
|
||||
"typeOperatorSpacingRule",
|
||||
"noInOperatorRule"
|
||||
"noInOperatorRule",
|
||||
"noIncrementDecrementRule"
|
||||
]);
|
||||
var tslintRulesFiles = tslintRules.map(function(p) {
|
||||
return path.join(tslintRuleDir, p + ".ts");
|
||||
@@ -921,11 +911,20 @@ function lintFileAsync(options, path, cb) {
|
||||
});
|
||||
}
|
||||
|
||||
var servicesLintTargets = [
|
||||
"navigateTo.ts",
|
||||
"outliningElementsCollector.ts",
|
||||
"patternMatcher.ts",
|
||||
"services.ts",
|
||||
"shims.ts",
|
||||
].map(function (s) {
|
||||
return path.join(servicesDirectory, s);
|
||||
});
|
||||
var lintTargets = compilerSources
|
||||
.concat(harnessCoreSources)
|
||||
.concat(serverCoreSources)
|
||||
.concat(scriptSources)
|
||||
.concat([path.join(servicesDirectory, "services.ts")]);
|
||||
.concat(tslintRulesFiles)
|
||||
.concat(servicesLintTargets);
|
||||
|
||||
desc("Runs tslint on the compiler sources");
|
||||
task("lint", ["build-rules"], function() {
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
+208
-110
@@ -1,8 +1,8 @@
|
||||
# TypeScript Language Specification
|
||||
|
||||
Version 1.6
|
||||
Version 1.8
|
||||
|
||||
August, 2015
|
||||
January, 2016
|
||||
|
||||
<br/>
|
||||
|
||||
@@ -58,8 +58,8 @@ TypeScript is a trademark of Microsoft Corporation.
|
||||
* [3.6 Type Parameters](#3.6)
|
||||
* [3.6.1 Type Parameter Lists](#3.6.1)
|
||||
* [3.6.2 Type Argument Lists](#3.6.2)
|
||||
* [3.6.3 This-types](#3.6.3)
|
||||
* [3.7 Named Types](#3.7)
|
||||
* [3.7.1 Instance Types](#3.7.1)
|
||||
* [3.8 Specifying Types](#3.8)
|
||||
* [3.8.1 Predefined Types](#3.8.1)
|
||||
* [3.8.2 Type References](#3.8.2)
|
||||
@@ -71,6 +71,7 @@ TypeScript is a trademark of Microsoft Corporation.
|
||||
* [3.8.8 Function Type Literals](#3.8.8)
|
||||
* [3.8.9 Constructor Type Literals](#3.8.9)
|
||||
* [3.8.10 Type Queries](#3.8.10)
|
||||
* [3.8.11 This-Type References](#3.8.11)
|
||||
* [3.9 Specifying Members](#3.9)
|
||||
* [3.9.1 Property Signatures](#3.9.1)
|
||||
* [3.9.2 Call Signatures](#3.9.2)
|
||||
@@ -158,7 +159,8 @@ TypeScript is a trademark of Microsoft Corporation.
|
||||
* [6.5 Generic Functions](#6.5)
|
||||
* [6.6 Code Generation](#6.6)
|
||||
* [6.7 Generator Functions](#6.7)
|
||||
* [6.8 Type Guard Functions](#6.8)
|
||||
* [6.8 Asynchronous Functions](#6.8)
|
||||
* [6.9 Type Guard Functions](#6.9)
|
||||
* [7 Interfaces](#7)
|
||||
* [7.1 Interface Declarations](#7.1)
|
||||
* [7.2 Declaration Merging](#7.2)
|
||||
@@ -184,9 +186,10 @@ TypeScript is a trademark of Microsoft Corporation.
|
||||
* [8.4.3 Member Accessor Declarations](#8.4.3)
|
||||
* [8.4.4 Dynamic Property Declarations](#8.4.4)
|
||||
* [8.5 Index Member Declarations](#8.5)
|
||||
* [8.6 Code Generation](#8.6)
|
||||
* [8.6.1 Classes Without Extends Clauses](#8.6.1)
|
||||
* [8.6.2 Classes With Extends Clauses](#8.6.2)
|
||||
* [8.6 Decorators](#8.6)
|
||||
* [8.7 Code Generation](#8.7)
|
||||
* [8.7.1 Classes Without Extends Clauses](#8.7.1)
|
||||
* [8.7.2 Classes With Extends Clauses](#8.7.2)
|
||||
* [9 Enums](#9)
|
||||
* [9.1 Enum Declarations](#9.1)
|
||||
* [9.2 Enum Members](#9.2)
|
||||
@@ -238,9 +241,9 @@ TypeScript is a trademark of Microsoft Corporation.
|
||||
|
||||
JavaScript applications such as web e-mail, maps, document editing, and collaboration tools are becoming an increasingly important part of the everyday computing. We designed TypeScript to meet the needs of the JavaScript programming teams that build and maintain large JavaScript programs. TypeScript helps programming teams to define interfaces between software components and to gain insight into the behavior of existing JavaScript libraries. TypeScript also enables teams to reduce naming conflicts by organizing their code into dynamically-loadable modules. TypeScript's optional type system enables JavaScript programmers to use highly-productive development tools and practices: static checking, symbol-based navigation, statement completion, and code re-factoring.
|
||||
|
||||
TypeScript is a syntactic sugar for JavaScript. TypeScript syntax is a superset of ECMAScript 6 (ES6) syntax. Every JavaScript program is also a TypeScript program. The TypeScript compiler performs only file-local transformations on TypeScript programs and does not re-order variables declared in TypeScript. This leads to JavaScript output that closely matches the TypeScript input. TypeScript does not transform variable names, making tractable the direct debugging of emitted JavaScript. TypeScript optionally provides source maps, enabling source-level debugging. TypeScript tools typically emit JavaScript upon file save, preserving the test, edit, refresh cycle commonly used in JavaScript development.
|
||||
TypeScript is a syntactic sugar for JavaScript. TypeScript syntax is a superset of ECMAScript 2015 (ES2015) syntax. Every JavaScript program is also a TypeScript program. The TypeScript compiler performs only file-local transformations on TypeScript programs and does not re-order variables declared in TypeScript. This leads to JavaScript output that closely matches the TypeScript input. TypeScript does not transform variable names, making tractable the direct debugging of emitted JavaScript. TypeScript optionally provides source maps, enabling source-level debugging. TypeScript tools typically emit JavaScript upon file save, preserving the test, edit, refresh cycle commonly used in JavaScript development.
|
||||
|
||||
TypeScript syntax includes all features of ECMAScript 6 (ES6), including classes and modules, and provides the ability to translate these features into ECMAScript 3 or 5 compliant code.
|
||||
TypeScript syntax includes all features of ECMAScript 2015, including classes and modules, and provides the ability to translate these features into ECMAScript 3 or 5 compliant code.
|
||||
|
||||
Classes enable programmers to express common object-oriented patterns in a standard way, making features like inheritance more readable and interoperable. Modules enable programmers to organize their code into components while avoiding naming conflicts. The TypeScript compiler provides module code generation options that support either static or dynamic loading of module contents.
|
||||
|
||||
@@ -262,7 +265,7 @@ function f() {
|
||||
|
||||
To benefit from this inference, a programmer can use the TypeScript language service. For example, a code editor can incorporate the TypeScript language service and use the service to find the members of a string object as in the following screen shot.
|
||||
|
||||
/
|
||||
  
|
||||
|
||||
In this example, the programmer benefits from type inference without providing type annotations. Some beneficial tools, however, do require the programmer to provide type annotations. In TypeScript, we can express a parameter requirement as in the following code fragment.
|
||||
|
||||
@@ -410,7 +413,7 @@ This signature denotes that a function may be passed as the parameter of the '$'
|
||||
|
||||
A typical client would not need to add any additional typing but could just use a community-supplied typing to discover (through statement completion with documentation tips) and verify (through static checking) correct use of the library, as in the following screen shot.
|
||||
|
||||
/
|
||||
  
|
||||
|
||||
Section [3.3](#3.3) provides additional information about object types.
|
||||
|
||||
@@ -474,7 +477,7 @@ Section [4.23](#4.23) provides additional information about contextually typed e
|
||||
|
||||
## <a name="1.6"/>1.6 Classes
|
||||
|
||||
JavaScript practice has two very common design patterns: the module pattern and the class pattern. Roughly speaking, the module pattern uses closures to hide names and to encapsulate private data, while the class pattern uses prototype chains to implement many variations on object-oriented inheritance mechanisms. Libraries such as 'prototype.js' are typical of this practice. TypeScript's namespaces are a formalization of the module pattern. (The term "module pattern" is somewhat unfortunate now that ECMAScript 6 formally supports modules in a manner different from what the module pattern prescribes. For this reason, TypeScript uses the term "namespace" for its formalization of the module pattern.)
|
||||
JavaScript practice has two very common design patterns: the module pattern and the class pattern. Roughly speaking, the module pattern uses closures to hide names and to encapsulate private data, while the class pattern uses prototype chains to implement many variations on object-oriented inheritance mechanisms. Libraries such as 'prototype.js' are typical of this practice. TypeScript's namespaces are a formalization of the module pattern. (The term "module pattern" is somewhat unfortunate now that ECMAScript 2015 formally supports modules in a manner different from what the module pattern prescribes. For this reason, TypeScript uses the term "namespace" for its formalization of the module pattern.)
|
||||
|
||||
This section and the namespace section below will show how TypeScript emits consistent, idiomatic JavaScript when emitting ECMAScript 3 or 5 compliant code for classes and namespaces. The goal of TypeScript's translation is to emit exactly what a programmer would type when implementing a class or namespace unaided by a tool. This section will also describe how TypeScript infers a type for each class declaration. We'll start with a simple BankAccount class.
|
||||
|
||||
@@ -627,7 +630,7 @@ An important goal of TypeScript is to provide accurate and straightforward types
|
||||
|
||||
JavaScript programming interfaces often include functions whose behavior is discriminated by a string constant passed to the function. The Document Object Model makes heavy use of this pattern. For example, the following screen shot shows that the 'createElement' method of the 'document' object has multiple signatures, some of which identify the types returned when specific strings are passed into the method.
|
||||
|
||||
/
|
||||
  
|
||||
|
||||
The following code fragment uses this feature. Because the 'span' variable is inferred to have the type 'HTMLSpanElement', the code can reference without static error the 'isMultiline' property of 'span'.
|
||||
|
||||
@@ -638,7 +641,7 @@ span.isMultiLine = false; // OK: HTMLSpanElement has isMultiline property
|
||||
|
||||
In the following screen shot, a programming tool combines information from overloading on string parameters with contextual typing to infer that the type of the variable 'e' is 'MouseEvent' and that therefore 'e' has a 'clientX' property.
|
||||
|
||||
/
|
||||
  
|
||||
|
||||
Section [3.9.2.4](#3.9.2.4) provides details on how to use string literals in function signatures.
|
||||
|
||||
@@ -773,13 +776,13 @@ In this case, the compiler assumes that the namespace object resides in global v
|
||||
|
||||
## <a name="1.11"/>1.11 Modules
|
||||
|
||||
TypeScript also supports ECMAScript 6 modules, which are files that contain top-level *export* and *import* directives. For this type of module the TypeScript compiler can emit both ECMAScript 6 compliant code and down-level ECMAScript 3 or 5 compliant code for a variety of module loading systems, including CommonJS, Asynchronous Module Definition (AMD), and Universal Module Definition (UMD).
|
||||
TypeScript also supports ECMAScript 2015 modules, which are files that contain top-level *export* and *import* directives. For this type of module the TypeScript compiler can emit both ECMAScript 2015 compliant code and down-level ECMAScript 3 or 5 compliant code for a variety of module loading systems, including CommonJS, Asynchronous Module Definition (AMD), and Universal Module Definition (UMD).
|
||||
|
||||
<br/>
|
||||
|
||||
# <a name="2"/>2 Basic Concepts
|
||||
|
||||
The remainder of this document is the formal specification of the TypeScript programming language and is intended to be read as an adjunct to the [ECMAScript Language Specification](http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf) (specifically, the ECMA-262 Standard, 6th Edition). This document describes the syntactic grammar added by TypeScript along with the compile-time processing and type checking performed by the TypeScript compiler, but it only minimally discusses the run-time behavior of programs since that is covered by the ECMAScript specification.
|
||||
The remainder of this document is the formal specification of the TypeScript programming language and is intended to be read as an adjunct to the [ECMAScript 2015 Language Specification](http://www.ecma-international.org/ecma-262/6.0/) (specifically, the ECMA-262 Standard, 6th Edition). This document describes the syntactic grammar added by TypeScript along with the compile-time processing and type checking performed by the TypeScript compiler, but it only minimally discusses the run-time behavior of programs since that is covered by the ECMAScript specification.
|
||||
|
||||
## <a name="2.1"/>2.1 Grammar Conventions
|
||||
|
||||
@@ -866,7 +869,7 @@ A property name can be any identifier (including a reserved word), a string lite
|
||||
|
||||
### <a name="2.2.3"/>2.2.3 Computed Property Names
|
||||
|
||||
ECMAScript 6 permits object literals and classes to declare members with computed property names. A computed property name specifies an expression that computes the actual property name at run-time. Because the final property name isn't known at compile-time, TypeScript can only perform limited checks for entities declared with computed property names. However, a subset of computed property names known as ***well-known symbols*** can be used anywhere a *PropertyName* is expected, including property names within types. A computed property name is a well-known symbol if it is of the form
|
||||
ECMAScript 2015 permits object literals and classes to declare members with computed property names. A computed property name specifies an expression that computes the actual property name at run-time. Because the final property name isn't known at compile-time, TypeScript can only perform limited checks for entities declared with computed property names. However, a subset of computed property names known as ***well-known symbols*** can be used anywhere a *PropertyName* is expected, including property names within types. A computed property name is a well-known symbol if it is of the form
|
||||
|
||||
```TypeScript
|
||||
[ Symbol . xxx ]
|
||||
@@ -884,6 +887,8 @@ interface Iterable<T> {
|
||||
}
|
||||
```
|
||||
|
||||
*TODO: Update to reflect treatment of [computed property names with literal expressions](https://github.com/Microsoft/TypeScript/pull/5535)*.
|
||||
|
||||
## <a name="2.3"/>2.3 Declarations
|
||||
|
||||
Declarations introduce names in their associated ***declaration spaces***. A name must be unique in its declaration space and can denote a ***value***, a ***type***, or a ***namespace***, or some combination thereof. Effectively, a single name can have as many as three distinct meanings. For example:
|
||||
@@ -913,7 +918,7 @@ Declarations introduce the following meanings for the name they declare:
|
||||
|
||||
* A variable, parameter, function, generator, member variable, member function, member accessor, or enum member declaration introduces a value meaning.
|
||||
* An interface, type alias, or type parameter declaration introduces a type meaning.
|
||||
* A class declaration introduces a value meaning (the constructor function) and a type meaning (the class instance type).
|
||||
* A class declaration introduces a value meaning (the constructor function) and a type meaning (the class type).
|
||||
* An enum declaration introduces a value meaning (the enum instance) and a type meaning (the enum type).
|
||||
* A namespace declaration introduces a namespace meaning (the type and namespace container) and, if the namespace is instantiated (section [10.1](#10.1)), a value meaning (the namespace instance).
|
||||
* An import or export declaration introduces the meaning(s) of the imported or exported entity.
|
||||
@@ -996,7 +1001,9 @@ When an identifier is resolved as a *TypeName* (section [3.8.2](#3.8.2)), only n
|
||||
|
||||
When an identifier is resolved as a *NamespaceName* (section [3.8.2](#3.8.2)), only names in scope with a namespace meaning are considered and other names are ignored.
|
||||
|
||||
Note that class members are never directly in scope—they can only be accessed by applying the dot ('.') operator to a class instance. This even includes members of the current instance in a constructor or member function, which are accessed by applying the dot operator to `this`.
|
||||
*TODO: [Include specific rules for alias resolution](https://github.com/Microsoft/TypeScript/issues/3158)*.
|
||||
|
||||
Note that class and interface members are never directly in scope—they can only be accessed by applying the dot ('.') operator to a class or interface instance. This even includes members of the current instance in a constructor or member function, which are accessed by applying the dot operator to `this`.
|
||||
|
||||
As the rules above imply, locally declared entities in a namespace are closer in scope than exported entities declared in other namespace declarations for the same namespace. For example:
|
||||
|
||||
@@ -1121,7 +1128,7 @@ var c = abc.charAt(2); // Property of String interface
|
||||
|
||||
The Symbol primitive type corresponds to the similarly named JavaScript primitive type and represents unique tokens that may be used as keys for object properties.
|
||||
|
||||
The `symbol` keyword references the Symbol primitive type. Symbol values are obtained using the global object 'Symbol' which has a number of methods and properties and can be invoked as a function. In particular, the global object 'Symbol' defines a number of well-known symbols ([2.2.3](#2.2.3)) that can be used in a manner similar to identifiers. Note that the 'Symbol' object is available only in ECMAScript 6 environments.
|
||||
The `symbol` keyword references the Symbol primitive type. Symbol values are obtained using the global object 'Symbol' which has a number of methods and properties and can be invoked as a function. In particular, the global object 'Symbol' defines a number of well-known symbols ([2.2.3](#2.2.3)) that can be used in a manner similar to identifiers. Note that the 'Symbol' object is available only in ECMAScript 2015 environments.
|
||||
|
||||
For purposes of determining type relationships (section [3.11](#3.11)) and accessing properties (section [4.13](#4.13)), the Symbol primitive type behaves as an object type with the same properties as the global interface type 'Symbol'.
|
||||
|
||||
@@ -1186,6 +1193,8 @@ Specialized signatures (section [3.9.2.4](#3.9.2.4)) permit string literals to b
|
||||
|
||||
All string literal types are subtypes of the String primitive type.
|
||||
|
||||
*TODO: Update to reflect [expanded support for string literal types](https://github.com/Microsoft/TypeScript/pull/5185)*.
|
||||
|
||||
## <a name="3.3"/>3.3 Object Types
|
||||
|
||||
Object types are composed from properties, call signatures, construct signatures, and index signatures, collectively called members.
|
||||
@@ -1352,7 +1361,7 @@ var b = x.b; // b has type number
|
||||
var c = x.c; // Error, no property c in union type
|
||||
```
|
||||
|
||||
Note that 'x.a' has a union type because the type of 'a' is different in 'A' and 'B', whereas 'x.b' simply has type number because that is the type of 'b' in both 'A' and 'B'. Also note that there is no property 'x.c' because only 'A' has a property 'c'.
|
||||
Note that 'x.a' has a union type because the type of 'a' is different in 'A' and 'B', whereas 'x.b' simply has type number because that is the type of 'b' in both 'A' and 'B'. Also note that there is no property 'x.c' because only 'B' has a property 'c'.
|
||||
|
||||
When used as a contextual type (section [4.23](#4.23)), a union type has those members that are present in any of its constituent types, with types that are unions of the respective members in the constituent types. Specifically, a union type used as a contextual type has the apparent members defined in section [3.11.1](#3.11.1), except that a particular member need only be present in one or more constituent types instead of all constituent types.
|
||||
|
||||
@@ -1437,7 +1446,7 @@ Type parameter names must be unique. A compile-time error occurs if two or more
|
||||
|
||||
The scope of a type parameter extends over the entire declaration with which the type parameter list is associated, with the exception of static member declarations in classes.
|
||||
|
||||
Each type parameter has an associated type parameter ***constraint*** that establishes an upper bound for type arguments. Omitting a constraint or specifying type `any` as the constraint corresponds to specifying the empty object type `{}`. Type parameters declared in a particular type parameter list may not be referenced in constraints in that type parameter list.
|
||||
A type parameter may have an associated type parameter ***constraint*** that establishes an upper bound for type arguments. Type parameters may be referenced in type parameter constraints within the same type parameter list, including even constraint declarations that occur to the left of the type parameter.
|
||||
|
||||
The ***base constraint*** of a type parameter *T* is defined as follows:
|
||||
|
||||
@@ -1448,15 +1457,21 @@ The ***base constraint*** of a type parameter *T* is defined as follows:
|
||||
In the example
|
||||
|
||||
```TypeScript
|
||||
interface G<T, U extends Function> {
|
||||
f<V extends U>(x: V): V;
|
||||
}
|
||||
interface G<T, U extends V, V extends Function> { }
|
||||
```
|
||||
|
||||
the base constraint of 'T' is the empty object type, and the base constraint of 'U' and 'V' is 'Function'.
|
||||
the base constraint of 'T' is the empty object type and the base constraint of 'U' and 'V' is 'Function'.
|
||||
|
||||
For purposes of determining type relationships (section [3.11](#3.11)), type parameters appear to be subtypes of their base constraint. Likewise, in property accesses (section [4.13](#4.13)), `new` operations (section [4.14](#4.14)), and function calls (section [4.15](#4.15)), type parameters appear to have the members of their base constraint, but no other members.
|
||||
|
||||
It is an error for a type parameter to directly or indirectly be a constraint for itself. For example, both of the following declarations are invalid:
|
||||
|
||||
```TypeScript
|
||||
interface A<T extends T> { }
|
||||
|
||||
interface B<T extends U, U extends T> { }
|
||||
```
|
||||
|
||||
### <a name="3.6.2"/>3.6.2 Type Argument Lists
|
||||
|
||||
A type reference (section [3.8.2](#3.8.2)) to a generic type must include a list of type arguments enclosed in angle brackets and separated by commas. Similarly, a call (section [4.15](#4.15)) to a generic function may explicitly include a type argument list instead of relying on type inference.
|
||||
@@ -1471,7 +1486,7 @@ A type reference (section [3.8.2](#3.8.2)) to a generic type must include a list
|
||||
  *TypeArgument:*
|
||||
   *Type*
|
||||
|
||||
Type arguments correspond one-to-one with type parameters of the generic type or function being referenced. A type argument list is required to specify exactly one type argument for each corresponding type parameter, and each type argument is required to ***satisfy*** the constraint of its corresponding type parameter. A type argument satisfies a type parameter constraint if the type argument is assignable to (section [3.11.4](#3.11.4)) the constraint type once type arguments are substituted for type parameters.
|
||||
Type arguments correspond one-to-one with type parameters of the generic type or function being referenced. A type argument list is required to specify exactly one type argument for each corresponding type parameter, and each type argument for a constrained type parameter is required to ***satisfy*** the constraint of that type parameter. A type argument satisfies a type parameter constraint if the type argument is assignable to (section [3.11.4](#3.11.4)) the constraint type once type arguments are substituted for type parameters.
|
||||
|
||||
Given the declaration
|
||||
|
||||
@@ -1483,6 +1498,33 @@ a type reference of the form 'G<A, B>' places no requirements on 'A' but requ
|
||||
|
||||
The process of substituting type arguments for type parameters in a generic type or generic signature is known as ***instantiating*** the generic type or signature. Instantiation of a generic type or signature can fail if the supplied type arguments do not satisfy the constraints of their corresponding type parameters.
|
||||
|
||||
### <a name="3.6.3"/>3.6.3 This-types
|
||||
|
||||
Every class and interface has a ***this-type*** that represents the actual type of instances of the class or interface within the declaration of the class or interface. The this-type is referenced using the keyword `this` in a type position. Within instance methods and constructors of a class, the type of the expression `this` (section [4.2](#4.2)) is the this-type of the class.
|
||||
|
||||
Classes and interfaces support inheritance and therefore the instance represented by `this` in a method isn't necessarily an instance of the containing class—it may in fact be an instance of a derived class or interface. To model this relationship, the this-type of a class or interface is classified as a type parameter. Unlike other type parameters, it is not possible to explicitly pass a type argument for a this-type. Instead, in a type reference to a class or interface type, the type reference *itself* is implicitly passed as a type argument for the this-type. For example:
|
||||
|
||||
```TypeScript
|
||||
class A {
|
||||
foo() {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
bar() {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
let b: B;
|
||||
let x = b.foo().bar(); // Fluent pattern works, type of x is B
|
||||
```
|
||||
|
||||
In the declaration of `b` above, the type reference `B` is itself passed as a type argument for B's this-type. Thus, the referenced type is an instantiation of class `B` where all occurrences of the type `this` are replaced with `B`, and for that reason the `foo` method of `B` actually returns `B` (as opposed to `A`).
|
||||
|
||||
The this-type of a given class or interface type *C* implicitly has a constraint consisting of a type reference to *C* with *C*'s own type parameters passed as type arguments and with that type reference passed as the type argument for the this-type.
|
||||
|
||||
## <a name="3.7"/>3.7 Named Types
|
||||
|
||||
Classes, interfaces, enums, and type aliases are ***named types*** that are introduced through class declarations (section [8.1](#8.1)), interface declarations (section [7.1](#7.1)), enum declarations ([9.1](#9.1)), and type alias declarations (section [3.10](#3.10)). Classes, interfaces, and type aliases may have type parameters and are then called ***generic types***. Conversely, named types without type parameters are called ***non-generic types***.
|
||||
@@ -1511,21 +1553,6 @@ is indistinguishable from the type
|
||||
{ first: string; second: Entity; }
|
||||
```
|
||||
|
||||
### <a name="3.7.1"/>3.7.1 Instance Types
|
||||
|
||||
Each class and interface has an associated actual type known as the ***instance type***. For a non-generic class or interface, the instance type is simply a type reference to the class or interface. For a generic class or interface, the instance type is an instantiation of the generic type where each of the type arguments is the corresponding type parameter. Since the instance type uses the type parameters it can be used only where the type parameters are in scope—that is, inside the declaration of the class or interface. Within the constructor and instance member functions of a class, the type of `this` is the instance type of the class.
|
||||
|
||||
The following example illustrates the concept of an instance type:
|
||||
|
||||
```TypeScript
|
||||
class G<T> { // Introduce type parameter T
|
||||
self: G<T>; // Use T as type argument to form instance type
|
||||
f() {
|
||||
this.self = this; // self and this are both of type G<T>
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## <a name="3.8"/>3.8 Specifying Types
|
||||
|
||||
Types are specified either by referencing their keyword or name, or by writing object type literals, array type literals, tuple type literals, function type literals, constructor type literals, or type queries.
|
||||
@@ -1550,7 +1577,8 @@ Types are specified either by referencing their keyword or name, or by writing o
|
||||
   *ObjectType*
|
||||
   *ArrayType*
|
||||
   *TupleType*
|
||||
   *TypeQuery*
|
||||
   *TypeQuery*
|
||||
   *ThisType*
|
||||
|
||||
  *ParenthesizedType:*
|
||||
   `(` *Type* `)`
|
||||
@@ -1711,7 +1739,7 @@ A union type literal is written as a sequence of types separated by vertical bar
|
||||
  *UnionType:*
|
||||
   *UnionOrIntersectionOrPrimaryType* `|` *IntersectionOrPrimaryType*
|
||||
|
||||
A union typle literal references a union type (section [3.4](#3.4)).
|
||||
A union type literal references a union type (section [3.4](#3.4)).
|
||||
|
||||
### <a name="3.8.7"/>3.8.7 Intersection Type Literals
|
||||
|
||||
@@ -1720,7 +1748,7 @@ An intersection type literal is written as a sequence of types separated by ampe
|
||||
  *IntersectionType:*
|
||||
   *IntersectionOrPrimaryType* `&` *PrimaryType*
|
||||
|
||||
An intersection typle literal references an intersection type (section [3.5](#3.5)).
|
||||
An intersection type literal references an intersection type (section [3.5](#3.5)).
|
||||
|
||||
### <a name="3.8.8"/>3.8.8 Function Type Literals
|
||||
|
||||
@@ -1804,6 +1832,41 @@ var h: () => typeof h;
|
||||
|
||||
Here, 'g' and 'g.x' have the same recursive type, and likewise 'h' and 'h()' have the same recursive type.
|
||||
|
||||
### <a name="3.8.11"/>3.8.11 This-Type References
|
||||
|
||||
The `this` keyword is used to reference the this-type (section [3.6.3](#3.6.3)) of a class or interface.
|
||||
|
||||
  *ThisType:*
|
||||
   `this`
|
||||
|
||||
The meaning of a *ThisType* depends on the closest enclosing *FunctionDeclaration*, *FunctionExpression*, *PropertyDefinition*, *ClassElement*, or *TypeMember*, known as the root declaration of the *ThisType*, as follows:
|
||||
|
||||
* When the root declaration is an instance member or constructor of a class, the *ThisType* references the this-type of that class.
|
||||
* When the root declaration is a member of an interface type, the *ThisType* references the this-type of that interface.
|
||||
* Otherwise, the *ThisType* is an error.
|
||||
|
||||
Note that in order to avoid ambiguities it is not possible to reference the this-type of a class or interface in a nested object type literal. In the example
|
||||
|
||||
```TypeScript
|
||||
interface ListItem {
|
||||
getHead(): this;
|
||||
getTail(): this;
|
||||
getHeadAndTail(): { head: this, tail: this }; // Error
|
||||
}
|
||||
```
|
||||
|
||||
the `this` references on the last line are in error because their root declarations are not members of a class or interface. The recommended way to reference the this-type of an outer class or interface in an object type literal is to declare an intermediate generic type and pass `this` as a type argument. For example:
|
||||
|
||||
```TypeScript
|
||||
type HeadAndTail<T> = { head: T, tail: T };
|
||||
|
||||
interface ListItem {
|
||||
getHead(): this;
|
||||
getTail(): this;
|
||||
getHeadAndTail(): HeadAndTail<this>;
|
||||
}
|
||||
```
|
||||
|
||||
## <a name="3.9"/>3.9 Specifying Members
|
||||
|
||||
The members of an object type literal (section [3.8.3](#3.8.3)) are specified as a combination of property, call, construct, index, and method signatures.
|
||||
@@ -1931,6 +1994,8 @@ A parameter can be marked optional by following its name or binding pattern with
|
||||
|
||||
*TODO: Update to reflect [binding parameter cannot be optional in implementation signature](https://github.com/Microsoft/TypeScript/issues/2797)*.
|
||||
|
||||
*TODO: Update to reflect [required parameters support initializers](https://github.com/Microsoft/TypeScript/pull/4022)*.
|
||||
|
||||
#### <a name="3.9.2.3"/>3.9.2.3 Return Type
|
||||
|
||||
If present, a call signature's return type annotation specifies the type of the value computed and returned by a call operation. A `void` return type annotation is used to indicate that a function has no return value.
|
||||
@@ -2122,8 +2187,9 @@ Types in TypeScript have identity, subtype, supertype, and assignment compatibil
|
||||
|
||||
The ***apparent members*** of a type are the members observed in subtype, supertype, and assignment compatibility relationships, as well as in the type checking of property accesses (section [4.13](#4.13)), `new` operations (section [4.14](#4.14)), and function calls (section [4.15](#4.15)). The apparent members of a type are determined as follows:
|
||||
|
||||
* The apparent members of the primitive types Number, Boolean, and String are the apparent members of the global interface types 'Number', 'Boolean', and 'String' respectively.
|
||||
* The apparent members of an enum type are the apparent members of the global interface type 'Number'.
|
||||
* The apparent members of the primitive type Number and all enum types are the apparent members of the global interface type 'Number'.
|
||||
* The apparent members of the primitive type Boolean are the apparent members of the global interface type 'Boolean'.
|
||||
* The apparent members of the primitive type String and all string literal types are the apparent members of the global interface type 'String'.
|
||||
* The apparent members of a type parameter are the apparent members of the constraint (section [3.6.1](#3.6.1)) of that type parameter.
|
||||
* The apparent members of an object type *T* are the combination of the following:
|
||||
* The declared and/or inherited members of *T*.
|
||||
@@ -2239,7 +2305,7 @@ Types are required to be assignment compatible in certain circumstances, such as
|
||||
* *S* or *T* is the Any type.
|
||||
* *S* is the Undefined type.
|
||||
* *S* is the Null type and *T* is not the Undefined type.
|
||||
* *S* or *T* is an enum type and* *the other is the primitive type Number.
|
||||
* *S* or *T* is an enum type and the other is the primitive type Number.
|
||||
* *S* is a string literal type and *T* is the primitive type String.
|
||||
* *S* is a union type and each constituent type of *S* is assignable to *T*.
|
||||
* *S* is an intersection type and at least one constituent type of *S* is assignable to *T*.
|
||||
@@ -2258,8 +2324,8 @@ Types are required to be assignment compatible in certain circumstances, such as
|
||||
* *M* has a rest parameter or the number of non-optional parameters in *N* is less than or equal to the total number of parameters in *M*,
|
||||
* for parameter positions that are present in both signatures, each parameter type in *N* is assignable to or from the corresponding parameter type in *M*, and
|
||||
* the result type of *M* is Void, or the result type of *N* is assignable to that of *M*.
|
||||
* *M* is a string index signature of type *U* and *S* has an apparent string index signature of a type that is assignable to *U*.
|
||||
* *M* is a numeric index signature of type *U* and *S* has an apparent string or numeric index signature of a type that is assignable to *U*.
|
||||
* *M* is a string index signature of type *U*, and *U* is the Any type or *S* has an apparent string index signature of a type that is assignable to *U*.
|
||||
* *M* is a numeric index signature of type *U*, and *U* is the Any type or *S* has an apparent string or numeric index signature of a type that is assignable to *U*.
|
||||
|
||||
When comparing call or construct signatures, parameter names are ignored and rest parameters correspond to an unbounded expansion of optional parameters of the rest parameter element type.
|
||||
|
||||
@@ -2366,6 +2432,8 @@ In certain contexts, inferences for a given set of type parameters are made *fro
|
||||
|
||||
When comparing call or construct signatures, signatures in *S* correspond to signatures of the same kind in *T* pairwise in declaration order. If *S* and *T* have different numbers of a given kind of signature, the excess *first* signatures in declaration order of the longer list are ignored.
|
||||
|
||||
*TODO: Update to reflect [improved union and intersection type inference](https://github.com/Microsoft/TypeScript/pull/5738)*.
|
||||
|
||||
### <a name="3.11.8"/>3.11.8 Recursive Types
|
||||
|
||||
Classes and interfaces can reference themselves in their internal structure, in effect creating recursive types with infinite nesting. For example, the type
|
||||
@@ -2443,7 +2511,7 @@ Expressions are classified as ***values*** or ***references***. References are t
|
||||
|
||||
The type of `this` in an expression depends on the location in which the reference takes place:
|
||||
|
||||
* In a constructor, instance member function, instance member accessor, or instance member variable initializer, `this` is of the class instance type of the containing class.
|
||||
* In a constructor, instance member function, instance member accessor, or instance member variable initializer, `this` is of the this-type (section [3.6.3](#3.6.3)) of the containing class.
|
||||
* In a static member function or static member accessor, the type of `this` is the constructor function type of the containing class.
|
||||
* In a function declaration or a function expression, `this` is of type Any.
|
||||
* In the global namespace, `this` is of type Any.
|
||||
@@ -2569,6 +2637,8 @@ The resulting type an array literal expression is determined as follows:
|
||||
|
||||
A spread element must specify an expression of an array-like type (section [3.3.2](#3.3.2)), or otherwise an error occurs.
|
||||
|
||||
*TODO: The compiler currently doesn't support applying the spread operator to a string (to spread the individual characters of a string into a string array). This will eventually be allowed, but only when the code generation target is ECMAScript 2015 or later*.
|
||||
|
||||
*TODO: Document spreading an [iterator](https://github.com/Microsoft/TypeScript/pull/2498) into an array literal*.
|
||||
|
||||
The rules above mean that an array literal is always of an array type, unless it is contextually typed by a tuple-like type. For example
|
||||
@@ -2619,7 +2689,7 @@ A super call invokes the constructor of the base class on the instance reference
|
||||
|
||||
The type of a super call expression is Void.
|
||||
|
||||
The JavaScript code generated for a super call is specified in section [8.6.2](#8.6.2).
|
||||
The JavaScript code generated for a super call is specified in section [8.7.2](#8.7.2).
|
||||
|
||||
### <a name="4.9.2"/>4.9.2 Super Property Access
|
||||
|
||||
@@ -2632,7 +2702,7 @@ Super property accesses are not permitted in other contexts, and it is not possi
|
||||
|
||||
Super property accesses are typically used to access overridden base class member functions from derived class member functions. For an example of this, see section [8.4.2](#8.4.2).
|
||||
|
||||
The JavaScript code generated for a super property access is specified in section [8.6.2](#8.6.2).
|
||||
The JavaScript code generated for a super property access is specified in section [8.7.2](#8.7.2).
|
||||
|
||||
*TODO: Update section to include [bracket notation in super property access](https://github.com/Microsoft/TypeScript/issues/3970)*.
|
||||
|
||||
@@ -2777,7 +2847,7 @@ object . name
|
||||
where *object* is an expression and *name* is an identifier (including, possibly, a reserved word), is used to access the property with the given name on the given object. A dot notation property access is processed as follows at compile-time:
|
||||
|
||||
* If *object* is of type Any, any *name* is permitted and the property access is of type Any.
|
||||
* Otherwise, if *name* denotes an accessible apparent property (section [3.11.1](#3.11.1)) in the type of *object*, the property access is of the type of that property. Public members are always accessible, but private and protected members of a class have restricted accessibility, as described in [8.2.2](#8.2.2).
|
||||
* Otherwise, if *name* denotes an accessible apparent property (section [3.11.1](#3.11.1)) in the widened type (section [3.12](#3.12)) of *object*, the property access is of the type of that property. Public members are always accessible, but private and protected members of a class have restricted accessibility, as described in [8.2.2](#8.2.2).
|
||||
* Otherwise, the property access is invalid and a compile-time error occurs.
|
||||
|
||||
A bracket notation property access of the form
|
||||
@@ -2892,7 +2962,7 @@ Given a signature < *T<sub>1</sub>* , *T<sub>2</sub>* , … , *T<sub>n</sub>*
|
||||
Type argument inference produces a set of candidate types for each type parameter. Given a type parameter *T* and set of candidate types, the actual inferred type argument is determined as follows:
|
||||
|
||||
* If the set of candidate argument types is empty, the inferred type argument for *T* is *T*'s constraint.
|
||||
* Otherwise, if at least one of the candidate types is a supertype of all of the other candidate types, let *C* denote the first such candidate type. If *C* satisfies *T*'s constraint, the inferred type argument for *T* is *C*. Otherwise, the inferred type argument for *T* is *T*'s constraint.
|
||||
* Otherwise, if at least one of the candidate types is a supertype of all of the other candidate types, let *C* denote the widened form (section [3.12](#3.12)) of the first such candidate type. If *C* satisfies *T*'s constraint, the inferred type argument for *T* is *C*. Otherwise, the inferred type argument for *T* is *T*'s constraint.
|
||||
* Otherwise, if no candidate type is a supertype of all of the other candidate types, type inference has fails and no type argument is inferred for *T*.
|
||||
|
||||
In order to compute candidate types, the argument list is processed as follows:
|
||||
@@ -3030,6 +3100,8 @@ if (shape instanceof Circle) {
|
||||
}
|
||||
```
|
||||
|
||||
*TODO: Document [as operator](https://github.com/Microsoft/TypeScript/pull/3564)*.
|
||||
|
||||
## <a name="4.17"/>4.17 JSX Expressions
|
||||
|
||||
*TODO: Document [JSX expressions](https://github.com/Microsoft/TypeScript/issues/3203)*.
|
||||
@@ -3106,6 +3178,8 @@ These operators require their operands to be of type Any, the Number primitive t
|
||||
|String||||||
|
||||
|Other||||||
|
||||
|
||||
*TODO: Document the [exponentation operator](https://github.com/Microsoft/TypeScript/issues/4812)*.
|
||||
|
||||
### <a name="4.19.2"/>4.19.2 The + operator
|
||||
|
||||
The binary + operator requires both operands to be of the Number primitive type or an enum type, or at least one of the operands to be of type Any or the String primitive type. Operands of an enum type are treated as having the primitive type Number. If one operand is the `null` or `undefined` value, it is treated as having the type of the other operand. If both operands are of the Number primitive type, the result is of the Number primitive type. If one or both operands are of the String primitive type, the result is of the String primitive type. Otherwise, the result is of type Any.
|
||||
@@ -3218,7 +3292,7 @@ is subject to the same requirements, and produces a value of the same type, as t
|
||||
|
||||
### <a name="4.21.1"/>4.21.1 Destructuring Assignment
|
||||
|
||||
A ***destructuring assignment*** is an assignment operation in which the left hand operand is a destructuring assignment pattern as defined by the *AssignmentPattern* production in the ECMAScript 6 specification.
|
||||
A ***destructuring assignment*** is an assignment operation in which the left hand operand is a destructuring assignment pattern as defined by the *AssignmentPattern* production in the ECMAScript 2015 specification.
|
||||
|
||||
In a destructuring assignment expression, the type of the expression on the right must be assignable to the assignment target on the left. An expression of type *S* is considered assignable to an assignment target *V* if one of the following is true:
|
||||
|
||||
@@ -3233,9 +3307,11 @@ In a destructuring assignment expression, the type of the expression on the righ
|
||||
* *S* is a tuple-like type (section [3.3.3](#3.3.3)) with a property named *N* of a type that is assignable to the target given in *E*, where *N* is the numeric index of *E* in the array assignment pattern, or
|
||||
* *S* is not a tuple-like type and the numeric index signature type of *S* is assignable to the target given in *E*.
|
||||
|
||||
*TODO: [Update to specify behavior when assignment element E is a rest element](https://github.com/Microsoft/TypeScript/issues/2713)*.
|
||||
|
||||
In an assignment property or element that includes a default value, the type of the default value must be assignable to the target given in the assignment property or element.
|
||||
|
||||
When the output target is ECMAScript 6 or higher, destructuring variable assignments remain unchanged in the emitted JavaScript code. When the output target is ECMAScript 3 or 5, destructuring variable assignments are rewritten to series of simple assignments. For example, the destructuring assignment
|
||||
When the output target is ECMAScript 2015 or higher, destructuring variable assignments remain unchanged in the emitted JavaScript code. When the output target is ECMAScript 3 or 5, destructuring variable assignments are rewritten to series of simple assignments. For example, the destructuring assignment
|
||||
|
||||
```TypeScript
|
||||
var x = 1;
|
||||
@@ -3360,6 +3436,8 @@ In the rules above, when a narrowing operation would remove all constituent type
|
||||
|
||||
Note that type guards affect types of variables and parameters only and have no effect on members of objects such as properties. Also note that it is possible to defeat a type guard by calling a function that changes the type of the guarded variable.
|
||||
|
||||
*TODO: Document [user defined type guard functions](https://github.com/Microsoft/TypeScript/issues/1007)*.
|
||||
|
||||
In the example
|
||||
|
||||
```TypeScript
|
||||
@@ -3432,7 +3510,7 @@ This chapter describes the static type checking TypeScript provides for JavaScri
|
||||
|
||||
## <a name="5.1"/>5.1 Blocks
|
||||
|
||||
Blocks are extended to include local interface, type alias, and enum declarations (classes are already included by the ECMAScript 6 grammar).
|
||||
Blocks are extended to include local interface, type alias, and enum declarations (classes are already included by the ECMAScript 2015 grammar).
|
||||
|
||||
  *Declaration:* *( Modified )*
|
||||
   …
|
||||
@@ -3549,7 +3627,9 @@ The type *T* associated with a binding element is determined as follows:
|
||||
|
||||
When a destructuring variable declaration, binding property, or binding element specifies an initializer expression, the type of the initializer expression is required to be assignable to the widened form of the type associated with the destructuring variable declaration, binding property, or binding element.
|
||||
|
||||
When the output target is ECMAScript 6 or higher, except for removing the optional type annotation, destructuring variable declarations remain unchanged in the emitted JavaScript code.
|
||||
*TODO: Update rules to reflect [improved checking of destructuring with literal initializers](https://github.com/Microsoft/TypeScript/pull/4598)*.
|
||||
|
||||
When the output target is ECMAScript 2015 or higher, except for removing the optional type annotation, destructuring variable declarations remain unchanged in the emitted JavaScript code.
|
||||
|
||||
When the output target is ECMAScript 3 or 5, destructuring variable declarations are rewritten to simple variable declarations. For example, an object destructuring declaration of the form
|
||||
|
||||
@@ -3855,7 +3935,7 @@ The type of local introduced in a destructuring parameter declaration is determi
|
||||
* Otherwise, if the parameter is a rest parameter, *T* is `any[]`.
|
||||
* Otherwise, *T* is `any`.
|
||||
|
||||
When the output target is ECMAScript 6 or higher, except for removing the optional type annotation, destructuring parameter declarations remain unchanged in the emitted JavaScript code. When the output target is ECMAScript 3 or 5, destructuring parameter declarations are rewritten to local variable declarations.
|
||||
When the output target is ECMAScript 2015 or higher, except for removing the optional type annotation, destructuring parameter declarations remain unchanged in the emitted JavaScript code. When the output target is ECMAScript 3 or 5, destructuring parameter declarations are rewritten to local variable declarations.
|
||||
|
||||
The example
|
||||
|
||||
@@ -3965,9 +4045,13 @@ where *Parameter* is the parameter name and *Default* is the default value expre
|
||||
|
||||
*TODO: Document [generator functions](https://github.com/Microsoft/TypeScript/issues/2873)*.
|
||||
|
||||
## <a name="6.8"/>6.8 Type Guard Functions
|
||||
## <a name="6.8"/>6.8 Asynchronous Functions
|
||||
|
||||
*TODO: Document [type guard functions](https://github.com/Microsoft/TypeScript/issues/1007)*.
|
||||
*TODO: Document [asynchronous functions](https://github.com/Microsoft/TypeScript/issues/1664)*.
|
||||
|
||||
## <a name="6.9"/>6.9 Type Guard Functions
|
||||
|
||||
*TODO: Document [type guard functions](https://github.com/Microsoft/TypeScript/issues/1007), including [this type predicates](https://github.com/Microsoft/TypeScript/pull/5906)*.
|
||||
|
||||
<br/>
|
||||
|
||||
@@ -4016,7 +4100,7 @@ The following constraints must be satisfied by an interface declaration or other
|
||||
* An interface cannot declare a property with the same name as an inherited private or protected property.
|
||||
* Inherited properties with the same name must be identical (section [3.11.2](#3.11.2)).
|
||||
* All properties of the interface must satisfy the constraints implied by the index signatures of the interface as specified in section [3.9.4](#3.9.4).
|
||||
* The instance type (section [3.7.1](#3.7.1)) of the declared interface must be assignable (section [3.11.4](#3.11.4)) to each of the base type references.
|
||||
* The this-type (section [3.6.3](#3.6.3)) of the declared interface must be assignable (section [3.11.4](#3.11.4)) to each of the base type references.
|
||||
|
||||
An interface is permitted to inherit identical members from multiple base types and will in that case only contain one occurrence of each particular member.
|
||||
|
||||
@@ -4090,6 +4174,8 @@ interface Document {
|
||||
|
||||
Note that the members of the last interface declaration appear first in the merged declaration. Also note that the relative order of members declared in the same interface body is preserved.
|
||||
|
||||
*TODO: Document [class and interface declaration merging](https://github.com/Microsoft/TypeScript/pull/3333)*.
|
||||
|
||||
## <a name="7.3"/>7.3 Interfaces Extending Classes
|
||||
|
||||
When an interface type extends a class type it inherits the members of the class but not their implementations. It is as if the interface had declared all of the members of the class without providing an implementation. Interfaces inherit even the private and protected members of a base class. When a class containing private or protected members is the base type of an interface type, that interface type can only be implemented by that class or a descendant class. For example:
|
||||
@@ -4193,13 +4279,13 @@ var Point: {
|
||||
};
|
||||
```
|
||||
|
||||
The context in which a class is referenced distinguishes between the class instance type and the constructor function. For example, in the assignment statement
|
||||
The context in which a class is referenced distinguishes between the class type and the constructor function. For example, in the assignment statement
|
||||
|
||||
```TypeScript
|
||||
var p: Point = new Point(10, 20);
|
||||
```
|
||||
|
||||
the identifier 'Point' in the type annotation refers to the class instance type, whereas the identifier 'Point' in the `new` expression refers to the constructor function object.
|
||||
the identifier 'Point' in the type annotation refers to the class type, whereas the identifier 'Point' in the `new` expression refers to the constructor function object.
|
||||
|
||||
### <a name="8.1.1"/>8.1.1 Class Heritage Specification
|
||||
|
||||
@@ -4225,7 +4311,7 @@ The following constraints must be satisfied by the class heritage specification
|
||||
|
||||
* If present, the type reference specified in the `extends` clause must denote a class type. Furthermore, the *TypeName* part of the type reference is required to be a reference to the class constructor function when evaluated as an expression.
|
||||
* A class declaration may not, directly or indirectly, specify a base class that originates in the same declaration. In other words a class cannot, directly or indirectly, be a base class of itself, regardless of type arguments.
|
||||
* The instance type (section [3.7.1](#3.7.1)) of the declared class must be assignable (section [3.11.4](#3.11.4)) to the base type reference and each of the type references listed in the `implements` clause.
|
||||
* The this-type (section [3.6.3](#3.6.3)) of the declared class must be assignable (section [3.11.4](#3.11.4)) to the base type reference and each of the type references listed in the `implements` clause.
|
||||
* The constructor function type created by the class declaration must be assignable to the base class constructor function type, ignoring construct signatures.
|
||||
|
||||
The following example illustrates a situation in which the first rule above would be violated:
|
||||
@@ -4266,7 +4352,7 @@ The members of a class consist of the members introduced through member declarat
|
||||
|
||||
Members are either ***instance members*** or ***static members***.
|
||||
|
||||
Instance members are members of the class type (section [8.2.4](#8.2.4)) and its associated instance type. Within constructors, instance member functions, and instance member accessors, the type of `this` is the instance type (section [3.7.1](#3.7.1)) of the class.
|
||||
Instance members are members of the class type (section [8.2.4](#8.2.4)) and its associated this-type. Within constructors, instance member functions, and instance member accessors, the type of `this` is the this-type (section [3.6.3](#3.6.3)) of the class.
|
||||
|
||||
Static members are declared using the `static` modifier and are members of the constructor function type (section [8.2.5](#8.2.5)). Within static member functions and static member accessors, the type of `this` is the constructor function type.
|
||||
|
||||
@@ -4280,7 +4366,7 @@ Public property members can be accessed everywhere without restrictions.
|
||||
|
||||
Private property members can be accessed only within their declaring class. Specifically, a private member *M* declared in a class *C* can be accessed only within the class body of *C*.
|
||||
|
||||
Protected property members can be accessed only within their declaring class and classes derived from their declaring class, and a protected instance property member must be accessed *through* an instance of the enclosing class. Specifically, a protected member *M* declared in a class *C* can be accessed only within the class body of *C* or the class body of a class derived from *C*. Furthermore, when a protected instance member *M* is accessed in a property access *E*`.`*M* within the body of a class *D*, the type of *E* is required to be *D* or a type that directly or indirectly has *D* as a base type, regardless of type arguments.
|
||||
Protected property members can be accessed only within their declaring class and classes derived from their declaring class, and a protected instance property member must be accessed *through* an instance of the enclosing class or a subclass thereof. Specifically, a protected member *M* declared in a class *C* can be accessed only within the class body of *C* or the class body of a class derived from *C*. Furthermore, when a protected instance member *M* is accessed in a property access *E*`.`*M* within the body of a class *D*, the type of *E* is required to be *D* or a type that directly or indirectly has *D* as a base type, regardless of type arguments.
|
||||
|
||||
Private and protected accessibility is enforced only at compile-time and serves as no more than an *indication of intent*. Since JavaScript provides no mechanism to create private and protected properties on an object, it is not possible to enforce the private and protected modifiers in dynamic code at run-time. For example, private and protected accessibility can be defeated by changing an object's static type to Any and accessing the member dynamically.
|
||||
|
||||
@@ -4326,14 +4412,14 @@ An index member in a derived class is said to override an index member in a base
|
||||
|
||||
### <a name="8.2.4"/>8.2.4 Class Types
|
||||
|
||||
A class declaration declares a new named type (section [3.7](#3.7)) called a class type. Within the constructor and member functions of a class, the type of `this` is the instance type (section [3.7.1](#3.7.1)) of this class type. The class type has the following members:
|
||||
A class declaration declares a new named type (section [3.7](#3.7)) called a class type. Within the constructor and instance member functions of a class, the type of `this` is the this-type (section [3.6.3](#3.6.3)) of that class type. The class type has the following members:
|
||||
|
||||
* A property for each instance member variable declaration in the class body.
|
||||
* A property of a function type for each instance member function declaration in the class body.
|
||||
* A property for each uniquely named instance member accessor declaration in the class body.
|
||||
* A property for each constructor parameter declared with a `public`, `private`, or `protected` modifier.
|
||||
* An index signature for each instance index member declaration in the class body.
|
||||
* All base class instance type property or index members that are not overridden in the class.
|
||||
* All base class instance property or index members that are not overridden in the class.
|
||||
|
||||
All instance property members (including those that are private or protected) of a class must satisfy the constraints implied by the index members of the class as specified in section [3.9.4](#3.9.4).
|
||||
|
||||
@@ -4353,7 +4439,7 @@ class B extends A {
|
||||
}
|
||||
```
|
||||
|
||||
the instance type of 'A' is
|
||||
the class type of 'A' is equivalent to
|
||||
|
||||
```TypeScript
|
||||
interface A {
|
||||
@@ -4363,7 +4449,7 @@ interface A {
|
||||
}
|
||||
```
|
||||
|
||||
and the instance type of 'B' is
|
||||
and the class type of 'B' is equivalent to
|
||||
|
||||
```TypeScript
|
||||
interface B {
|
||||
@@ -4374,16 +4460,16 @@ interface B {
|
||||
}
|
||||
```
|
||||
|
||||
Note that static declarations in a class do not contribute to the class type and its instance type—rather, static declarations introduce properties on the constructor function object. Also note that the declaration of 'g' in 'B' overrides the member inherited from 'A'.
|
||||
Note that static declarations in a class do not contribute to the class type—rather, static declarations introduce properties on the constructor function object. Also note that the declaration of 'g' in 'B' overrides the member inherited from 'A'.
|
||||
|
||||
### <a name="8.2.5"/>8.2.5 Constructor Function Types
|
||||
|
||||
The type of the constructor function introduced by a class declaration is called the constructor function type. The constructor function type has the following members:
|
||||
|
||||
* If the class contains no constructor declaration and has no base class, a single construct signature with no parameters, having the same type parameters as the class and returning the instance type of the class.
|
||||
* If the class contains no constructor declaration and has a base class, a set of construct signatures with the same parameters as those of the base class constructor function type following substitution of type parameters with the type arguments specified in the base class type reference, all having the same type parameters as the class and returning the instance type of the class.
|
||||
* If the class contains a constructor declaration with no overloads, a construct signature with the parameter list of the constructor implementation, having the same type parameters as the class and returning the instance type of the class.
|
||||
* If the class contains a constructor declaration with overloads, a set of construct signatures with the parameter lists of the overloads, all having the same type parameters as the class and returning the instance type of the class.
|
||||
* If the class contains no constructor declaration and has no base class, a single construct signature with no parameters, having the same type parameters as the class (if any) and returning an instantiation of the class type with those type parameters passed as type arguments.
|
||||
* If the class contains no constructor declaration and has a base class, a set of construct signatures with the same parameters as those of the base class constructor function type following substitution of type parameters with the type arguments specified in the base class type reference, all having the same type parameters as the class (if any) and returning an instantiation of the class type with those type parameters passed as type arguments.
|
||||
* If the class contains a constructor declaration with no overloads, a construct signature with the parameter list of the constructor implementation, having the same type parameters as the class (if any) and returning an instantiation of the class type with those type parameters passed as type arguments.
|
||||
* If the class contains a constructor declaration with overloads, a set of construct signatures with the parameter lists of the overloads, all having the same type parameters as the class (if any) and returning an instantiation of the class type with those type parameters passed as type arguments.
|
||||
* A property for each static member variable declaration in the class body.
|
||||
* A property of a function type for each static member function declaration in the class body.
|
||||
* A property for each uniquely named static member accessor declaration in the class body.
|
||||
@@ -4428,7 +4514,7 @@ var TwoArrays: {
|
||||
}
|
||||
```
|
||||
|
||||
Note that the construct signatures in the constructor function types have the same type parameters as their class and return the instance type of their class. Also note that when a derived class doesn't declare a constructor, type arguments from the base class reference are substituted before construct signatures are propagated from the base constructor function type to the derived constructor function type.
|
||||
Note that each construct signature in the constructor function types has the same type parameters as its class and returns an instantiation of its class with those type parameters passed as type arguments. Also note that when a derived class doesn't declare a constructor, type arguments from the base class reference are substituted before construct signatures are propagated from the base constructor function type to the derived constructor function type.
|
||||
|
||||
## <a name="8.3"/>8.3 Constructor Declarations
|
||||
|
||||
@@ -4446,7 +4532,7 @@ When a class has constructor overloads, the overloads determine the construct si
|
||||
|
||||
When a class has both constructor overloads and a constructor implementation, the overloads must precede the implementation and all of the declarations must be consecutive with no intervening grammatical elements.
|
||||
|
||||
The function body of a constructor is permitted to contain return statements. If return statements specify expressions, those expressions must be of types that are assignable to the instance type of the class.
|
||||
The function body of a constructor is permitted to contain return statements. If return statements specify expressions, those expressions must be of types that are assignable to the this-type (section [3.6.3](#3.6.3)) of the class.
|
||||
|
||||
The type parameters of a generic class are in scope and accessible in a constructor declaration.
|
||||
|
||||
@@ -4478,6 +4564,8 @@ class Point {
|
||||
}
|
||||
```
|
||||
|
||||
A parameter property declaration may declare an optional parameter (by including a question mark or a default value), but the property introduced by such a declaration is always considered a required property (section [3.3.6](#3.3.6)).
|
||||
|
||||
### <a name="8.3.2"/>8.3.2 Super Calls
|
||||
|
||||
Super calls (section [4.9.1](#4.9.1)) are used to call the constructor of the base class. A super call consists of the keyword `super` followed by an argument list enclosed in parentheses. For example:
|
||||
@@ -4524,7 +4612,7 @@ Property member declarations can be member variable declarations, member functio
|
||||
   *MemberFunctionDeclaration*
|
||||
   *MemberAccessorDeclaration*
|
||||
|
||||
Member declarations without a `static` modifier are called instance member declarations. Instance property member declarations declare properties in the class instance type (section [8.2.4](#8.2.4)), and must specify names that are unique among all instance property member and parameter property declarations in the containing class, with the exception that instance get and set accessor declarations may pairwise specify the same name.
|
||||
Member declarations without a `static` modifier are called instance member declarations. Instance property member declarations declare properties in the class type (section [8.2.4](#8.2.4)), and must specify names that are unique among all instance property member and parameter property declarations in the containing class, with the exception that instance get and set accessor declarations may pairwise specify the same name.
|
||||
|
||||
Member declarations with a `static` modifier are called static member declarations. Static property member declarations declare properties in the constructor function type (section [8.2.5](#8.2.5)), and must specify names that are unique among all static property member declarations in the containing class, with the exception that static get and set accessor declarations may pairwise specify the same name.
|
||||
|
||||
@@ -4549,7 +4637,7 @@ class Point {
|
||||
}
|
||||
```
|
||||
|
||||
The class instance type 'Point' has the members:
|
||||
The class type 'Point' has the members:
|
||||
|
||||
```TypeScript
|
||||
interface Point {
|
||||
@@ -4578,7 +4666,7 @@ A member variable declaration declares an instance member variable or a static m
|
||||
|
||||
The type associated with a member variable declaration is determined in the same manner as an ordinary variable declaration (see section [5.2](#5.2)).
|
||||
|
||||
An instance member variable declaration introduces a member in the class instance type and optionally initializes a property on instances of the class. Initializers in instance member variable declarations are executed once for every new instance of the class and are equivalent to assignments to properties of `this` in the constructor. In an initializer expression for an instance member variable, `this` is of the class instance type.
|
||||
An instance member variable declaration introduces a member in the class type and optionally initializes a property on instances of the class. Initializers in instance member variable declarations are executed once for every new instance of the class and are equivalent to assignments to properties of `this` in the constructor. In an initializer expression for an instance member variable, `this` is of the this-type (section [3.6.3](#3.6.3)) of the class.
|
||||
|
||||
A static member variable declaration introduces a property in the constructor function type and optionally initializes a property on the constructor function object. Initializers in static member variable declarations are executed once when the containing script or module is loaded.
|
||||
|
||||
@@ -4625,7 +4713,7 @@ A member function declaration is processed in the same manner as an ordinary fun
|
||||
|
||||
All declarations for the same member function must specify the same accessibility (public, private, or protected) and kind (instance or static).
|
||||
|
||||
An instance member function declaration declares a property in the class instance type and assigns a function object to a property on the prototype object of the class. In the body of an instance member function declaration, `this` is of the class instance type.
|
||||
An instance member function declaration declares a property in the class type and assigns a function object to a property on the prototype object of the class. In the body of an instance member function declaration, `this` is of the this-type (section [3.6.3](#3.6.3)) of the class.
|
||||
|
||||
A static member function declaration declares a property in the constructor function type and assigns a function object to a property on the constructor function object. In the body of a static member function declaration, the type of `this` is the constructor function type.
|
||||
|
||||
@@ -4691,23 +4779,23 @@ Get and set accessors are processed in the same manner as in an object literal (
|
||||
|
||||
Accessors for the same member name must specify the same accessibility.
|
||||
|
||||
An instance member accessor declaration declares a property in the class instance type and defines a property on the prototype object of the class with a get or set accessor. In the body of an instance member accessor declaration, `this` is of the class instance type.
|
||||
An instance member accessor declaration declares a property in the class type and defines a property on the prototype object of the class with a get or set accessor. In the body of an instance member accessor declaration, `this` is of the this-type (section [3.6.3](#3.6.3)) of the class.
|
||||
|
||||
A static member accessor declaration declares a property in the constructor function type and defines a property on the constructor function object of the class with a get or set accessor. In the body of a static member accessor declaration, the type of `this` is the constructor function type.
|
||||
|
||||
Get and set accessors are emitted as calls to 'Object.defineProperty' in the generated JavaScript, as described in section [8.6.1](#8.6.1).
|
||||
Get and set accessors are emitted as calls to 'Object.defineProperty' in the generated JavaScript, as described in section [8.7.1](#8.7.1).
|
||||
|
||||
### <a name="8.4.4"/>8.4.4 Dynamic Property Declarations
|
||||
|
||||
If the *PropertyName* of a property member declaration is a computed property name that doesn't denote a well-known symbol ([2.2.3](#2.2.3)), the construct is considered a ***dynamic property declaration***. The following rules apply to dynamic property declarations:
|
||||
|
||||
* A dynamic property declaration does not introduce a property in the class instance type or constructor function type.
|
||||
* A dynamic property declaration does not introduce a property in the class type or constructor function type.
|
||||
* The property name expression of a dynamic property assignment must be of type Any or the String, Number, or Symbol primitive type.
|
||||
* The name associated with a dynamic property declarations is considered to be a numeric property name if the property name expression is of type Any or the Number primitive type.
|
||||
|
||||
## <a name="8.5"/>8.5 Index Member Declarations
|
||||
|
||||
An index member declaration introduces an index signature (section [3.9.4](#3.9.4)) in the class instance type.
|
||||
An index member declaration introduces an index signature (section [3.9.4](#3.9.4)) in the class type.
|
||||
|
||||
  *IndexMemberDeclaration:*
|
||||
   *IndexSignature* `;`
|
||||
@@ -4720,11 +4808,15 @@ It is not possible to declare index members for the static side of a class.
|
||||
|
||||
Note that it is seldom meaningful to include a string index signature in a class because it constrains all instance properties of the class. However, numeric index signatures can be useful to control the element type when a class is used in an array-like manner.
|
||||
|
||||
## <a name="8.6"/>8.6 Code Generation
|
||||
## <a name="8.6"/>8.6 Decorators
|
||||
|
||||
When the output target is ECMAScript 6 or higher, type parameters, implements clauses, accessibility modifiers, and member variable declarations are removed in the emitted code, but otherwise class declarations are emitted as written. When the output target is ECMAScript 3 or 5, more comprehensive rewrites are performed, as described in this section.
|
||||
*TODO: Document [decorators](https://github.com/Microsoft/TypeScript/issues/2249)*.
|
||||
|
||||
### <a name="8.6.1"/>8.6.1 Classes Without Extends Clauses
|
||||
## <a name="8.7"/>8.7 Code Generation
|
||||
|
||||
When the output target is ECMAScript 2015 or higher, type parameters, implements clauses, accessibility modifiers, and member variable declarations are removed in the emitted code, but otherwise class declarations are emitted as written. When the output target is ECMAScript 3 or 5, more comprehensive rewrites are performed, as described in this section.
|
||||
|
||||
### <a name="8.7.1"/>8.7.1 Classes Without Extends Clauses
|
||||
|
||||
A class with no `extends` clause generates JavaScript equivalent to the following:
|
||||
|
||||
@@ -4828,7 +4920,7 @@ where *MemberName* is the name of the member accessor, *GetAccessorStatements* i
|
||||
|
||||
where *MemberName* is the name of the static variable, and *InitializerExpression* is the code generated for the initializer expression.
|
||||
|
||||
### <a name="8.6.2"/>8.6.2 Classes With Extends Clauses
|
||||
### <a name="8.7.2"/>8.7.2 Classes With Extends Clauses
|
||||
|
||||
A class with an `extends` clause generates JavaScript equivalent to the following:
|
||||
|
||||
@@ -5396,7 +5488,7 @@ This copies a reference to the entity into a property on the namespace instance.
|
||||
|
||||
# <a name="11"/>11 Scripts and Modules
|
||||
|
||||
TypeScript implements support for ECMAScript 6 modules and supports down-level code generation targeting CommonJS, AMD, and other module systems.
|
||||
TypeScript implements support for ECMAScript 2015 modules and supports down-level code generation targeting CommonJS, AMD, and other module systems.
|
||||
|
||||
## <a name="11.1"/>11.1 Programs and Source Files
|
||||
|
||||
@@ -5424,7 +5516,7 @@ When a TypeScript program is compiled, all of the program's source files are pro
|
||||
|
||||
The TypeScript compiler automatically determines a source file's dependencies and includes those dependencies in the program being compiled. The determination is made from "reference comments" and module import declarations as follows:
|
||||
|
||||
* A comment of the form /// <reference path="…"/> adds a dependency on the source file specified in the path argument. The path is resolved relative to the directory of the containing source file.
|
||||
* A comment of the form /// <reference path="…"/> that occurs before the first token in a source file adds a dependency on the source file specified in the path argument. The path is resolved relative to the directory of the containing source file.
|
||||
* A module import declaration that specifies a relative module name (section [11.3.1](#11.3.1)) resolves the name relative to the directory of the containing source file. If a source file with the resulting path and file extension '.ts' exists, that file is added as a dependency. Otherwise, if a source file with the resulting path and file extension '.d.ts' exists, that file is added as a dependency.
|
||||
* A module import declaration that specifies a top-level module name (section [11.3.1](#11.3.1)) resolves the name in a host dependent manner (typically by resolving the name relative to a module name space root or searching for the name in a series of directories). If a source file with extension '.ts' or '.d.ts' corresponding to the reference is located, that file is added as a dependency.
|
||||
|
||||
@@ -5539,7 +5631,7 @@ TypeScript supports multiple patterns of JavaScript code generation for modules:
|
||||
* CommonJS. This format is used by server frameworks such as node.js.
|
||||
* AMD (Asynchronous Module Definition). This format is used by asynchronous module loaders such as RequireJS.
|
||||
* UMD (Universal Module Definition). A variation of the AMD format that allows modules to also be loaded by CommonJS loaders.
|
||||
* System. This format is used to represent ECMAScript 6 semantics with high fidelity in down-level environments.
|
||||
* System. This format is used to represent ECMAScript 2015 semantics with high fidelity in down-level environments.
|
||||
|
||||
The desired module code generation pattern is selected through a compiler option and does not affect the TypeScript source code. Indeed, it is possible to author modules that can be compiled for use both on the server side (e.g. using node.js) and on the client side (using an AMD compliant loader) with no changes to the TypeScript source code.
|
||||
|
||||
@@ -5620,7 +5712,7 @@ An import require declaration of the form
|
||||
import m = require("mod");
|
||||
```
|
||||
|
||||
is equivalent to the ECMAScript 6 import declaration
|
||||
is equivalent to the ECMAScript 2015 import declaration
|
||||
|
||||
```TypeScript
|
||||
import * as m from "mod";
|
||||
@@ -5828,16 +5920,17 @@ The 'main' and 'log' example from section [11.3](#11.3) above generates the foll
|
||||
File main.js:
|
||||
|
||||
```TypeScript
|
||||
var log = require("./log");
|
||||
log.message("hello");
|
||||
var log_1 = require("./log");
|
||||
log_1.message("hello");
|
||||
```
|
||||
|
||||
File log.js:
|
||||
|
||||
```TypeScript
|
||||
exports.message = function(s) {
|
||||
function message(s) {
|
||||
console.log(s);
|
||||
}
|
||||
}
|
||||
exports.message = message;
|
||||
```
|
||||
|
||||
A module import declaration is represented in the generated JavaScript as a variable initialized by a call to the 'require' function provided by the module system host. A variable declaration and 'require' call is emitted for a particular imported module only if the imported module, or a local alias (section [10.3](#10.3)) that references the imported module, is referenced as a *PrimaryExpression* somewhere in the body of the importing module. If an imported module is referenced only as a *NamespaceName* or *TypeQueryExpression*, nothing is emitted.
|
||||
@@ -5850,15 +5943,15 @@ File geometry.ts:
|
||||
export interface Point { x: number; y: number };
|
||||
|
||||
export function point(x: number, y: number): Point {
|
||||
return { x: x, y: y };
|
||||
return { x, y };
|
||||
}
|
||||
```
|
||||
|
||||
File game.ts:
|
||||
|
||||
```TypeScript
|
||||
import g = require("./geometry");
|
||||
var p = g.point(10, 20);
|
||||
import * as g from "./geometry";
|
||||
let p = g.point(10, 20);
|
||||
```
|
||||
|
||||
The 'game' module references the imported 'geometry' module in an expression (through its alias 'g') and a 'require' call is therefore included in the emitted JavaScript:
|
||||
@@ -5871,8 +5964,8 @@ var p = g.point(10, 20);
|
||||
Had the 'game' module instead been written to only reference 'geometry' in a type position
|
||||
|
||||
```TypeScript
|
||||
import g = require("./geometry");
|
||||
var p: g.Point = { x: 10, y: 20 };
|
||||
import * as g from "./geometry";
|
||||
let p: g.Point = { x: 10, y: 20 };
|
||||
```
|
||||
|
||||
the emitted JavaScript would have no dependency on the 'geometry' module and would simply be
|
||||
@@ -5890,8 +5983,8 @@ The "main" and "log" example from above generates the following JavaScript code
|
||||
File main.js:
|
||||
|
||||
```TypeScript
|
||||
define(["require", "exports", "./log"], function(require, exports, log) {
|
||||
log.message("hello");
|
||||
define(["require", "exports", "./log"], function(require, exports, log_1) {
|
||||
log_1.message("hello");
|
||||
}
|
||||
```
|
||||
|
||||
@@ -5899,9 +5992,10 @@ File log.js:
|
||||
|
||||
```TypeScript
|
||||
define(["require", "exports"], function(require, exports) {
|
||||
exports.message = function(s) {
|
||||
function message(s) {
|
||||
console.log(s);
|
||||
}
|
||||
exports.message = message;
|
||||
}
|
||||
```
|
||||
|
||||
@@ -5957,7 +6051,7 @@ Ambient function declarations cannot specify a function bodies and do not permit
|
||||
|
||||
### <a name="12.1.3"/>12.1.3 Ambient Class Declarations
|
||||
|
||||
An ambient class declaration declares a class instance type and a constructor function in the containing declaration space.
|
||||
An ambient class declaration declares a class type and a constructor function in the containing declaration space.
|
||||
|
||||
  *AmbientClassDeclaration:*
|
||||
   `class` *BindingIdentifier* *TypeParameters<sub>opt</sub>* *ClassHeritage* `{` *AmbientClassBody* `}`
|
||||
@@ -6057,7 +6151,7 @@ declare module "io" {
|
||||
|
||||
# <a name="A"/>A Grammar
|
||||
|
||||
This appendix contains a summary of the grammar found in the main document. As described in section [2.1](#2.1), the TypeScript grammar is a superset of the grammar defined in the [ECMAScript Language Specification](http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf) (specifically, the ECMA-262 Standard, 6th Edition) and this appendix lists only productions that are new or modified from the ECMAScript grammar.
|
||||
This appendix contains a summary of the grammar found in the main document. As described in section [2.1](#2.1), the TypeScript grammar is a superset of the grammar defined in the [ECMAScript 2015 Language Specification](http://www.ecma-international.org/ecma-262/6.0/) (specifically, the ECMA-262 Standard, 6th Edition) and this appendix lists only productions that are new or modified from the ECMAScript grammar.
|
||||
|
||||
## <a name="A.1"/>A.1 Types
|
||||
|
||||
@@ -6104,7 +6198,8 @@ This appendix contains a summary of the grammar found in the main document. As d
|
||||
   *ObjectType*
|
||||
   *ArrayType*
|
||||
   *TupleType*
|
||||
   *TypeQuery*
|
||||
   *TypeQuery*
|
||||
   *ThisType*
|
||||
|
||||
  *ParenthesizedType:*
|
||||
   `(` *Type* `)`
|
||||
@@ -6179,6 +6274,9 @@ This appendix contains a summary of the grammar found in the main document. As d
|
||||
   *IdentifierReference*
|
||||
   *TypeQueryExpression* `.` *IdentifierName*
|
||||
|
||||
  *ThisType:*
|
||||
   `this`
|
||||
|
||||
  *PropertySignature:*
|
||||
   *PropertyName* `?`*<sub>opt</sub>* *TypeAnnotation<sub>opt</sub>*
|
||||
|
||||
|
||||
Vendored
+31
-13
@@ -3847,7 +3847,7 @@ interface Symbol {
|
||||
/** Returns the primitive value of the specified object. */
|
||||
valueOf(): Object;
|
||||
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "Symbol";
|
||||
}
|
||||
|
||||
interface SymbolConstructor {
|
||||
@@ -4405,7 +4405,7 @@ interface IterableIterator<T> extends Iterator<T> {
|
||||
}
|
||||
|
||||
interface GeneratorFunction extends Function {
|
||||
|
||||
[Symbol.toStringTag]: "GeneratorFunction";
|
||||
}
|
||||
|
||||
interface GeneratorFunctionConstructor {
|
||||
@@ -4530,7 +4530,7 @@ interface Math {
|
||||
*/
|
||||
cbrt(x: number): number;
|
||||
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "Math";
|
||||
}
|
||||
|
||||
interface Date {
|
||||
@@ -4647,7 +4647,7 @@ interface Map<K, V> {
|
||||
size: number;
|
||||
values(): IterableIterator<V>;
|
||||
[Symbol.iterator]():IterableIterator<[K,V]>;
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "Map";
|
||||
}
|
||||
|
||||
interface MapConstructor {
|
||||
@@ -4664,7 +4664,7 @@ interface WeakMap<K, V> {
|
||||
get(key: K): V;
|
||||
has(key: K): boolean;
|
||||
set(key: K, value?: V): WeakMap<K, V>;
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "WeakMap";
|
||||
}
|
||||
|
||||
interface WeakMapConstructor {
|
||||
@@ -4686,7 +4686,7 @@ interface Set<T> {
|
||||
size: number;
|
||||
values(): IterableIterator<T>;
|
||||
[Symbol.iterator]():IterableIterator<T>;
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "Set";
|
||||
}
|
||||
|
||||
interface SetConstructor {
|
||||
@@ -4702,7 +4702,7 @@ interface WeakSet<T> {
|
||||
clear(): void;
|
||||
delete(value: T): boolean;
|
||||
has(value: T): boolean;
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "WeakSet";
|
||||
}
|
||||
|
||||
interface WeakSetConstructor {
|
||||
@@ -4714,7 +4714,7 @@ interface WeakSetConstructor {
|
||||
declare var WeakSet: WeakSetConstructor;
|
||||
|
||||
interface JSON {
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "JSON";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4724,11 +4724,11 @@ interface JSON {
|
||||
* buffer as needed.
|
||||
*/
|
||||
interface ArrayBuffer {
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "ArrayBuffer";
|
||||
}
|
||||
|
||||
interface DataView {
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "DataView";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4749,6 +4749,7 @@ interface Int8Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Int8Array";
|
||||
}
|
||||
|
||||
interface Int8ArrayConstructor {
|
||||
@@ -4781,6 +4782,7 @@ interface Uint8Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "UInt8Array";
|
||||
}
|
||||
|
||||
interface Uint8ArrayConstructor {
|
||||
@@ -4816,6 +4818,7 @@ interface Uint8ClampedArray {
|
||||
values(): IterableIterator<number>;
|
||||
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Uint8ClampedArray";
|
||||
}
|
||||
|
||||
interface Uint8ClampedArrayConstructor {
|
||||
@@ -4853,6 +4856,7 @@ interface Int16Array {
|
||||
|
||||
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Int16Array";
|
||||
}
|
||||
|
||||
interface Int16ArrayConstructor {
|
||||
@@ -4885,6 +4889,7 @@ interface Uint16Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Uint16Array";
|
||||
}
|
||||
|
||||
interface Uint16ArrayConstructor {
|
||||
@@ -4917,6 +4922,7 @@ interface Int32Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Int32Array";
|
||||
}
|
||||
|
||||
interface Int32ArrayConstructor {
|
||||
@@ -4949,6 +4955,7 @@ interface Uint32Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Uint32Array";
|
||||
}
|
||||
|
||||
interface Uint32ArrayConstructor {
|
||||
@@ -4981,6 +4988,7 @@ interface Float32Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Float32Array";
|
||||
}
|
||||
|
||||
interface Float32ArrayConstructor {
|
||||
@@ -5013,6 +5021,7 @@ interface Float64Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Float64Array";
|
||||
}
|
||||
|
||||
interface Float64ArrayConstructor {
|
||||
@@ -5064,7 +5073,7 @@ declare namespace Reflect {
|
||||
function isExtensible(target: any): boolean;
|
||||
function ownKeys(target: any): Array<PropertyKey>;
|
||||
function preventExtensions(target: any): boolean;
|
||||
function set(target: any, propertyKey: PropertyKey, value: any, receiver? :any): boolean;
|
||||
function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean;
|
||||
function setPrototypeOf(target: any, proto: any): boolean;
|
||||
}
|
||||
|
||||
@@ -5089,7 +5098,7 @@ interface Promise<T> {
|
||||
catch(onrejected?: (reason: any) => T | PromiseLike<T>): Promise<T>;
|
||||
catch(onrejected?: (reason: any) => void): Promise<T>;
|
||||
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "Promise";
|
||||
}
|
||||
|
||||
interface PromiseConstructor {
|
||||
@@ -5112,7 +5121,16 @@ interface PromiseConstructor {
|
||||
* @param values An array of Promises.
|
||||
* @returns A new Promise.
|
||||
*/
|
||||
all<T>(values: Iterable<T | PromiseLike<T>>): Promise<T[]>;
|
||||
all<T1, T2>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>;
|
||||
all<T1, T2, T3>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<[T1, T2, T3]>;
|
||||
all<T1, T2, T3, T4>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>]): Promise<[T1, T2, T3, T4]>;
|
||||
all<T1, T2, T3, T4, T5>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>]): Promise<[T1, T2, T3, T4, T5]>;
|
||||
all<T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<[T1, T2, T3, T4, T5, T6]>;
|
||||
all<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<[T1, T2, T3, T4, T5, T6, T7]>;
|
||||
all<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
|
||||
all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
|
||||
all<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>, T10 | PromiseLike<T10>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
|
||||
all<TAll>(values: Iterable<TAll | PromiseLike<TAll>>): Promise<TAll[]>;
|
||||
|
||||
/**
|
||||
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
|
||||
|
||||
Vendored
+41
-15
@@ -4362,6 +4362,7 @@ interface AudioContext extends EventTarget {
|
||||
destination: AudioDestinationNode;
|
||||
listener: AudioListener;
|
||||
sampleRate: number;
|
||||
state: string;
|
||||
createAnalyser(): AnalyserNode;
|
||||
createBiquadFilter(): BiquadFilterNode;
|
||||
createBuffer(numberOfChannels: number, length: number, sampleRate: number): AudioBuffer;
|
||||
@@ -6099,6 +6100,7 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
|
||||
* Gets or sets the version attribute specified in the declaration of an XML document.
|
||||
*/
|
||||
xmlVersion: string;
|
||||
currentScript: HTMLScriptElement;
|
||||
adoptNode(source: Node): Node;
|
||||
captureEvents(): void;
|
||||
clear(): void;
|
||||
@@ -6814,6 +6816,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
|
||||
tagName: string;
|
||||
id: string;
|
||||
className: string;
|
||||
innerHTML: string;
|
||||
getAttribute(name?: string): string;
|
||||
getAttributeNS(namespaceURI: string, localName: string): string;
|
||||
getAttributeNode(name: string): Attr;
|
||||
@@ -7009,7 +7012,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
|
||||
removeAttributeNode(oldAttr: Attr): Attr;
|
||||
requestFullscreen(): void;
|
||||
requestPointerLock(): void;
|
||||
setAttribute(name?: string, value?: string): void;
|
||||
setAttribute(name: string, value: string): void;
|
||||
setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;
|
||||
setAttributeNode(newAttr: Attr): Attr;
|
||||
setAttributeNodeNS(newAttr: Attr): Attr;
|
||||
@@ -7018,6 +7021,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
|
||||
webkitRequestFullScreen(): void;
|
||||
webkitRequestFullscreen(): void;
|
||||
getElementsByClassName(classNames: string): NodeListOf<Element>;
|
||||
matches(selector: string): boolean;
|
||||
addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
|
||||
@@ -8002,7 +8006,6 @@ interface HTMLElement extends Element {
|
||||
title: string;
|
||||
blur(): void;
|
||||
click(): void;
|
||||
contains(child: HTMLElement): boolean;
|
||||
dragDrop(): boolean;
|
||||
focus(): void;
|
||||
insertAdjacentElement(position: string, insertedElement: Element): Element;
|
||||
@@ -9552,7 +9555,7 @@ interface HTMLMediaElement extends HTMLElement {
|
||||
* Gets or sets the current playback position, in seconds.
|
||||
*/
|
||||
preload: string;
|
||||
readyState: any;
|
||||
readyState: number;
|
||||
/**
|
||||
* Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked.
|
||||
*/
|
||||
@@ -10176,7 +10179,7 @@ interface HTMLSelectElement extends HTMLElement {
|
||||
* Sets or retrieves the name of the object.
|
||||
*/
|
||||
name: string;
|
||||
options: HTMLSelectElement;
|
||||
options: HTMLCollection;
|
||||
/**
|
||||
* When present, marks an element that can't be submitted without a value.
|
||||
*/
|
||||
@@ -10209,6 +10212,7 @@ interface HTMLSelectElement extends HTMLElement {
|
||||
* Returns whether an element will successfully validate based on forms validation rules and constraints.
|
||||
*/
|
||||
willValidate: boolean;
|
||||
selectedOptions: HTMLCollection;
|
||||
/**
|
||||
* Adds an element to the areas, controlRange, or options collection.
|
||||
* @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection.
|
||||
@@ -10462,19 +10466,19 @@ interface HTMLTableElement extends HTMLElement {
|
||||
/**
|
||||
* Creates an empty caption element in the table.
|
||||
*/
|
||||
createCaption(): HTMLElement;
|
||||
createCaption(): HTMLTableCaptionElement;
|
||||
/**
|
||||
* Creates an empty tBody element in the table.
|
||||
*/
|
||||
createTBody(): HTMLElement;
|
||||
createTBody(): HTMLTableSectionElement;
|
||||
/**
|
||||
* Creates an empty tFoot element in the table.
|
||||
*/
|
||||
createTFoot(): HTMLElement;
|
||||
createTFoot(): HTMLTableSectionElement;
|
||||
/**
|
||||
* Returns the tHead element object if successful, or null otherwise.
|
||||
*/
|
||||
createTHead(): HTMLElement;
|
||||
createTHead(): HTMLTableSectionElement;
|
||||
/**
|
||||
* Deletes the caption element and its contents from the table.
|
||||
*/
|
||||
@@ -10496,7 +10500,7 @@ interface HTMLTableElement extends HTMLElement {
|
||||
* Creates a new row (tr) in the table, and adds the row to the rows collection.
|
||||
* @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
|
||||
*/
|
||||
insertRow(index?: number): HTMLElement;
|
||||
insertRow(index?: number): HTMLTableRowElement;
|
||||
}
|
||||
|
||||
declare var HTMLTableElement: {
|
||||
@@ -10547,7 +10551,7 @@ interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {
|
||||
* Creates a new cell in the table row, and adds the cell to the cells collection.
|
||||
* @param index Number that specifies where to insert the cell in the tr. The default value is -1, which appends the new cell to the end of the cells collection.
|
||||
*/
|
||||
insertCell(index?: number): HTMLElement;
|
||||
insertCell(index?: number): HTMLTableCellElement;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
|
||||
@@ -10574,7 +10578,7 @@ interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {
|
||||
* Creates a new row (tr) in the table, and adds the row to the rows collection.
|
||||
* @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
|
||||
*/
|
||||
insertRow(index?: number): HTMLElement;
|
||||
insertRow(index?: number): HTMLTableRowElement;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
|
||||
@@ -10963,7 +10967,7 @@ interface IDBDatabase extends EventTarget {
|
||||
onerror: (ev: Event) => any;
|
||||
version: string;
|
||||
close(): void;
|
||||
createObjectStore(name: string, optionalParameters?: any): IDBObjectStore;
|
||||
createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
|
||||
deleteObjectStore(name: string): void;
|
||||
transaction(storeNames: any, mode?: string): IDBTransaction;
|
||||
addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
|
||||
@@ -10988,10 +10992,11 @@ declare var IDBFactory: {
|
||||
}
|
||||
|
||||
interface IDBIndex {
|
||||
keyPath: string;
|
||||
keyPath: string | string[];
|
||||
name: string;
|
||||
objectStore: IDBObjectStore;
|
||||
unique: boolean;
|
||||
multiEntry: boolean;
|
||||
count(key?: any): IDBRequest;
|
||||
get(key: any): IDBRequest;
|
||||
getKey(key: any): IDBRequest;
|
||||
@@ -11028,7 +11033,7 @@ interface IDBObjectStore {
|
||||
add(value: any, key?: any): IDBRequest;
|
||||
clear(): IDBRequest;
|
||||
count(key?: any): IDBRequest;
|
||||
createIndex(name: string, keyPath: string, optionalParameters?: any): IDBIndex;
|
||||
createIndex(name: string, keyPath: string | string[], optionalParameters?: IDBIndexParameters): IDBIndex;
|
||||
delete(key: any): IDBRequest;
|
||||
deleteIndex(indexName: string): void;
|
||||
get(key: any): IDBRequest;
|
||||
@@ -11112,7 +11117,7 @@ declare var IDBVersionChangeEvent: {
|
||||
}
|
||||
|
||||
interface ImageData {
|
||||
data: number[];
|
||||
data: Uint8ClampedArray;
|
||||
height: number;
|
||||
width: number;
|
||||
}
|
||||
@@ -11910,6 +11915,7 @@ interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorConte
|
||||
getGamepads(): Gamepad[];
|
||||
javaEnabled(): boolean;
|
||||
msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;
|
||||
vibrate(pattern: number | number[]): boolean;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
|
||||
@@ -11950,6 +11956,7 @@ interface Node extends EventTarget {
|
||||
normalize(): void;
|
||||
removeChild(oldChild: Node): Node;
|
||||
replaceChild(newChild: Node, oldChild: Node): Node;
|
||||
contains(node: Node): boolean;
|
||||
ATTRIBUTE_NODE: number;
|
||||
CDATA_SECTION_NODE: number;
|
||||
COMMENT_NODE: number;
|
||||
@@ -16613,6 +16620,16 @@ interface XMLHttpRequestEventTarget {
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
|
||||
interface IDBObjectStoreParameters {
|
||||
keyPath?: string | string[];
|
||||
autoIncrement?: boolean;
|
||||
}
|
||||
|
||||
interface IDBIndexParameters {
|
||||
unique?: boolean;
|
||||
multiEntry?: boolean;
|
||||
}
|
||||
|
||||
interface NodeListOf<TNode extends Node> extends NodeList {
|
||||
length: number;
|
||||
item(index: number): TNode;
|
||||
@@ -16648,6 +16665,15 @@ interface ProgressEventInit extends EventInit {
|
||||
total?: number;
|
||||
}
|
||||
|
||||
interface HTMLTemplateElement extends HTMLElement {
|
||||
content: DocumentFragment;
|
||||
}
|
||||
|
||||
declare var HTMLTemplateElement: {
|
||||
prototype: HTMLTemplateElement;
|
||||
new(): HTMLTemplateElement;
|
||||
}
|
||||
|
||||
declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
|
||||
|
||||
interface ErrorEventHandler {
|
||||
|
||||
Vendored
+41
-15
@@ -538,6 +538,7 @@ interface AudioContext extends EventTarget {
|
||||
destination: AudioDestinationNode;
|
||||
listener: AudioListener;
|
||||
sampleRate: number;
|
||||
state: string;
|
||||
createAnalyser(): AnalyserNode;
|
||||
createBiquadFilter(): BiquadFilterNode;
|
||||
createBuffer(numberOfChannels: number, length: number, sampleRate: number): AudioBuffer;
|
||||
@@ -2275,6 +2276,7 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
|
||||
* Gets or sets the version attribute specified in the declaration of an XML document.
|
||||
*/
|
||||
xmlVersion: string;
|
||||
currentScript: HTMLScriptElement;
|
||||
adoptNode(source: Node): Node;
|
||||
captureEvents(): void;
|
||||
clear(): void;
|
||||
@@ -2990,6 +2992,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
|
||||
tagName: string;
|
||||
id: string;
|
||||
className: string;
|
||||
innerHTML: string;
|
||||
getAttribute(name?: string): string;
|
||||
getAttributeNS(namespaceURI: string, localName: string): string;
|
||||
getAttributeNode(name: string): Attr;
|
||||
@@ -3185,7 +3188,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
|
||||
removeAttributeNode(oldAttr: Attr): Attr;
|
||||
requestFullscreen(): void;
|
||||
requestPointerLock(): void;
|
||||
setAttribute(name?: string, value?: string): void;
|
||||
setAttribute(name: string, value: string): void;
|
||||
setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;
|
||||
setAttributeNode(newAttr: Attr): Attr;
|
||||
setAttributeNodeNS(newAttr: Attr): Attr;
|
||||
@@ -3194,6 +3197,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
|
||||
webkitRequestFullScreen(): void;
|
||||
webkitRequestFullscreen(): void;
|
||||
getElementsByClassName(classNames: string): NodeListOf<Element>;
|
||||
matches(selector: string): boolean;
|
||||
addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
|
||||
@@ -4178,7 +4182,6 @@ interface HTMLElement extends Element {
|
||||
title: string;
|
||||
blur(): void;
|
||||
click(): void;
|
||||
contains(child: HTMLElement): boolean;
|
||||
dragDrop(): boolean;
|
||||
focus(): void;
|
||||
insertAdjacentElement(position: string, insertedElement: Element): Element;
|
||||
@@ -5728,7 +5731,7 @@ interface HTMLMediaElement extends HTMLElement {
|
||||
* Gets or sets the current playback position, in seconds.
|
||||
*/
|
||||
preload: string;
|
||||
readyState: any;
|
||||
readyState: number;
|
||||
/**
|
||||
* Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked.
|
||||
*/
|
||||
@@ -6352,7 +6355,7 @@ interface HTMLSelectElement extends HTMLElement {
|
||||
* Sets or retrieves the name of the object.
|
||||
*/
|
||||
name: string;
|
||||
options: HTMLSelectElement;
|
||||
options: HTMLCollection;
|
||||
/**
|
||||
* When present, marks an element that can't be submitted without a value.
|
||||
*/
|
||||
@@ -6385,6 +6388,7 @@ interface HTMLSelectElement extends HTMLElement {
|
||||
* Returns whether an element will successfully validate based on forms validation rules and constraints.
|
||||
*/
|
||||
willValidate: boolean;
|
||||
selectedOptions: HTMLCollection;
|
||||
/**
|
||||
* Adds an element to the areas, controlRange, or options collection.
|
||||
* @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection.
|
||||
@@ -6638,19 +6642,19 @@ interface HTMLTableElement extends HTMLElement {
|
||||
/**
|
||||
* Creates an empty caption element in the table.
|
||||
*/
|
||||
createCaption(): HTMLElement;
|
||||
createCaption(): HTMLTableCaptionElement;
|
||||
/**
|
||||
* Creates an empty tBody element in the table.
|
||||
*/
|
||||
createTBody(): HTMLElement;
|
||||
createTBody(): HTMLTableSectionElement;
|
||||
/**
|
||||
* Creates an empty tFoot element in the table.
|
||||
*/
|
||||
createTFoot(): HTMLElement;
|
||||
createTFoot(): HTMLTableSectionElement;
|
||||
/**
|
||||
* Returns the tHead element object if successful, or null otherwise.
|
||||
*/
|
||||
createTHead(): HTMLElement;
|
||||
createTHead(): HTMLTableSectionElement;
|
||||
/**
|
||||
* Deletes the caption element and its contents from the table.
|
||||
*/
|
||||
@@ -6672,7 +6676,7 @@ interface HTMLTableElement extends HTMLElement {
|
||||
* Creates a new row (tr) in the table, and adds the row to the rows collection.
|
||||
* @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
|
||||
*/
|
||||
insertRow(index?: number): HTMLElement;
|
||||
insertRow(index?: number): HTMLTableRowElement;
|
||||
}
|
||||
|
||||
declare var HTMLTableElement: {
|
||||
@@ -6723,7 +6727,7 @@ interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {
|
||||
* Creates a new cell in the table row, and adds the cell to the cells collection.
|
||||
* @param index Number that specifies where to insert the cell in the tr. The default value is -1, which appends the new cell to the end of the cells collection.
|
||||
*/
|
||||
insertCell(index?: number): HTMLElement;
|
||||
insertCell(index?: number): HTMLTableCellElement;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
|
||||
@@ -6750,7 +6754,7 @@ interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {
|
||||
* Creates a new row (tr) in the table, and adds the row to the rows collection.
|
||||
* @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
|
||||
*/
|
||||
insertRow(index?: number): HTMLElement;
|
||||
insertRow(index?: number): HTMLTableRowElement;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
|
||||
@@ -7139,7 +7143,7 @@ interface IDBDatabase extends EventTarget {
|
||||
onerror: (ev: Event) => any;
|
||||
version: string;
|
||||
close(): void;
|
||||
createObjectStore(name: string, optionalParameters?: any): IDBObjectStore;
|
||||
createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
|
||||
deleteObjectStore(name: string): void;
|
||||
transaction(storeNames: any, mode?: string): IDBTransaction;
|
||||
addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
|
||||
@@ -7164,10 +7168,11 @@ declare var IDBFactory: {
|
||||
}
|
||||
|
||||
interface IDBIndex {
|
||||
keyPath: string;
|
||||
keyPath: string | string[];
|
||||
name: string;
|
||||
objectStore: IDBObjectStore;
|
||||
unique: boolean;
|
||||
multiEntry: boolean;
|
||||
count(key?: any): IDBRequest;
|
||||
get(key: any): IDBRequest;
|
||||
getKey(key: any): IDBRequest;
|
||||
@@ -7204,7 +7209,7 @@ interface IDBObjectStore {
|
||||
add(value: any, key?: any): IDBRequest;
|
||||
clear(): IDBRequest;
|
||||
count(key?: any): IDBRequest;
|
||||
createIndex(name: string, keyPath: string, optionalParameters?: any): IDBIndex;
|
||||
createIndex(name: string, keyPath: string | string[], optionalParameters?: IDBIndexParameters): IDBIndex;
|
||||
delete(key: any): IDBRequest;
|
||||
deleteIndex(indexName: string): void;
|
||||
get(key: any): IDBRequest;
|
||||
@@ -7288,7 +7293,7 @@ declare var IDBVersionChangeEvent: {
|
||||
}
|
||||
|
||||
interface ImageData {
|
||||
data: number[];
|
||||
data: Uint8ClampedArray;
|
||||
height: number;
|
||||
width: number;
|
||||
}
|
||||
@@ -8086,6 +8091,7 @@ interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorConte
|
||||
getGamepads(): Gamepad[];
|
||||
javaEnabled(): boolean;
|
||||
msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;
|
||||
vibrate(pattern: number | number[]): boolean;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
|
||||
@@ -8126,6 +8132,7 @@ interface Node extends EventTarget {
|
||||
normalize(): void;
|
||||
removeChild(oldChild: Node): Node;
|
||||
replaceChild(newChild: Node, oldChild: Node): Node;
|
||||
contains(node: Node): boolean;
|
||||
ATTRIBUTE_NODE: number;
|
||||
CDATA_SECTION_NODE: number;
|
||||
COMMENT_NODE: number;
|
||||
@@ -12789,6 +12796,16 @@ interface XMLHttpRequestEventTarget {
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
|
||||
interface IDBObjectStoreParameters {
|
||||
keyPath?: string | string[];
|
||||
autoIncrement?: boolean;
|
||||
}
|
||||
|
||||
interface IDBIndexParameters {
|
||||
unique?: boolean;
|
||||
multiEntry?: boolean;
|
||||
}
|
||||
|
||||
interface NodeListOf<TNode extends Node> extends NodeList {
|
||||
length: number;
|
||||
item(index: number): TNode;
|
||||
@@ -12824,6 +12841,15 @@ interface ProgressEventInit extends EventInit {
|
||||
total?: number;
|
||||
}
|
||||
|
||||
interface HTMLTemplateElement extends HTMLElement {
|
||||
content: DocumentFragment;
|
||||
}
|
||||
|
||||
declare var HTMLTemplateElement: {
|
||||
prototype: HTMLTemplateElement;
|
||||
new(): HTMLTemplateElement;
|
||||
}
|
||||
|
||||
declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
|
||||
|
||||
interface ErrorEventHandler {
|
||||
|
||||
Vendored
+72
-28
@@ -22,7 +22,7 @@ interface Symbol {
|
||||
/** Returns the primitive value of the specified object. */
|
||||
valueOf(): Object;
|
||||
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "Symbol";
|
||||
}
|
||||
|
||||
interface SymbolConstructor {
|
||||
@@ -580,7 +580,7 @@ interface IterableIterator<T> extends Iterator<T> {
|
||||
}
|
||||
|
||||
interface GeneratorFunction extends Function {
|
||||
|
||||
[Symbol.toStringTag]: "GeneratorFunction";
|
||||
}
|
||||
|
||||
interface GeneratorFunctionConstructor {
|
||||
@@ -705,7 +705,7 @@ interface Math {
|
||||
*/
|
||||
cbrt(x: number): number;
|
||||
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "Math";
|
||||
}
|
||||
|
||||
interface Date {
|
||||
@@ -822,7 +822,7 @@ interface Map<K, V> {
|
||||
size: number;
|
||||
values(): IterableIterator<V>;
|
||||
[Symbol.iterator]():IterableIterator<[K,V]>;
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "Map";
|
||||
}
|
||||
|
||||
interface MapConstructor {
|
||||
@@ -839,7 +839,7 @@ interface WeakMap<K, V> {
|
||||
get(key: K): V;
|
||||
has(key: K): boolean;
|
||||
set(key: K, value?: V): WeakMap<K, V>;
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "WeakMap";
|
||||
}
|
||||
|
||||
interface WeakMapConstructor {
|
||||
@@ -861,7 +861,7 @@ interface Set<T> {
|
||||
size: number;
|
||||
values(): IterableIterator<T>;
|
||||
[Symbol.iterator]():IterableIterator<T>;
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "Set";
|
||||
}
|
||||
|
||||
interface SetConstructor {
|
||||
@@ -877,7 +877,7 @@ interface WeakSet<T> {
|
||||
clear(): void;
|
||||
delete(value: T): boolean;
|
||||
has(value: T): boolean;
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "WeakSet";
|
||||
}
|
||||
|
||||
interface WeakSetConstructor {
|
||||
@@ -889,7 +889,7 @@ interface WeakSetConstructor {
|
||||
declare var WeakSet: WeakSetConstructor;
|
||||
|
||||
interface JSON {
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "JSON";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -899,11 +899,11 @@ interface JSON {
|
||||
* buffer as needed.
|
||||
*/
|
||||
interface ArrayBuffer {
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "ArrayBuffer";
|
||||
}
|
||||
|
||||
interface DataView {
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "DataView";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -924,6 +924,7 @@ interface Int8Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Int8Array";
|
||||
}
|
||||
|
||||
interface Int8ArrayConstructor {
|
||||
@@ -956,6 +957,7 @@ interface Uint8Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "UInt8Array";
|
||||
}
|
||||
|
||||
interface Uint8ArrayConstructor {
|
||||
@@ -991,6 +993,7 @@ interface Uint8ClampedArray {
|
||||
values(): IterableIterator<number>;
|
||||
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Uint8ClampedArray";
|
||||
}
|
||||
|
||||
interface Uint8ClampedArrayConstructor {
|
||||
@@ -1028,6 +1031,7 @@ interface Int16Array {
|
||||
|
||||
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Int16Array";
|
||||
}
|
||||
|
||||
interface Int16ArrayConstructor {
|
||||
@@ -1060,6 +1064,7 @@ interface Uint16Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Uint16Array";
|
||||
}
|
||||
|
||||
interface Uint16ArrayConstructor {
|
||||
@@ -1092,6 +1097,7 @@ interface Int32Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Int32Array";
|
||||
}
|
||||
|
||||
interface Int32ArrayConstructor {
|
||||
@@ -1124,6 +1130,7 @@ interface Uint32Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Uint32Array";
|
||||
}
|
||||
|
||||
interface Uint32ArrayConstructor {
|
||||
@@ -1156,6 +1163,7 @@ interface Float32Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Float32Array";
|
||||
}
|
||||
|
||||
interface Float32ArrayConstructor {
|
||||
@@ -1188,6 +1196,7 @@ interface Float64Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Float64Array";
|
||||
}
|
||||
|
||||
interface Float64ArrayConstructor {
|
||||
@@ -1239,7 +1248,7 @@ declare namespace Reflect {
|
||||
function isExtensible(target: any): boolean;
|
||||
function ownKeys(target: any): Array<PropertyKey>;
|
||||
function preventExtensions(target: any): boolean;
|
||||
function set(target: any, propertyKey: PropertyKey, value: any, receiver? :any): boolean;
|
||||
function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean;
|
||||
function setPrototypeOf(target: any, proto: any): boolean;
|
||||
}
|
||||
|
||||
@@ -1264,7 +1273,7 @@ interface Promise<T> {
|
||||
catch(onrejected?: (reason: any) => T | PromiseLike<T>): Promise<T>;
|
||||
catch(onrejected?: (reason: any) => void): Promise<T>;
|
||||
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "Promise";
|
||||
}
|
||||
|
||||
interface PromiseConstructor {
|
||||
@@ -1287,7 +1296,16 @@ interface PromiseConstructor {
|
||||
* @param values An array of Promises.
|
||||
* @returns A new Promise.
|
||||
*/
|
||||
all<T>(values: Iterable<T | PromiseLike<T>>): Promise<T[]>;
|
||||
all<T1, T2>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>;
|
||||
all<T1, T2, T3>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<[T1, T2, T3]>;
|
||||
all<T1, T2, T3, T4>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>]): Promise<[T1, T2, T3, T4]>;
|
||||
all<T1, T2, T3, T4, T5>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>]): Promise<[T1, T2, T3, T4, T5]>;
|
||||
all<T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<[T1, T2, T3, T4, T5, T6]>;
|
||||
all<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<[T1, T2, T3, T4, T5, T6, T7]>;
|
||||
all<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
|
||||
all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
|
||||
all<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>, T10 | PromiseLike<T10>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
|
||||
all<TAll>(values: Iterable<TAll | PromiseLike<TAll>>): Promise<TAll[]>;
|
||||
|
||||
/**
|
||||
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
|
||||
@@ -5677,6 +5695,7 @@ interface AudioContext extends EventTarget {
|
||||
destination: AudioDestinationNode;
|
||||
listener: AudioListener;
|
||||
sampleRate: number;
|
||||
state: string;
|
||||
createAnalyser(): AnalyserNode;
|
||||
createBiquadFilter(): BiquadFilterNode;
|
||||
createBuffer(numberOfChannels: number, length: number, sampleRate: number): AudioBuffer;
|
||||
@@ -7414,6 +7433,7 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
|
||||
* Gets or sets the version attribute specified in the declaration of an XML document.
|
||||
*/
|
||||
xmlVersion: string;
|
||||
currentScript: HTMLScriptElement;
|
||||
adoptNode(source: Node): Node;
|
||||
captureEvents(): void;
|
||||
clear(): void;
|
||||
@@ -8129,6 +8149,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
|
||||
tagName: string;
|
||||
id: string;
|
||||
className: string;
|
||||
innerHTML: string;
|
||||
getAttribute(name?: string): string;
|
||||
getAttributeNS(namespaceURI: string, localName: string): string;
|
||||
getAttributeNode(name: string): Attr;
|
||||
@@ -8324,7 +8345,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
|
||||
removeAttributeNode(oldAttr: Attr): Attr;
|
||||
requestFullscreen(): void;
|
||||
requestPointerLock(): void;
|
||||
setAttribute(name?: string, value?: string): void;
|
||||
setAttribute(name: string, value: string): void;
|
||||
setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;
|
||||
setAttributeNode(newAttr: Attr): Attr;
|
||||
setAttributeNodeNS(newAttr: Attr): Attr;
|
||||
@@ -8333,6 +8354,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
|
||||
webkitRequestFullScreen(): void;
|
||||
webkitRequestFullscreen(): void;
|
||||
getElementsByClassName(classNames: string): NodeListOf<Element>;
|
||||
matches(selector: string): boolean;
|
||||
addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
|
||||
@@ -9317,7 +9339,6 @@ interface HTMLElement extends Element {
|
||||
title: string;
|
||||
blur(): void;
|
||||
click(): void;
|
||||
contains(child: HTMLElement): boolean;
|
||||
dragDrop(): boolean;
|
||||
focus(): void;
|
||||
insertAdjacentElement(position: string, insertedElement: Element): Element;
|
||||
@@ -10867,7 +10888,7 @@ interface HTMLMediaElement extends HTMLElement {
|
||||
* Gets or sets the current playback position, in seconds.
|
||||
*/
|
||||
preload: string;
|
||||
readyState: any;
|
||||
readyState: number;
|
||||
/**
|
||||
* Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked.
|
||||
*/
|
||||
@@ -11491,7 +11512,7 @@ interface HTMLSelectElement extends HTMLElement {
|
||||
* Sets or retrieves the name of the object.
|
||||
*/
|
||||
name: string;
|
||||
options: HTMLSelectElement;
|
||||
options: HTMLCollection;
|
||||
/**
|
||||
* When present, marks an element that can't be submitted without a value.
|
||||
*/
|
||||
@@ -11524,6 +11545,7 @@ interface HTMLSelectElement extends HTMLElement {
|
||||
* Returns whether an element will successfully validate based on forms validation rules and constraints.
|
||||
*/
|
||||
willValidate: boolean;
|
||||
selectedOptions: HTMLCollection;
|
||||
/**
|
||||
* Adds an element to the areas, controlRange, or options collection.
|
||||
* @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection.
|
||||
@@ -11777,19 +11799,19 @@ interface HTMLTableElement extends HTMLElement {
|
||||
/**
|
||||
* Creates an empty caption element in the table.
|
||||
*/
|
||||
createCaption(): HTMLElement;
|
||||
createCaption(): HTMLTableCaptionElement;
|
||||
/**
|
||||
* Creates an empty tBody element in the table.
|
||||
*/
|
||||
createTBody(): HTMLElement;
|
||||
createTBody(): HTMLTableSectionElement;
|
||||
/**
|
||||
* Creates an empty tFoot element in the table.
|
||||
*/
|
||||
createTFoot(): HTMLElement;
|
||||
createTFoot(): HTMLTableSectionElement;
|
||||
/**
|
||||
* Returns the tHead element object if successful, or null otherwise.
|
||||
*/
|
||||
createTHead(): HTMLElement;
|
||||
createTHead(): HTMLTableSectionElement;
|
||||
/**
|
||||
* Deletes the caption element and its contents from the table.
|
||||
*/
|
||||
@@ -11811,7 +11833,7 @@ interface HTMLTableElement extends HTMLElement {
|
||||
* Creates a new row (tr) in the table, and adds the row to the rows collection.
|
||||
* @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
|
||||
*/
|
||||
insertRow(index?: number): HTMLElement;
|
||||
insertRow(index?: number): HTMLTableRowElement;
|
||||
}
|
||||
|
||||
declare var HTMLTableElement: {
|
||||
@@ -11862,7 +11884,7 @@ interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {
|
||||
* Creates a new cell in the table row, and adds the cell to the cells collection.
|
||||
* @param index Number that specifies where to insert the cell in the tr. The default value is -1, which appends the new cell to the end of the cells collection.
|
||||
*/
|
||||
insertCell(index?: number): HTMLElement;
|
||||
insertCell(index?: number): HTMLTableCellElement;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
|
||||
@@ -11889,7 +11911,7 @@ interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {
|
||||
* Creates a new row (tr) in the table, and adds the row to the rows collection.
|
||||
* @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
|
||||
*/
|
||||
insertRow(index?: number): HTMLElement;
|
||||
insertRow(index?: number): HTMLTableRowElement;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
|
||||
@@ -12278,7 +12300,7 @@ interface IDBDatabase extends EventTarget {
|
||||
onerror: (ev: Event) => any;
|
||||
version: string;
|
||||
close(): void;
|
||||
createObjectStore(name: string, optionalParameters?: any): IDBObjectStore;
|
||||
createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
|
||||
deleteObjectStore(name: string): void;
|
||||
transaction(storeNames: any, mode?: string): IDBTransaction;
|
||||
addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
|
||||
@@ -12303,10 +12325,11 @@ declare var IDBFactory: {
|
||||
}
|
||||
|
||||
interface IDBIndex {
|
||||
keyPath: string;
|
||||
keyPath: string | string[];
|
||||
name: string;
|
||||
objectStore: IDBObjectStore;
|
||||
unique: boolean;
|
||||
multiEntry: boolean;
|
||||
count(key?: any): IDBRequest;
|
||||
get(key: any): IDBRequest;
|
||||
getKey(key: any): IDBRequest;
|
||||
@@ -12343,7 +12366,7 @@ interface IDBObjectStore {
|
||||
add(value: any, key?: any): IDBRequest;
|
||||
clear(): IDBRequest;
|
||||
count(key?: any): IDBRequest;
|
||||
createIndex(name: string, keyPath: string, optionalParameters?: any): IDBIndex;
|
||||
createIndex(name: string, keyPath: string | string[], optionalParameters?: IDBIndexParameters): IDBIndex;
|
||||
delete(key: any): IDBRequest;
|
||||
deleteIndex(indexName: string): void;
|
||||
get(key: any): IDBRequest;
|
||||
@@ -12427,7 +12450,7 @@ declare var IDBVersionChangeEvent: {
|
||||
}
|
||||
|
||||
interface ImageData {
|
||||
data: number[];
|
||||
data: Uint8ClampedArray;
|
||||
height: number;
|
||||
width: number;
|
||||
}
|
||||
@@ -13225,6 +13248,7 @@ interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorConte
|
||||
getGamepads(): Gamepad[];
|
||||
javaEnabled(): boolean;
|
||||
msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;
|
||||
vibrate(pattern: number | number[]): boolean;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
|
||||
@@ -13265,6 +13289,7 @@ interface Node extends EventTarget {
|
||||
normalize(): void;
|
||||
removeChild(oldChild: Node): Node;
|
||||
replaceChild(newChild: Node, oldChild: Node): Node;
|
||||
contains(node: Node): boolean;
|
||||
ATTRIBUTE_NODE: number;
|
||||
CDATA_SECTION_NODE: number;
|
||||
COMMENT_NODE: number;
|
||||
@@ -17928,6 +17953,16 @@ interface XMLHttpRequestEventTarget {
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
|
||||
interface IDBObjectStoreParameters {
|
||||
keyPath?: string | string[];
|
||||
autoIncrement?: boolean;
|
||||
}
|
||||
|
||||
interface IDBIndexParameters {
|
||||
unique?: boolean;
|
||||
multiEntry?: boolean;
|
||||
}
|
||||
|
||||
interface NodeListOf<TNode extends Node> extends NodeList {
|
||||
length: number;
|
||||
item(index: number): TNode;
|
||||
@@ -17963,6 +17998,15 @@ interface ProgressEventInit extends EventInit {
|
||||
total?: number;
|
||||
}
|
||||
|
||||
interface HTMLTemplateElement extends HTMLElement {
|
||||
content: DocumentFragment;
|
||||
}
|
||||
|
||||
declare var HTMLTemplateElement: {
|
||||
prototype: HTMLTemplateElement;
|
||||
new(): HTMLTemplateElement;
|
||||
}
|
||||
|
||||
declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
|
||||
|
||||
interface ErrorEventHandler {
|
||||
|
||||
Vendored
+15
-4
@@ -528,7 +528,7 @@ interface IDBDatabase extends EventTarget {
|
||||
onerror: (ev: Event) => any;
|
||||
version: string;
|
||||
close(): void;
|
||||
createObjectStore(name: string, optionalParameters?: any): IDBObjectStore;
|
||||
createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
|
||||
deleteObjectStore(name: string): void;
|
||||
transaction(storeNames: any, mode?: string): IDBTransaction;
|
||||
addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
|
||||
@@ -553,10 +553,11 @@ declare var IDBFactory: {
|
||||
}
|
||||
|
||||
interface IDBIndex {
|
||||
keyPath: string;
|
||||
keyPath: string | string[];
|
||||
name: string;
|
||||
objectStore: IDBObjectStore;
|
||||
unique: boolean;
|
||||
multiEntry: boolean;
|
||||
count(key?: any): IDBRequest;
|
||||
get(key: any): IDBRequest;
|
||||
getKey(key: any): IDBRequest;
|
||||
@@ -593,7 +594,7 @@ interface IDBObjectStore {
|
||||
add(value: any, key?: any): IDBRequest;
|
||||
clear(): IDBRequest;
|
||||
count(key?: any): IDBRequest;
|
||||
createIndex(name: string, keyPath: string, optionalParameters?: any): IDBIndex;
|
||||
createIndex(name: string, keyPath: string | string[], optionalParameters?: IDBIndexParameters): IDBIndex;
|
||||
delete(key: any): IDBRequest;
|
||||
deleteIndex(indexName: string): void;
|
||||
get(key: any): IDBRequest;
|
||||
@@ -677,7 +678,7 @@ declare var IDBVersionChangeEvent: {
|
||||
}
|
||||
|
||||
interface ImageData {
|
||||
data: number[];
|
||||
data: Uint8ClampedArray;
|
||||
height: number;
|
||||
width: number;
|
||||
}
|
||||
@@ -1109,6 +1110,16 @@ interface WorkerUtils extends Object, WindowBase64 {
|
||||
setTimeout(handler: any, timeout?: any, ...args: any[]): number;
|
||||
}
|
||||
|
||||
interface IDBObjectStoreParameters {
|
||||
keyPath?: string | string[];
|
||||
autoIncrement?: boolean;
|
||||
}
|
||||
|
||||
interface IDBIndexParameters {
|
||||
unique?: boolean;
|
||||
multiEntry?: boolean;
|
||||
}
|
||||
|
||||
interface BlobPropertyBag {
|
||||
type?: string;
|
||||
endings?: string;
|
||||
|
||||
+4090
-3335
File diff suppressed because it is too large
Load Diff
+5111
-4590
File diff suppressed because it is too large
Load Diff
Vendored
+274
-167
@@ -194,118 +194,120 @@ declare namespace ts {
|
||||
UnionType = 158,
|
||||
IntersectionType = 159,
|
||||
ParenthesizedType = 160,
|
||||
ObjectBindingPattern = 161,
|
||||
ArrayBindingPattern = 162,
|
||||
BindingElement = 163,
|
||||
ArrayLiteralExpression = 164,
|
||||
ObjectLiteralExpression = 165,
|
||||
PropertyAccessExpression = 166,
|
||||
ElementAccessExpression = 167,
|
||||
CallExpression = 168,
|
||||
NewExpression = 169,
|
||||
TaggedTemplateExpression = 170,
|
||||
TypeAssertionExpression = 171,
|
||||
ParenthesizedExpression = 172,
|
||||
FunctionExpression = 173,
|
||||
ArrowFunction = 174,
|
||||
DeleteExpression = 175,
|
||||
TypeOfExpression = 176,
|
||||
VoidExpression = 177,
|
||||
AwaitExpression = 178,
|
||||
PrefixUnaryExpression = 179,
|
||||
PostfixUnaryExpression = 180,
|
||||
BinaryExpression = 181,
|
||||
ConditionalExpression = 182,
|
||||
TemplateExpression = 183,
|
||||
YieldExpression = 184,
|
||||
SpreadElementExpression = 185,
|
||||
ClassExpression = 186,
|
||||
OmittedExpression = 187,
|
||||
ExpressionWithTypeArguments = 188,
|
||||
AsExpression = 189,
|
||||
TemplateSpan = 190,
|
||||
SemicolonClassElement = 191,
|
||||
Block = 192,
|
||||
VariableStatement = 193,
|
||||
EmptyStatement = 194,
|
||||
ExpressionStatement = 195,
|
||||
IfStatement = 196,
|
||||
DoStatement = 197,
|
||||
WhileStatement = 198,
|
||||
ForStatement = 199,
|
||||
ForInStatement = 200,
|
||||
ForOfStatement = 201,
|
||||
ContinueStatement = 202,
|
||||
BreakStatement = 203,
|
||||
ReturnStatement = 204,
|
||||
WithStatement = 205,
|
||||
SwitchStatement = 206,
|
||||
LabeledStatement = 207,
|
||||
ThrowStatement = 208,
|
||||
TryStatement = 209,
|
||||
DebuggerStatement = 210,
|
||||
VariableDeclaration = 211,
|
||||
VariableDeclarationList = 212,
|
||||
FunctionDeclaration = 213,
|
||||
ClassDeclaration = 214,
|
||||
InterfaceDeclaration = 215,
|
||||
TypeAliasDeclaration = 216,
|
||||
EnumDeclaration = 217,
|
||||
ModuleDeclaration = 218,
|
||||
ModuleBlock = 219,
|
||||
CaseBlock = 220,
|
||||
ImportEqualsDeclaration = 221,
|
||||
ImportDeclaration = 222,
|
||||
ImportClause = 223,
|
||||
NamespaceImport = 224,
|
||||
NamedImports = 225,
|
||||
ImportSpecifier = 226,
|
||||
ExportAssignment = 227,
|
||||
ExportDeclaration = 228,
|
||||
NamedExports = 229,
|
||||
ExportSpecifier = 230,
|
||||
MissingDeclaration = 231,
|
||||
ExternalModuleReference = 232,
|
||||
JsxElement = 233,
|
||||
JsxSelfClosingElement = 234,
|
||||
JsxOpeningElement = 235,
|
||||
JsxText = 236,
|
||||
JsxClosingElement = 237,
|
||||
JsxAttribute = 238,
|
||||
JsxSpreadAttribute = 239,
|
||||
JsxExpression = 240,
|
||||
CaseClause = 241,
|
||||
DefaultClause = 242,
|
||||
HeritageClause = 243,
|
||||
CatchClause = 244,
|
||||
PropertyAssignment = 245,
|
||||
ShorthandPropertyAssignment = 246,
|
||||
EnumMember = 247,
|
||||
SourceFile = 248,
|
||||
JSDocTypeExpression = 249,
|
||||
JSDocAllType = 250,
|
||||
JSDocUnknownType = 251,
|
||||
JSDocArrayType = 252,
|
||||
JSDocUnionType = 253,
|
||||
JSDocTupleType = 254,
|
||||
JSDocNullableType = 255,
|
||||
JSDocNonNullableType = 256,
|
||||
JSDocRecordType = 257,
|
||||
JSDocRecordMember = 258,
|
||||
JSDocTypeReference = 259,
|
||||
JSDocOptionalType = 260,
|
||||
JSDocFunctionType = 261,
|
||||
JSDocVariadicType = 262,
|
||||
JSDocConstructorType = 263,
|
||||
JSDocThisType = 264,
|
||||
JSDocComment = 265,
|
||||
JSDocTag = 266,
|
||||
JSDocParameterTag = 267,
|
||||
JSDocReturnTag = 268,
|
||||
JSDocTypeTag = 269,
|
||||
JSDocTemplateTag = 270,
|
||||
SyntaxList = 271,
|
||||
Count = 272,
|
||||
ThisType = 161,
|
||||
StringLiteralType = 162,
|
||||
ObjectBindingPattern = 163,
|
||||
ArrayBindingPattern = 164,
|
||||
BindingElement = 165,
|
||||
ArrayLiteralExpression = 166,
|
||||
ObjectLiteralExpression = 167,
|
||||
PropertyAccessExpression = 168,
|
||||
ElementAccessExpression = 169,
|
||||
CallExpression = 170,
|
||||
NewExpression = 171,
|
||||
TaggedTemplateExpression = 172,
|
||||
TypeAssertionExpression = 173,
|
||||
ParenthesizedExpression = 174,
|
||||
FunctionExpression = 175,
|
||||
ArrowFunction = 176,
|
||||
DeleteExpression = 177,
|
||||
TypeOfExpression = 178,
|
||||
VoidExpression = 179,
|
||||
AwaitExpression = 180,
|
||||
PrefixUnaryExpression = 181,
|
||||
PostfixUnaryExpression = 182,
|
||||
BinaryExpression = 183,
|
||||
ConditionalExpression = 184,
|
||||
TemplateExpression = 185,
|
||||
YieldExpression = 186,
|
||||
SpreadElementExpression = 187,
|
||||
ClassExpression = 188,
|
||||
OmittedExpression = 189,
|
||||
ExpressionWithTypeArguments = 190,
|
||||
AsExpression = 191,
|
||||
TemplateSpan = 192,
|
||||
SemicolonClassElement = 193,
|
||||
Block = 194,
|
||||
VariableStatement = 195,
|
||||
EmptyStatement = 196,
|
||||
ExpressionStatement = 197,
|
||||
IfStatement = 198,
|
||||
DoStatement = 199,
|
||||
WhileStatement = 200,
|
||||
ForStatement = 201,
|
||||
ForInStatement = 202,
|
||||
ForOfStatement = 203,
|
||||
ContinueStatement = 204,
|
||||
BreakStatement = 205,
|
||||
ReturnStatement = 206,
|
||||
WithStatement = 207,
|
||||
SwitchStatement = 208,
|
||||
LabeledStatement = 209,
|
||||
ThrowStatement = 210,
|
||||
TryStatement = 211,
|
||||
DebuggerStatement = 212,
|
||||
VariableDeclaration = 213,
|
||||
VariableDeclarationList = 214,
|
||||
FunctionDeclaration = 215,
|
||||
ClassDeclaration = 216,
|
||||
InterfaceDeclaration = 217,
|
||||
TypeAliasDeclaration = 218,
|
||||
EnumDeclaration = 219,
|
||||
ModuleDeclaration = 220,
|
||||
ModuleBlock = 221,
|
||||
CaseBlock = 222,
|
||||
ImportEqualsDeclaration = 223,
|
||||
ImportDeclaration = 224,
|
||||
ImportClause = 225,
|
||||
NamespaceImport = 226,
|
||||
NamedImports = 227,
|
||||
ImportSpecifier = 228,
|
||||
ExportAssignment = 229,
|
||||
ExportDeclaration = 230,
|
||||
NamedExports = 231,
|
||||
ExportSpecifier = 232,
|
||||
MissingDeclaration = 233,
|
||||
ExternalModuleReference = 234,
|
||||
JsxElement = 235,
|
||||
JsxSelfClosingElement = 236,
|
||||
JsxOpeningElement = 237,
|
||||
JsxText = 238,
|
||||
JsxClosingElement = 239,
|
||||
JsxAttribute = 240,
|
||||
JsxSpreadAttribute = 241,
|
||||
JsxExpression = 242,
|
||||
CaseClause = 243,
|
||||
DefaultClause = 244,
|
||||
HeritageClause = 245,
|
||||
CatchClause = 246,
|
||||
PropertyAssignment = 247,
|
||||
ShorthandPropertyAssignment = 248,
|
||||
EnumMember = 249,
|
||||
SourceFile = 250,
|
||||
JSDocTypeExpression = 251,
|
||||
JSDocAllType = 252,
|
||||
JSDocUnknownType = 253,
|
||||
JSDocArrayType = 254,
|
||||
JSDocUnionType = 255,
|
||||
JSDocTupleType = 256,
|
||||
JSDocNullableType = 257,
|
||||
JSDocNonNullableType = 258,
|
||||
JSDocRecordType = 259,
|
||||
JSDocRecordMember = 260,
|
||||
JSDocTypeReference = 261,
|
||||
JSDocOptionalType = 262,
|
||||
JSDocFunctionType = 263,
|
||||
JSDocVariadicType = 264,
|
||||
JSDocConstructorType = 265,
|
||||
JSDocThisType = 266,
|
||||
JSDocComment = 267,
|
||||
JSDocTag = 268,
|
||||
JSDocParameterTag = 269,
|
||||
JSDocReturnTag = 270,
|
||||
JSDocTypeTag = 271,
|
||||
JSDocTemplateTag = 272,
|
||||
SyntaxList = 273,
|
||||
Count = 274,
|
||||
FirstAssignment = 56,
|
||||
LastAssignment = 68,
|
||||
FirstReservedWord = 70,
|
||||
@@ -314,8 +316,8 @@ declare namespace ts {
|
||||
LastKeyword = 134,
|
||||
FirstFutureReservedWord = 106,
|
||||
LastFutureReservedWord = 114,
|
||||
FirstTypeNode = 151,
|
||||
LastTypeNode = 160,
|
||||
FirstTypeNode = 150,
|
||||
LastTypeNode = 162,
|
||||
FirstPunctuation = 15,
|
||||
LastPunctuation = 68,
|
||||
FirstToken = 0,
|
||||
@@ -359,10 +361,14 @@ declare namespace ts {
|
||||
}
|
||||
enum JsxFlags {
|
||||
None = 0,
|
||||
/** An element from a named property of the JSX.IntrinsicElements interface */
|
||||
IntrinsicNamedElement = 1,
|
||||
/** An element inferred from the string index signature of the JSX.IntrinsicElements interface */
|
||||
IntrinsicIndexedElement = 2,
|
||||
ClassElement = 4,
|
||||
UnknownElement = 8,
|
||||
/** An element backed by a class, class-like, or function value */
|
||||
ValueElement = 4,
|
||||
/** Element resolution failed */
|
||||
UnknownElement = 16,
|
||||
IntrinsicElement = 3,
|
||||
}
|
||||
interface Node extends TextRange {
|
||||
@@ -375,9 +381,11 @@ declare namespace ts {
|
||||
interface NodeArray<T> extends Array<T>, TextRange {
|
||||
hasTrailingComma?: boolean;
|
||||
}
|
||||
interface ModifiersArray extends NodeArray<Node> {
|
||||
interface ModifiersArray extends NodeArray<Modifier> {
|
||||
flags: number;
|
||||
}
|
||||
interface Modifier extends Node {
|
||||
}
|
||||
interface Identifier extends PrimaryExpression {
|
||||
text: string;
|
||||
originalKeywordKind?: SyntaxKind;
|
||||
@@ -393,6 +401,9 @@ declare namespace ts {
|
||||
_declarationBrand: any;
|
||||
name?: DeclarationName;
|
||||
}
|
||||
interface DeclarationStatement extends Declaration, Statement {
|
||||
name?: Identifier;
|
||||
}
|
||||
interface ComputedPropertyName extends Node {
|
||||
expression: Expression;
|
||||
}
|
||||
@@ -405,10 +416,15 @@ declare namespace ts {
|
||||
expression?: Expression;
|
||||
}
|
||||
interface SignatureDeclaration extends Declaration {
|
||||
name?: PropertyName;
|
||||
typeParameters?: NodeArray<TypeParameterDeclaration>;
|
||||
parameters: NodeArray<ParameterDeclaration>;
|
||||
type?: TypeNode;
|
||||
}
|
||||
interface CallSignatureDeclaration extends SignatureDeclaration, TypeElement {
|
||||
}
|
||||
interface ConstructSignatureDeclaration extends SignatureDeclaration, TypeElement {
|
||||
}
|
||||
interface VariableDeclaration extends Declaration {
|
||||
parent?: VariableDeclarationList;
|
||||
name: Identifier | BindingPattern;
|
||||
@@ -431,18 +447,25 @@ declare namespace ts {
|
||||
name: Identifier | BindingPattern;
|
||||
initializer?: Expression;
|
||||
}
|
||||
interface PropertyDeclaration extends Declaration, ClassElement {
|
||||
name: DeclarationName;
|
||||
interface PropertySignature extends TypeElement {
|
||||
name: PropertyName;
|
||||
questionToken?: Node;
|
||||
type?: TypeNode;
|
||||
initializer?: Expression;
|
||||
}
|
||||
interface PropertyDeclaration extends ClassElement {
|
||||
questionToken?: Node;
|
||||
name: PropertyName;
|
||||
type?: TypeNode;
|
||||
initializer?: Expression;
|
||||
}
|
||||
interface ObjectLiteralElement extends Declaration {
|
||||
_objectLiteralBrandBrand: any;
|
||||
name?: PropertyName;
|
||||
}
|
||||
interface PropertyAssignment extends ObjectLiteralElement {
|
||||
_propertyAssignmentBrand: any;
|
||||
name: DeclarationName;
|
||||
name: PropertyName;
|
||||
questionToken?: Node;
|
||||
initializer: Expression;
|
||||
}
|
||||
@@ -460,9 +483,16 @@ declare namespace ts {
|
||||
type?: TypeNode;
|
||||
initializer?: Expression;
|
||||
}
|
||||
interface PropertyLikeDeclaration extends Declaration {
|
||||
name: PropertyName;
|
||||
}
|
||||
interface BindingPattern extends Node {
|
||||
elements: NodeArray<BindingElement>;
|
||||
}
|
||||
interface ObjectBindingPattern extends BindingPattern {
|
||||
}
|
||||
interface ArrayBindingPattern extends BindingPattern {
|
||||
}
|
||||
/**
|
||||
* Several node kinds share function-like features such as a signature,
|
||||
* a name, and a body. These nodes should extend FunctionLikeDeclaration.
|
||||
@@ -477,45 +507,61 @@ declare namespace ts {
|
||||
questionToken?: Node;
|
||||
body?: Block | Expression;
|
||||
}
|
||||
interface FunctionDeclaration extends FunctionLikeDeclaration, Statement {
|
||||
interface FunctionDeclaration extends FunctionLikeDeclaration, DeclarationStatement {
|
||||
name?: Identifier;
|
||||
body?: Block;
|
||||
body?: FunctionBody;
|
||||
}
|
||||
interface MethodSignature extends SignatureDeclaration, TypeElement {
|
||||
name: PropertyName;
|
||||
}
|
||||
interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement {
|
||||
body?: Block;
|
||||
name: PropertyName;
|
||||
body?: FunctionBody;
|
||||
}
|
||||
interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement {
|
||||
body?: Block;
|
||||
body?: FunctionBody;
|
||||
}
|
||||
interface SemicolonClassElement extends ClassElement {
|
||||
_semicolonClassElementBrand: any;
|
||||
}
|
||||
interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement {
|
||||
_accessorDeclarationBrand: any;
|
||||
body: Block;
|
||||
name: PropertyName;
|
||||
body: FunctionBody;
|
||||
}
|
||||
interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement {
|
||||
interface GetAccessorDeclaration extends AccessorDeclaration {
|
||||
}
|
||||
interface SetAccessorDeclaration extends AccessorDeclaration {
|
||||
}
|
||||
interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement, TypeElement {
|
||||
_indexSignatureDeclarationBrand: any;
|
||||
}
|
||||
interface TypeNode extends Node {
|
||||
_typeNodeBrand: any;
|
||||
}
|
||||
interface ThisTypeNode extends TypeNode {
|
||||
_thisTypeNodeBrand: any;
|
||||
}
|
||||
interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration {
|
||||
_functionOrConstructorTypeNodeBrand: any;
|
||||
}
|
||||
interface FunctionTypeNode extends FunctionOrConstructorTypeNode {
|
||||
}
|
||||
interface ConstructorTypeNode extends FunctionOrConstructorTypeNode {
|
||||
}
|
||||
interface TypeReferenceNode extends TypeNode {
|
||||
typeName: EntityName;
|
||||
typeArguments?: NodeArray<TypeNode>;
|
||||
}
|
||||
interface TypePredicateNode extends TypeNode {
|
||||
parameterName: Identifier;
|
||||
parameterName: Identifier | ThisTypeNode;
|
||||
type: TypeNode;
|
||||
}
|
||||
interface TypeQueryNode extends TypeNode {
|
||||
exprName: EntityName;
|
||||
}
|
||||
interface TypeLiteralNode extends TypeNode, Declaration {
|
||||
members: NodeArray<Node>;
|
||||
members: NodeArray<TypeElement>;
|
||||
}
|
||||
interface ArrayTypeNode extends TypeNode {
|
||||
elementType: TypeNode;
|
||||
@@ -533,13 +579,18 @@ declare namespace ts {
|
||||
interface ParenthesizedTypeNode extends TypeNode {
|
||||
type: TypeNode;
|
||||
}
|
||||
interface StringLiteral extends LiteralExpression, TypeNode {
|
||||
interface StringLiteralTypeNode extends LiteralLikeNode, TypeNode {
|
||||
_stringLiteralTypeBrand: any;
|
||||
}
|
||||
interface StringLiteral extends LiteralExpression {
|
||||
_stringLiteralBrand: any;
|
||||
}
|
||||
interface Expression extends Node {
|
||||
_expressionBrand: any;
|
||||
contextualType?: Type;
|
||||
}
|
||||
interface OmittedExpression extends Expression {
|
||||
}
|
||||
interface UnaryExpression extends Expression {
|
||||
_unaryExpressionBrand: any;
|
||||
}
|
||||
@@ -594,25 +645,34 @@ declare namespace ts {
|
||||
colonToken: Node;
|
||||
whenFalse: Expression;
|
||||
}
|
||||
type FunctionBody = Block;
|
||||
type ConciseBody = FunctionBody | Expression;
|
||||
interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration {
|
||||
name?: Identifier;
|
||||
body: Block | Expression;
|
||||
body: FunctionBody;
|
||||
}
|
||||
interface ArrowFunction extends Expression, FunctionLikeDeclaration {
|
||||
equalsGreaterThanToken: Node;
|
||||
body: ConciseBody;
|
||||
}
|
||||
interface LiteralExpression extends PrimaryExpression {
|
||||
interface LiteralLikeNode extends Node {
|
||||
text: string;
|
||||
isUnterminated?: boolean;
|
||||
hasExtendedUnicodeEscape?: boolean;
|
||||
}
|
||||
interface LiteralExpression extends LiteralLikeNode, PrimaryExpression {
|
||||
_literalExpressionBrand: any;
|
||||
}
|
||||
interface TemplateLiteralFragment extends LiteralLikeNode {
|
||||
_templateLiteralFragmentBrand: any;
|
||||
}
|
||||
interface TemplateExpression extends PrimaryExpression {
|
||||
head: LiteralExpression;
|
||||
head: TemplateLiteralFragment;
|
||||
templateSpans: NodeArray<TemplateSpan>;
|
||||
}
|
||||
interface TemplateSpan extends Node {
|
||||
expression: Expression;
|
||||
literal: LiteralExpression;
|
||||
literal: TemplateLiteralFragment;
|
||||
}
|
||||
interface ParenthesizedExpression extends PrimaryExpression {
|
||||
expression: Expression;
|
||||
@@ -694,6 +754,14 @@ declare namespace ts {
|
||||
interface Statement extends Node {
|
||||
_statementBrand: any;
|
||||
}
|
||||
interface EmptyStatement extends Statement {
|
||||
}
|
||||
interface DebuggerStatement extends Statement {
|
||||
}
|
||||
interface MissingDeclaration extends DeclarationStatement, ClassElement, ObjectLiteralElement, TypeElement {
|
||||
name?: Identifier;
|
||||
}
|
||||
type BlockLike = SourceFile | Block | ModuleBlock | CaseClause;
|
||||
interface Block extends Statement {
|
||||
statements: NodeArray<Statement>;
|
||||
}
|
||||
@@ -730,9 +798,13 @@ declare namespace ts {
|
||||
initializer: VariableDeclarationList | Expression;
|
||||
expression: Expression;
|
||||
}
|
||||
interface BreakOrContinueStatement extends Statement {
|
||||
interface BreakStatement extends Statement {
|
||||
label?: Identifier;
|
||||
}
|
||||
interface ContinueStatement extends Statement {
|
||||
label?: Identifier;
|
||||
}
|
||||
type BreakOrContinueStatement = BreakStatement | ContinueStatement;
|
||||
interface ReturnStatement extends Statement {
|
||||
expression?: Expression;
|
||||
}
|
||||
@@ -748,7 +820,7 @@ declare namespace ts {
|
||||
clauses: NodeArray<CaseOrDefaultClause>;
|
||||
}
|
||||
interface CaseClause extends Node {
|
||||
expression?: Expression;
|
||||
expression: Expression;
|
||||
statements: NodeArray<Statement>;
|
||||
}
|
||||
interface DefaultClause extends Node {
|
||||
@@ -777,24 +849,31 @@ declare namespace ts {
|
||||
heritageClauses?: NodeArray<HeritageClause>;
|
||||
members: NodeArray<ClassElement>;
|
||||
}
|
||||
interface ClassDeclaration extends ClassLikeDeclaration, Statement {
|
||||
interface ClassDeclaration extends ClassLikeDeclaration, DeclarationStatement {
|
||||
name?: Identifier;
|
||||
}
|
||||
interface ClassExpression extends ClassLikeDeclaration, PrimaryExpression {
|
||||
}
|
||||
interface ClassElement extends Declaration {
|
||||
_classElementBrand: any;
|
||||
name?: PropertyName;
|
||||
}
|
||||
interface InterfaceDeclaration extends Declaration, Statement {
|
||||
interface TypeElement extends Declaration {
|
||||
_typeElementBrand: any;
|
||||
name?: PropertyName;
|
||||
questionToken?: Node;
|
||||
}
|
||||
interface InterfaceDeclaration extends DeclarationStatement {
|
||||
name: Identifier;
|
||||
typeParameters?: NodeArray<TypeParameterDeclaration>;
|
||||
heritageClauses?: NodeArray<HeritageClause>;
|
||||
members: NodeArray<Declaration>;
|
||||
members: NodeArray<TypeElement>;
|
||||
}
|
||||
interface HeritageClause extends Node {
|
||||
token: SyntaxKind;
|
||||
types?: NodeArray<ExpressionWithTypeArguments>;
|
||||
}
|
||||
interface TypeAliasDeclaration extends Declaration, Statement {
|
||||
interface TypeAliasDeclaration extends DeclarationStatement {
|
||||
name: Identifier;
|
||||
typeParameters?: NodeArray<TypeParameterDeclaration>;
|
||||
type: TypeNode;
|
||||
@@ -803,18 +882,19 @@ declare namespace ts {
|
||||
name: DeclarationName;
|
||||
initializer?: Expression;
|
||||
}
|
||||
interface EnumDeclaration extends Declaration, Statement {
|
||||
interface EnumDeclaration extends DeclarationStatement {
|
||||
name: Identifier;
|
||||
members: NodeArray<EnumMember>;
|
||||
}
|
||||
interface ModuleDeclaration extends Declaration, Statement {
|
||||
type ModuleBody = ModuleBlock | ModuleDeclaration;
|
||||
interface ModuleDeclaration extends DeclarationStatement {
|
||||
name: Identifier | LiteralExpression;
|
||||
body: ModuleBlock | ModuleDeclaration;
|
||||
}
|
||||
interface ModuleBlock extends Node, Statement {
|
||||
statements: NodeArray<Statement>;
|
||||
}
|
||||
interface ImportEqualsDeclaration extends Declaration, Statement {
|
||||
interface ImportEqualsDeclaration extends DeclarationStatement {
|
||||
name: Identifier;
|
||||
moduleReference: EntityName | ExternalModuleReference;
|
||||
}
|
||||
@@ -832,22 +912,27 @@ declare namespace ts {
|
||||
interface NamespaceImport extends Declaration {
|
||||
name: Identifier;
|
||||
}
|
||||
interface ExportDeclaration extends Declaration, Statement {
|
||||
interface ExportDeclaration extends DeclarationStatement {
|
||||
exportClause?: NamedExports;
|
||||
moduleSpecifier?: Expression;
|
||||
}
|
||||
interface NamedImportsOrExports extends Node {
|
||||
elements: NodeArray<ImportOrExportSpecifier>;
|
||||
interface NamedImports extends Node {
|
||||
elements: NodeArray<ImportSpecifier>;
|
||||
}
|
||||
type NamedImports = NamedImportsOrExports;
|
||||
type NamedExports = NamedImportsOrExports;
|
||||
interface ImportOrExportSpecifier extends Declaration {
|
||||
interface NamedExports extends Node {
|
||||
elements: NodeArray<ExportSpecifier>;
|
||||
}
|
||||
type NamedImportsOrExports = NamedImports | NamedExports;
|
||||
interface ImportSpecifier extends Declaration {
|
||||
propertyName?: Identifier;
|
||||
name: Identifier;
|
||||
}
|
||||
type ImportSpecifier = ImportOrExportSpecifier;
|
||||
type ExportSpecifier = ImportOrExportSpecifier;
|
||||
interface ExportAssignment extends Declaration, Statement {
|
||||
interface ExportSpecifier extends Declaration {
|
||||
propertyName?: Identifier;
|
||||
name: Identifier;
|
||||
}
|
||||
type ImportOrExportSpecifier = ImportSpecifier | ExportSpecifier;
|
||||
interface ExportAssignment extends DeclarationStatement {
|
||||
isExportEquals?: boolean;
|
||||
expression: Expression;
|
||||
}
|
||||
@@ -908,7 +993,7 @@ declare namespace ts {
|
||||
interface JSDocThisType extends JSDocType {
|
||||
type: JSDocType;
|
||||
}
|
||||
interface JSDocRecordMember extends PropertyDeclaration {
|
||||
interface JSDocRecordMember extends PropertySignature {
|
||||
name: Identifier | LiteralExpression;
|
||||
type?: JSDocType;
|
||||
}
|
||||
@@ -934,16 +1019,17 @@ declare namespace ts {
|
||||
postParameterName?: Identifier;
|
||||
isBracketed: boolean;
|
||||
}
|
||||
interface AmdDependency {
|
||||
path: string;
|
||||
name: string;
|
||||
}
|
||||
interface SourceFile extends Declaration {
|
||||
statements: NodeArray<Statement>;
|
||||
endOfFileToken: Node;
|
||||
fileName: string;
|
||||
path: Path;
|
||||
text: string;
|
||||
amdDependencies: {
|
||||
path: string;
|
||||
name: string;
|
||||
}[];
|
||||
amdDependencies: AmdDependency[];
|
||||
moduleName: string;
|
||||
referencedFiles: FileReference[];
|
||||
languageVariant: LanguageVariant;
|
||||
@@ -1053,6 +1139,7 @@ declare namespace ts {
|
||||
getReturnTypeOfSignature(signature: Signature): Type;
|
||||
getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[];
|
||||
getSymbolAtLocation(node: Node): Symbol;
|
||||
getSymbolsOfParameterPropertyDeclaration(parameter: ParameterDeclaration, parameterName: string): Symbol[];
|
||||
getShorthandAssignmentValueSymbol(location: Node): Symbol;
|
||||
getTypeAtLocation(node: Node): Type;
|
||||
typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string;
|
||||
@@ -1078,7 +1165,7 @@ declare namespace ts {
|
||||
interface SymbolDisplayBuilder {
|
||||
buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
|
||||
buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void;
|
||||
buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
|
||||
buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags, kind?: SignatureKind): void;
|
||||
buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
|
||||
buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
|
||||
buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void;
|
||||
@@ -1117,10 +1204,20 @@ declare namespace ts {
|
||||
WriteTypeParametersOrArguments = 1,
|
||||
UseOnlyExternalAliasing = 2,
|
||||
}
|
||||
enum TypePredicateKind {
|
||||
This = 0,
|
||||
Identifier = 1,
|
||||
}
|
||||
interface TypePredicate {
|
||||
kind: TypePredicateKind;
|
||||
type: Type;
|
||||
}
|
||||
interface ThisTypePredicate extends TypePredicate {
|
||||
_thisTypePredicateBrand: any;
|
||||
}
|
||||
interface IdentifierTypePredicate extends TypePredicate {
|
||||
parameterName: string;
|
||||
parameterIndex: number;
|
||||
type: Type;
|
||||
}
|
||||
enum SymbolFlags {
|
||||
None = 0,
|
||||
@@ -1222,6 +1319,7 @@ declare namespace ts {
|
||||
ESSymbol = 16777216,
|
||||
ThisType = 33554432,
|
||||
ObjectLiteralPatternWithComputedProperties = 67108864,
|
||||
PredicateType = 134217728,
|
||||
StringLike = 258,
|
||||
NumberLike = 132,
|
||||
ObjectType = 80896,
|
||||
@@ -1234,6 +1332,9 @@ declare namespace ts {
|
||||
symbol?: Symbol;
|
||||
pattern?: DestructuringPattern;
|
||||
}
|
||||
interface PredicateType extends Type {
|
||||
predicate: ThisTypePredicate | IdentifierTypePredicate;
|
||||
}
|
||||
interface StringLiteralType extends Type {
|
||||
text: string;
|
||||
}
|
||||
@@ -1279,7 +1380,6 @@ declare namespace ts {
|
||||
declaration: SignatureDeclaration;
|
||||
typeParameters: TypeParameter[];
|
||||
parameters: Symbol[];
|
||||
typePredicate?: TypePredicate;
|
||||
}
|
||||
enum IndexKind {
|
||||
String = 0,
|
||||
@@ -1331,6 +1431,7 @@ declare namespace ts {
|
||||
inlineSourceMap?: boolean;
|
||||
inlineSources?: boolean;
|
||||
jsx?: JsxEmit;
|
||||
reactNamespace?: string;
|
||||
listFiles?: boolean;
|
||||
locale?: string;
|
||||
mapRoot?: string;
|
||||
@@ -1366,6 +1467,8 @@ declare namespace ts {
|
||||
noImplicitReturns?: boolean;
|
||||
noFallthroughCasesInSwitch?: boolean;
|
||||
forceConsistentCasingInFileNames?: boolean;
|
||||
allowSyntheticDefaultImports?: boolean;
|
||||
allowJs?: boolean;
|
||||
[option: string]: string | number | boolean;
|
||||
}
|
||||
enum ModuleKind {
|
||||
@@ -1409,6 +1512,7 @@ declare namespace ts {
|
||||
interface ModuleResolutionHost {
|
||||
fileExists(fileName: string): boolean;
|
||||
readFile(fileName: string): string;
|
||||
directoryExists?(directoryName: string): boolean;
|
||||
}
|
||||
interface ResolvedModule {
|
||||
resolvedFileName: string;
|
||||
@@ -1537,6 +1641,7 @@ declare namespace ts {
|
||||
*/
|
||||
function collapseTextChangeRangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange;
|
||||
function getTypeParameterOwner(d: Declaration): Declaration;
|
||||
function isParameterPropertyDeclaration(node: ParameterDeclaration): boolean;
|
||||
}
|
||||
declare namespace ts {
|
||||
function createNode(kind: SyntaxKind, pos?: number, end?: number): Node;
|
||||
@@ -1546,10 +1651,10 @@ declare namespace ts {
|
||||
}
|
||||
declare namespace ts {
|
||||
const version: string;
|
||||
function findConfigFile(searchPath: string): string;
|
||||
function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean): string;
|
||||
function resolveTripleslashReference(moduleName: string, containingFile: string): string;
|
||||
function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
|
||||
function nodeModuleNameResolver(moduleName: string, containingFile: string, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
|
||||
function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
|
||||
function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
|
||||
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
|
||||
function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
|
||||
@@ -1582,7 +1687,7 @@ declare namespace ts {
|
||||
* @param basePath A root directory to resolve relative path entries in the config
|
||||
* file to. e.g. outDir
|
||||
*/
|
||||
function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string): ParsedCommandLine;
|
||||
function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions): ParsedCommandLine;
|
||||
function convertCompilerOptionsFromJson(jsonOptions: any, basePath: string): {
|
||||
options: CompilerOptions;
|
||||
errors: Diagnostic[];
|
||||
@@ -1590,7 +1695,7 @@ declare namespace ts {
|
||||
}
|
||||
declare namespace ts {
|
||||
/** The version of the language service API */
|
||||
let servicesVersion: string;
|
||||
const servicesVersion: string;
|
||||
interface Node {
|
||||
getSourceFile(): SourceFile;
|
||||
getChildCount(sourceFile?: SourceFile): number;
|
||||
@@ -1659,7 +1764,7 @@ declare namespace ts {
|
||||
/** Releases all resources held by this script snapshot */
|
||||
dispose?(): void;
|
||||
}
|
||||
module ScriptSnapshot {
|
||||
namespace ScriptSnapshot {
|
||||
function fromString(text: string): IScriptSnapshot;
|
||||
}
|
||||
interface PreProcessedFileInfo {
|
||||
@@ -1687,6 +1792,7 @@ declare namespace ts {
|
||||
error?(s: string): void;
|
||||
useCaseSensitiveFileNames?(): boolean;
|
||||
resolveModuleNames?(moduleNames: string[], containingFile: string): ResolvedModule[];
|
||||
directoryExists?(directoryName: string): boolean;
|
||||
}
|
||||
interface LanguageService {
|
||||
cleanupSemanticCache(): void;
|
||||
@@ -1782,7 +1888,7 @@ declare namespace ts {
|
||||
fileName: string;
|
||||
highlightSpans: HighlightSpan[];
|
||||
}
|
||||
module HighlightSpanKind {
|
||||
namespace HighlightSpanKind {
|
||||
const none: string;
|
||||
const definition: string;
|
||||
const reference: string;
|
||||
@@ -1824,6 +1930,7 @@ declare namespace ts {
|
||||
InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean;
|
||||
InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean;
|
||||
InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: boolean;
|
||||
InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: boolean;
|
||||
PlaceOpenBraceOnNewLineForFunctions: boolean;
|
||||
PlaceOpenBraceOnNewLineForControlBlocks: boolean;
|
||||
[s: string]: boolean | number | string;
|
||||
@@ -2068,7 +2175,7 @@ declare namespace ts {
|
||||
releaseDocument(fileName: string, compilationSettings: CompilerOptions): void;
|
||||
reportStats(): string;
|
||||
}
|
||||
module ScriptElementKind {
|
||||
namespace ScriptElementKind {
|
||||
const unknown: string;
|
||||
const warning: string;
|
||||
const keyword: string;
|
||||
@@ -2099,7 +2206,7 @@ declare namespace ts {
|
||||
const constElement: string;
|
||||
const letElement: string;
|
||||
}
|
||||
module ScriptElementKindModifier {
|
||||
namespace ScriptElementKindModifier {
|
||||
const none: string;
|
||||
const publicMemberModifier: string;
|
||||
const privateMemberModifier: string;
|
||||
|
||||
+5708
-4963
File diff suppressed because it is too large
Load Diff
Vendored
+274
-167
@@ -194,118 +194,120 @@ declare namespace ts {
|
||||
UnionType = 158,
|
||||
IntersectionType = 159,
|
||||
ParenthesizedType = 160,
|
||||
ObjectBindingPattern = 161,
|
||||
ArrayBindingPattern = 162,
|
||||
BindingElement = 163,
|
||||
ArrayLiteralExpression = 164,
|
||||
ObjectLiteralExpression = 165,
|
||||
PropertyAccessExpression = 166,
|
||||
ElementAccessExpression = 167,
|
||||
CallExpression = 168,
|
||||
NewExpression = 169,
|
||||
TaggedTemplateExpression = 170,
|
||||
TypeAssertionExpression = 171,
|
||||
ParenthesizedExpression = 172,
|
||||
FunctionExpression = 173,
|
||||
ArrowFunction = 174,
|
||||
DeleteExpression = 175,
|
||||
TypeOfExpression = 176,
|
||||
VoidExpression = 177,
|
||||
AwaitExpression = 178,
|
||||
PrefixUnaryExpression = 179,
|
||||
PostfixUnaryExpression = 180,
|
||||
BinaryExpression = 181,
|
||||
ConditionalExpression = 182,
|
||||
TemplateExpression = 183,
|
||||
YieldExpression = 184,
|
||||
SpreadElementExpression = 185,
|
||||
ClassExpression = 186,
|
||||
OmittedExpression = 187,
|
||||
ExpressionWithTypeArguments = 188,
|
||||
AsExpression = 189,
|
||||
TemplateSpan = 190,
|
||||
SemicolonClassElement = 191,
|
||||
Block = 192,
|
||||
VariableStatement = 193,
|
||||
EmptyStatement = 194,
|
||||
ExpressionStatement = 195,
|
||||
IfStatement = 196,
|
||||
DoStatement = 197,
|
||||
WhileStatement = 198,
|
||||
ForStatement = 199,
|
||||
ForInStatement = 200,
|
||||
ForOfStatement = 201,
|
||||
ContinueStatement = 202,
|
||||
BreakStatement = 203,
|
||||
ReturnStatement = 204,
|
||||
WithStatement = 205,
|
||||
SwitchStatement = 206,
|
||||
LabeledStatement = 207,
|
||||
ThrowStatement = 208,
|
||||
TryStatement = 209,
|
||||
DebuggerStatement = 210,
|
||||
VariableDeclaration = 211,
|
||||
VariableDeclarationList = 212,
|
||||
FunctionDeclaration = 213,
|
||||
ClassDeclaration = 214,
|
||||
InterfaceDeclaration = 215,
|
||||
TypeAliasDeclaration = 216,
|
||||
EnumDeclaration = 217,
|
||||
ModuleDeclaration = 218,
|
||||
ModuleBlock = 219,
|
||||
CaseBlock = 220,
|
||||
ImportEqualsDeclaration = 221,
|
||||
ImportDeclaration = 222,
|
||||
ImportClause = 223,
|
||||
NamespaceImport = 224,
|
||||
NamedImports = 225,
|
||||
ImportSpecifier = 226,
|
||||
ExportAssignment = 227,
|
||||
ExportDeclaration = 228,
|
||||
NamedExports = 229,
|
||||
ExportSpecifier = 230,
|
||||
MissingDeclaration = 231,
|
||||
ExternalModuleReference = 232,
|
||||
JsxElement = 233,
|
||||
JsxSelfClosingElement = 234,
|
||||
JsxOpeningElement = 235,
|
||||
JsxText = 236,
|
||||
JsxClosingElement = 237,
|
||||
JsxAttribute = 238,
|
||||
JsxSpreadAttribute = 239,
|
||||
JsxExpression = 240,
|
||||
CaseClause = 241,
|
||||
DefaultClause = 242,
|
||||
HeritageClause = 243,
|
||||
CatchClause = 244,
|
||||
PropertyAssignment = 245,
|
||||
ShorthandPropertyAssignment = 246,
|
||||
EnumMember = 247,
|
||||
SourceFile = 248,
|
||||
JSDocTypeExpression = 249,
|
||||
JSDocAllType = 250,
|
||||
JSDocUnknownType = 251,
|
||||
JSDocArrayType = 252,
|
||||
JSDocUnionType = 253,
|
||||
JSDocTupleType = 254,
|
||||
JSDocNullableType = 255,
|
||||
JSDocNonNullableType = 256,
|
||||
JSDocRecordType = 257,
|
||||
JSDocRecordMember = 258,
|
||||
JSDocTypeReference = 259,
|
||||
JSDocOptionalType = 260,
|
||||
JSDocFunctionType = 261,
|
||||
JSDocVariadicType = 262,
|
||||
JSDocConstructorType = 263,
|
||||
JSDocThisType = 264,
|
||||
JSDocComment = 265,
|
||||
JSDocTag = 266,
|
||||
JSDocParameterTag = 267,
|
||||
JSDocReturnTag = 268,
|
||||
JSDocTypeTag = 269,
|
||||
JSDocTemplateTag = 270,
|
||||
SyntaxList = 271,
|
||||
Count = 272,
|
||||
ThisType = 161,
|
||||
StringLiteralType = 162,
|
||||
ObjectBindingPattern = 163,
|
||||
ArrayBindingPattern = 164,
|
||||
BindingElement = 165,
|
||||
ArrayLiteralExpression = 166,
|
||||
ObjectLiteralExpression = 167,
|
||||
PropertyAccessExpression = 168,
|
||||
ElementAccessExpression = 169,
|
||||
CallExpression = 170,
|
||||
NewExpression = 171,
|
||||
TaggedTemplateExpression = 172,
|
||||
TypeAssertionExpression = 173,
|
||||
ParenthesizedExpression = 174,
|
||||
FunctionExpression = 175,
|
||||
ArrowFunction = 176,
|
||||
DeleteExpression = 177,
|
||||
TypeOfExpression = 178,
|
||||
VoidExpression = 179,
|
||||
AwaitExpression = 180,
|
||||
PrefixUnaryExpression = 181,
|
||||
PostfixUnaryExpression = 182,
|
||||
BinaryExpression = 183,
|
||||
ConditionalExpression = 184,
|
||||
TemplateExpression = 185,
|
||||
YieldExpression = 186,
|
||||
SpreadElementExpression = 187,
|
||||
ClassExpression = 188,
|
||||
OmittedExpression = 189,
|
||||
ExpressionWithTypeArguments = 190,
|
||||
AsExpression = 191,
|
||||
TemplateSpan = 192,
|
||||
SemicolonClassElement = 193,
|
||||
Block = 194,
|
||||
VariableStatement = 195,
|
||||
EmptyStatement = 196,
|
||||
ExpressionStatement = 197,
|
||||
IfStatement = 198,
|
||||
DoStatement = 199,
|
||||
WhileStatement = 200,
|
||||
ForStatement = 201,
|
||||
ForInStatement = 202,
|
||||
ForOfStatement = 203,
|
||||
ContinueStatement = 204,
|
||||
BreakStatement = 205,
|
||||
ReturnStatement = 206,
|
||||
WithStatement = 207,
|
||||
SwitchStatement = 208,
|
||||
LabeledStatement = 209,
|
||||
ThrowStatement = 210,
|
||||
TryStatement = 211,
|
||||
DebuggerStatement = 212,
|
||||
VariableDeclaration = 213,
|
||||
VariableDeclarationList = 214,
|
||||
FunctionDeclaration = 215,
|
||||
ClassDeclaration = 216,
|
||||
InterfaceDeclaration = 217,
|
||||
TypeAliasDeclaration = 218,
|
||||
EnumDeclaration = 219,
|
||||
ModuleDeclaration = 220,
|
||||
ModuleBlock = 221,
|
||||
CaseBlock = 222,
|
||||
ImportEqualsDeclaration = 223,
|
||||
ImportDeclaration = 224,
|
||||
ImportClause = 225,
|
||||
NamespaceImport = 226,
|
||||
NamedImports = 227,
|
||||
ImportSpecifier = 228,
|
||||
ExportAssignment = 229,
|
||||
ExportDeclaration = 230,
|
||||
NamedExports = 231,
|
||||
ExportSpecifier = 232,
|
||||
MissingDeclaration = 233,
|
||||
ExternalModuleReference = 234,
|
||||
JsxElement = 235,
|
||||
JsxSelfClosingElement = 236,
|
||||
JsxOpeningElement = 237,
|
||||
JsxText = 238,
|
||||
JsxClosingElement = 239,
|
||||
JsxAttribute = 240,
|
||||
JsxSpreadAttribute = 241,
|
||||
JsxExpression = 242,
|
||||
CaseClause = 243,
|
||||
DefaultClause = 244,
|
||||
HeritageClause = 245,
|
||||
CatchClause = 246,
|
||||
PropertyAssignment = 247,
|
||||
ShorthandPropertyAssignment = 248,
|
||||
EnumMember = 249,
|
||||
SourceFile = 250,
|
||||
JSDocTypeExpression = 251,
|
||||
JSDocAllType = 252,
|
||||
JSDocUnknownType = 253,
|
||||
JSDocArrayType = 254,
|
||||
JSDocUnionType = 255,
|
||||
JSDocTupleType = 256,
|
||||
JSDocNullableType = 257,
|
||||
JSDocNonNullableType = 258,
|
||||
JSDocRecordType = 259,
|
||||
JSDocRecordMember = 260,
|
||||
JSDocTypeReference = 261,
|
||||
JSDocOptionalType = 262,
|
||||
JSDocFunctionType = 263,
|
||||
JSDocVariadicType = 264,
|
||||
JSDocConstructorType = 265,
|
||||
JSDocThisType = 266,
|
||||
JSDocComment = 267,
|
||||
JSDocTag = 268,
|
||||
JSDocParameterTag = 269,
|
||||
JSDocReturnTag = 270,
|
||||
JSDocTypeTag = 271,
|
||||
JSDocTemplateTag = 272,
|
||||
SyntaxList = 273,
|
||||
Count = 274,
|
||||
FirstAssignment = 56,
|
||||
LastAssignment = 68,
|
||||
FirstReservedWord = 70,
|
||||
@@ -314,8 +316,8 @@ declare namespace ts {
|
||||
LastKeyword = 134,
|
||||
FirstFutureReservedWord = 106,
|
||||
LastFutureReservedWord = 114,
|
||||
FirstTypeNode = 151,
|
||||
LastTypeNode = 160,
|
||||
FirstTypeNode = 150,
|
||||
LastTypeNode = 162,
|
||||
FirstPunctuation = 15,
|
||||
LastPunctuation = 68,
|
||||
FirstToken = 0,
|
||||
@@ -359,10 +361,14 @@ declare namespace ts {
|
||||
}
|
||||
enum JsxFlags {
|
||||
None = 0,
|
||||
/** An element from a named property of the JSX.IntrinsicElements interface */
|
||||
IntrinsicNamedElement = 1,
|
||||
/** An element inferred from the string index signature of the JSX.IntrinsicElements interface */
|
||||
IntrinsicIndexedElement = 2,
|
||||
ClassElement = 4,
|
||||
UnknownElement = 8,
|
||||
/** An element backed by a class, class-like, or function value */
|
||||
ValueElement = 4,
|
||||
/** Element resolution failed */
|
||||
UnknownElement = 16,
|
||||
IntrinsicElement = 3,
|
||||
}
|
||||
interface Node extends TextRange {
|
||||
@@ -375,9 +381,11 @@ declare namespace ts {
|
||||
interface NodeArray<T> extends Array<T>, TextRange {
|
||||
hasTrailingComma?: boolean;
|
||||
}
|
||||
interface ModifiersArray extends NodeArray<Node> {
|
||||
interface ModifiersArray extends NodeArray<Modifier> {
|
||||
flags: number;
|
||||
}
|
||||
interface Modifier extends Node {
|
||||
}
|
||||
interface Identifier extends PrimaryExpression {
|
||||
text: string;
|
||||
originalKeywordKind?: SyntaxKind;
|
||||
@@ -393,6 +401,9 @@ declare namespace ts {
|
||||
_declarationBrand: any;
|
||||
name?: DeclarationName;
|
||||
}
|
||||
interface DeclarationStatement extends Declaration, Statement {
|
||||
name?: Identifier;
|
||||
}
|
||||
interface ComputedPropertyName extends Node {
|
||||
expression: Expression;
|
||||
}
|
||||
@@ -405,10 +416,15 @@ declare namespace ts {
|
||||
expression?: Expression;
|
||||
}
|
||||
interface SignatureDeclaration extends Declaration {
|
||||
name?: PropertyName;
|
||||
typeParameters?: NodeArray<TypeParameterDeclaration>;
|
||||
parameters: NodeArray<ParameterDeclaration>;
|
||||
type?: TypeNode;
|
||||
}
|
||||
interface CallSignatureDeclaration extends SignatureDeclaration, TypeElement {
|
||||
}
|
||||
interface ConstructSignatureDeclaration extends SignatureDeclaration, TypeElement {
|
||||
}
|
||||
interface VariableDeclaration extends Declaration {
|
||||
parent?: VariableDeclarationList;
|
||||
name: Identifier | BindingPattern;
|
||||
@@ -431,18 +447,25 @@ declare namespace ts {
|
||||
name: Identifier | BindingPattern;
|
||||
initializer?: Expression;
|
||||
}
|
||||
interface PropertyDeclaration extends Declaration, ClassElement {
|
||||
name: DeclarationName;
|
||||
interface PropertySignature extends TypeElement {
|
||||
name: PropertyName;
|
||||
questionToken?: Node;
|
||||
type?: TypeNode;
|
||||
initializer?: Expression;
|
||||
}
|
||||
interface PropertyDeclaration extends ClassElement {
|
||||
questionToken?: Node;
|
||||
name: PropertyName;
|
||||
type?: TypeNode;
|
||||
initializer?: Expression;
|
||||
}
|
||||
interface ObjectLiteralElement extends Declaration {
|
||||
_objectLiteralBrandBrand: any;
|
||||
name?: PropertyName;
|
||||
}
|
||||
interface PropertyAssignment extends ObjectLiteralElement {
|
||||
_propertyAssignmentBrand: any;
|
||||
name: DeclarationName;
|
||||
name: PropertyName;
|
||||
questionToken?: Node;
|
||||
initializer: Expression;
|
||||
}
|
||||
@@ -460,9 +483,16 @@ declare namespace ts {
|
||||
type?: TypeNode;
|
||||
initializer?: Expression;
|
||||
}
|
||||
interface PropertyLikeDeclaration extends Declaration {
|
||||
name: PropertyName;
|
||||
}
|
||||
interface BindingPattern extends Node {
|
||||
elements: NodeArray<BindingElement>;
|
||||
}
|
||||
interface ObjectBindingPattern extends BindingPattern {
|
||||
}
|
||||
interface ArrayBindingPattern extends BindingPattern {
|
||||
}
|
||||
/**
|
||||
* Several node kinds share function-like features such as a signature,
|
||||
* a name, and a body. These nodes should extend FunctionLikeDeclaration.
|
||||
@@ -477,45 +507,61 @@ declare namespace ts {
|
||||
questionToken?: Node;
|
||||
body?: Block | Expression;
|
||||
}
|
||||
interface FunctionDeclaration extends FunctionLikeDeclaration, Statement {
|
||||
interface FunctionDeclaration extends FunctionLikeDeclaration, DeclarationStatement {
|
||||
name?: Identifier;
|
||||
body?: Block;
|
||||
body?: FunctionBody;
|
||||
}
|
||||
interface MethodSignature extends SignatureDeclaration, TypeElement {
|
||||
name: PropertyName;
|
||||
}
|
||||
interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement {
|
||||
body?: Block;
|
||||
name: PropertyName;
|
||||
body?: FunctionBody;
|
||||
}
|
||||
interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement {
|
||||
body?: Block;
|
||||
body?: FunctionBody;
|
||||
}
|
||||
interface SemicolonClassElement extends ClassElement {
|
||||
_semicolonClassElementBrand: any;
|
||||
}
|
||||
interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement {
|
||||
_accessorDeclarationBrand: any;
|
||||
body: Block;
|
||||
name: PropertyName;
|
||||
body: FunctionBody;
|
||||
}
|
||||
interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement {
|
||||
interface GetAccessorDeclaration extends AccessorDeclaration {
|
||||
}
|
||||
interface SetAccessorDeclaration extends AccessorDeclaration {
|
||||
}
|
||||
interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement, TypeElement {
|
||||
_indexSignatureDeclarationBrand: any;
|
||||
}
|
||||
interface TypeNode extends Node {
|
||||
_typeNodeBrand: any;
|
||||
}
|
||||
interface ThisTypeNode extends TypeNode {
|
||||
_thisTypeNodeBrand: any;
|
||||
}
|
||||
interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration {
|
||||
_functionOrConstructorTypeNodeBrand: any;
|
||||
}
|
||||
interface FunctionTypeNode extends FunctionOrConstructorTypeNode {
|
||||
}
|
||||
interface ConstructorTypeNode extends FunctionOrConstructorTypeNode {
|
||||
}
|
||||
interface TypeReferenceNode extends TypeNode {
|
||||
typeName: EntityName;
|
||||
typeArguments?: NodeArray<TypeNode>;
|
||||
}
|
||||
interface TypePredicateNode extends TypeNode {
|
||||
parameterName: Identifier;
|
||||
parameterName: Identifier | ThisTypeNode;
|
||||
type: TypeNode;
|
||||
}
|
||||
interface TypeQueryNode extends TypeNode {
|
||||
exprName: EntityName;
|
||||
}
|
||||
interface TypeLiteralNode extends TypeNode, Declaration {
|
||||
members: NodeArray<Node>;
|
||||
members: NodeArray<TypeElement>;
|
||||
}
|
||||
interface ArrayTypeNode extends TypeNode {
|
||||
elementType: TypeNode;
|
||||
@@ -533,13 +579,18 @@ declare namespace ts {
|
||||
interface ParenthesizedTypeNode extends TypeNode {
|
||||
type: TypeNode;
|
||||
}
|
||||
interface StringLiteral extends LiteralExpression, TypeNode {
|
||||
interface StringLiteralTypeNode extends LiteralLikeNode, TypeNode {
|
||||
_stringLiteralTypeBrand: any;
|
||||
}
|
||||
interface StringLiteral extends LiteralExpression {
|
||||
_stringLiteralBrand: any;
|
||||
}
|
||||
interface Expression extends Node {
|
||||
_expressionBrand: any;
|
||||
contextualType?: Type;
|
||||
}
|
||||
interface OmittedExpression extends Expression {
|
||||
}
|
||||
interface UnaryExpression extends Expression {
|
||||
_unaryExpressionBrand: any;
|
||||
}
|
||||
@@ -594,25 +645,34 @@ declare namespace ts {
|
||||
colonToken: Node;
|
||||
whenFalse: Expression;
|
||||
}
|
||||
type FunctionBody = Block;
|
||||
type ConciseBody = FunctionBody | Expression;
|
||||
interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration {
|
||||
name?: Identifier;
|
||||
body: Block | Expression;
|
||||
body: FunctionBody;
|
||||
}
|
||||
interface ArrowFunction extends Expression, FunctionLikeDeclaration {
|
||||
equalsGreaterThanToken: Node;
|
||||
body: ConciseBody;
|
||||
}
|
||||
interface LiteralExpression extends PrimaryExpression {
|
||||
interface LiteralLikeNode extends Node {
|
||||
text: string;
|
||||
isUnterminated?: boolean;
|
||||
hasExtendedUnicodeEscape?: boolean;
|
||||
}
|
||||
interface LiteralExpression extends LiteralLikeNode, PrimaryExpression {
|
||||
_literalExpressionBrand: any;
|
||||
}
|
||||
interface TemplateLiteralFragment extends LiteralLikeNode {
|
||||
_templateLiteralFragmentBrand: any;
|
||||
}
|
||||
interface TemplateExpression extends PrimaryExpression {
|
||||
head: LiteralExpression;
|
||||
head: TemplateLiteralFragment;
|
||||
templateSpans: NodeArray<TemplateSpan>;
|
||||
}
|
||||
interface TemplateSpan extends Node {
|
||||
expression: Expression;
|
||||
literal: LiteralExpression;
|
||||
literal: TemplateLiteralFragment;
|
||||
}
|
||||
interface ParenthesizedExpression extends PrimaryExpression {
|
||||
expression: Expression;
|
||||
@@ -694,6 +754,14 @@ declare namespace ts {
|
||||
interface Statement extends Node {
|
||||
_statementBrand: any;
|
||||
}
|
||||
interface EmptyStatement extends Statement {
|
||||
}
|
||||
interface DebuggerStatement extends Statement {
|
||||
}
|
||||
interface MissingDeclaration extends DeclarationStatement, ClassElement, ObjectLiteralElement, TypeElement {
|
||||
name?: Identifier;
|
||||
}
|
||||
type BlockLike = SourceFile | Block | ModuleBlock | CaseClause;
|
||||
interface Block extends Statement {
|
||||
statements: NodeArray<Statement>;
|
||||
}
|
||||
@@ -730,9 +798,13 @@ declare namespace ts {
|
||||
initializer: VariableDeclarationList | Expression;
|
||||
expression: Expression;
|
||||
}
|
||||
interface BreakOrContinueStatement extends Statement {
|
||||
interface BreakStatement extends Statement {
|
||||
label?: Identifier;
|
||||
}
|
||||
interface ContinueStatement extends Statement {
|
||||
label?: Identifier;
|
||||
}
|
||||
type BreakOrContinueStatement = BreakStatement | ContinueStatement;
|
||||
interface ReturnStatement extends Statement {
|
||||
expression?: Expression;
|
||||
}
|
||||
@@ -748,7 +820,7 @@ declare namespace ts {
|
||||
clauses: NodeArray<CaseOrDefaultClause>;
|
||||
}
|
||||
interface CaseClause extends Node {
|
||||
expression?: Expression;
|
||||
expression: Expression;
|
||||
statements: NodeArray<Statement>;
|
||||
}
|
||||
interface DefaultClause extends Node {
|
||||
@@ -777,24 +849,31 @@ declare namespace ts {
|
||||
heritageClauses?: NodeArray<HeritageClause>;
|
||||
members: NodeArray<ClassElement>;
|
||||
}
|
||||
interface ClassDeclaration extends ClassLikeDeclaration, Statement {
|
||||
interface ClassDeclaration extends ClassLikeDeclaration, DeclarationStatement {
|
||||
name?: Identifier;
|
||||
}
|
||||
interface ClassExpression extends ClassLikeDeclaration, PrimaryExpression {
|
||||
}
|
||||
interface ClassElement extends Declaration {
|
||||
_classElementBrand: any;
|
||||
name?: PropertyName;
|
||||
}
|
||||
interface InterfaceDeclaration extends Declaration, Statement {
|
||||
interface TypeElement extends Declaration {
|
||||
_typeElementBrand: any;
|
||||
name?: PropertyName;
|
||||
questionToken?: Node;
|
||||
}
|
||||
interface InterfaceDeclaration extends DeclarationStatement {
|
||||
name: Identifier;
|
||||
typeParameters?: NodeArray<TypeParameterDeclaration>;
|
||||
heritageClauses?: NodeArray<HeritageClause>;
|
||||
members: NodeArray<Declaration>;
|
||||
members: NodeArray<TypeElement>;
|
||||
}
|
||||
interface HeritageClause extends Node {
|
||||
token: SyntaxKind;
|
||||
types?: NodeArray<ExpressionWithTypeArguments>;
|
||||
}
|
||||
interface TypeAliasDeclaration extends Declaration, Statement {
|
||||
interface TypeAliasDeclaration extends DeclarationStatement {
|
||||
name: Identifier;
|
||||
typeParameters?: NodeArray<TypeParameterDeclaration>;
|
||||
type: TypeNode;
|
||||
@@ -803,18 +882,19 @@ declare namespace ts {
|
||||
name: DeclarationName;
|
||||
initializer?: Expression;
|
||||
}
|
||||
interface EnumDeclaration extends Declaration, Statement {
|
||||
interface EnumDeclaration extends DeclarationStatement {
|
||||
name: Identifier;
|
||||
members: NodeArray<EnumMember>;
|
||||
}
|
||||
interface ModuleDeclaration extends Declaration, Statement {
|
||||
type ModuleBody = ModuleBlock | ModuleDeclaration;
|
||||
interface ModuleDeclaration extends DeclarationStatement {
|
||||
name: Identifier | LiteralExpression;
|
||||
body: ModuleBlock | ModuleDeclaration;
|
||||
}
|
||||
interface ModuleBlock extends Node, Statement {
|
||||
statements: NodeArray<Statement>;
|
||||
}
|
||||
interface ImportEqualsDeclaration extends Declaration, Statement {
|
||||
interface ImportEqualsDeclaration extends DeclarationStatement {
|
||||
name: Identifier;
|
||||
moduleReference: EntityName | ExternalModuleReference;
|
||||
}
|
||||
@@ -832,22 +912,27 @@ declare namespace ts {
|
||||
interface NamespaceImport extends Declaration {
|
||||
name: Identifier;
|
||||
}
|
||||
interface ExportDeclaration extends Declaration, Statement {
|
||||
interface ExportDeclaration extends DeclarationStatement {
|
||||
exportClause?: NamedExports;
|
||||
moduleSpecifier?: Expression;
|
||||
}
|
||||
interface NamedImportsOrExports extends Node {
|
||||
elements: NodeArray<ImportOrExportSpecifier>;
|
||||
interface NamedImports extends Node {
|
||||
elements: NodeArray<ImportSpecifier>;
|
||||
}
|
||||
type NamedImports = NamedImportsOrExports;
|
||||
type NamedExports = NamedImportsOrExports;
|
||||
interface ImportOrExportSpecifier extends Declaration {
|
||||
interface NamedExports extends Node {
|
||||
elements: NodeArray<ExportSpecifier>;
|
||||
}
|
||||
type NamedImportsOrExports = NamedImports | NamedExports;
|
||||
interface ImportSpecifier extends Declaration {
|
||||
propertyName?: Identifier;
|
||||
name: Identifier;
|
||||
}
|
||||
type ImportSpecifier = ImportOrExportSpecifier;
|
||||
type ExportSpecifier = ImportOrExportSpecifier;
|
||||
interface ExportAssignment extends Declaration, Statement {
|
||||
interface ExportSpecifier extends Declaration {
|
||||
propertyName?: Identifier;
|
||||
name: Identifier;
|
||||
}
|
||||
type ImportOrExportSpecifier = ImportSpecifier | ExportSpecifier;
|
||||
interface ExportAssignment extends DeclarationStatement {
|
||||
isExportEquals?: boolean;
|
||||
expression: Expression;
|
||||
}
|
||||
@@ -908,7 +993,7 @@ declare namespace ts {
|
||||
interface JSDocThisType extends JSDocType {
|
||||
type: JSDocType;
|
||||
}
|
||||
interface JSDocRecordMember extends PropertyDeclaration {
|
||||
interface JSDocRecordMember extends PropertySignature {
|
||||
name: Identifier | LiteralExpression;
|
||||
type?: JSDocType;
|
||||
}
|
||||
@@ -934,16 +1019,17 @@ declare namespace ts {
|
||||
postParameterName?: Identifier;
|
||||
isBracketed: boolean;
|
||||
}
|
||||
interface AmdDependency {
|
||||
path: string;
|
||||
name: string;
|
||||
}
|
||||
interface SourceFile extends Declaration {
|
||||
statements: NodeArray<Statement>;
|
||||
endOfFileToken: Node;
|
||||
fileName: string;
|
||||
path: Path;
|
||||
text: string;
|
||||
amdDependencies: {
|
||||
path: string;
|
||||
name: string;
|
||||
}[];
|
||||
amdDependencies: AmdDependency[];
|
||||
moduleName: string;
|
||||
referencedFiles: FileReference[];
|
||||
languageVariant: LanguageVariant;
|
||||
@@ -1053,6 +1139,7 @@ declare namespace ts {
|
||||
getReturnTypeOfSignature(signature: Signature): Type;
|
||||
getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[];
|
||||
getSymbolAtLocation(node: Node): Symbol;
|
||||
getSymbolsOfParameterPropertyDeclaration(parameter: ParameterDeclaration, parameterName: string): Symbol[];
|
||||
getShorthandAssignmentValueSymbol(location: Node): Symbol;
|
||||
getTypeAtLocation(node: Node): Type;
|
||||
typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string;
|
||||
@@ -1078,7 +1165,7 @@ declare namespace ts {
|
||||
interface SymbolDisplayBuilder {
|
||||
buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
|
||||
buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void;
|
||||
buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
|
||||
buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags, kind?: SignatureKind): void;
|
||||
buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
|
||||
buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
|
||||
buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void;
|
||||
@@ -1117,10 +1204,20 @@ declare namespace ts {
|
||||
WriteTypeParametersOrArguments = 1,
|
||||
UseOnlyExternalAliasing = 2,
|
||||
}
|
||||
enum TypePredicateKind {
|
||||
This = 0,
|
||||
Identifier = 1,
|
||||
}
|
||||
interface TypePredicate {
|
||||
kind: TypePredicateKind;
|
||||
type: Type;
|
||||
}
|
||||
interface ThisTypePredicate extends TypePredicate {
|
||||
_thisTypePredicateBrand: any;
|
||||
}
|
||||
interface IdentifierTypePredicate extends TypePredicate {
|
||||
parameterName: string;
|
||||
parameterIndex: number;
|
||||
type: Type;
|
||||
}
|
||||
enum SymbolFlags {
|
||||
None = 0,
|
||||
@@ -1222,6 +1319,7 @@ declare namespace ts {
|
||||
ESSymbol = 16777216,
|
||||
ThisType = 33554432,
|
||||
ObjectLiteralPatternWithComputedProperties = 67108864,
|
||||
PredicateType = 134217728,
|
||||
StringLike = 258,
|
||||
NumberLike = 132,
|
||||
ObjectType = 80896,
|
||||
@@ -1234,6 +1332,9 @@ declare namespace ts {
|
||||
symbol?: Symbol;
|
||||
pattern?: DestructuringPattern;
|
||||
}
|
||||
interface PredicateType extends Type {
|
||||
predicate: ThisTypePredicate | IdentifierTypePredicate;
|
||||
}
|
||||
interface StringLiteralType extends Type {
|
||||
text: string;
|
||||
}
|
||||
@@ -1279,7 +1380,6 @@ declare namespace ts {
|
||||
declaration: SignatureDeclaration;
|
||||
typeParameters: TypeParameter[];
|
||||
parameters: Symbol[];
|
||||
typePredicate?: TypePredicate;
|
||||
}
|
||||
enum IndexKind {
|
||||
String = 0,
|
||||
@@ -1331,6 +1431,7 @@ declare namespace ts {
|
||||
inlineSourceMap?: boolean;
|
||||
inlineSources?: boolean;
|
||||
jsx?: JsxEmit;
|
||||
reactNamespace?: string;
|
||||
listFiles?: boolean;
|
||||
locale?: string;
|
||||
mapRoot?: string;
|
||||
@@ -1366,6 +1467,8 @@ declare namespace ts {
|
||||
noImplicitReturns?: boolean;
|
||||
noFallthroughCasesInSwitch?: boolean;
|
||||
forceConsistentCasingInFileNames?: boolean;
|
||||
allowSyntheticDefaultImports?: boolean;
|
||||
allowJs?: boolean;
|
||||
[option: string]: string | number | boolean;
|
||||
}
|
||||
enum ModuleKind {
|
||||
@@ -1409,6 +1512,7 @@ declare namespace ts {
|
||||
interface ModuleResolutionHost {
|
||||
fileExists(fileName: string): boolean;
|
||||
readFile(fileName: string): string;
|
||||
directoryExists?(directoryName: string): boolean;
|
||||
}
|
||||
interface ResolvedModule {
|
||||
resolvedFileName: string;
|
||||
@@ -1537,6 +1641,7 @@ declare namespace ts {
|
||||
*/
|
||||
function collapseTextChangeRangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange;
|
||||
function getTypeParameterOwner(d: Declaration): Declaration;
|
||||
function isParameterPropertyDeclaration(node: ParameterDeclaration): boolean;
|
||||
}
|
||||
declare namespace ts {
|
||||
function createNode(kind: SyntaxKind, pos?: number, end?: number): Node;
|
||||
@@ -1546,10 +1651,10 @@ declare namespace ts {
|
||||
}
|
||||
declare namespace ts {
|
||||
const version: string;
|
||||
function findConfigFile(searchPath: string): string;
|
||||
function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean): string;
|
||||
function resolveTripleslashReference(moduleName: string, containingFile: string): string;
|
||||
function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
|
||||
function nodeModuleNameResolver(moduleName: string, containingFile: string, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
|
||||
function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
|
||||
function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
|
||||
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
|
||||
function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
|
||||
@@ -1582,7 +1687,7 @@ declare namespace ts {
|
||||
* @param basePath A root directory to resolve relative path entries in the config
|
||||
* file to. e.g. outDir
|
||||
*/
|
||||
function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string): ParsedCommandLine;
|
||||
function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions): ParsedCommandLine;
|
||||
function convertCompilerOptionsFromJson(jsonOptions: any, basePath: string): {
|
||||
options: CompilerOptions;
|
||||
errors: Diagnostic[];
|
||||
@@ -1590,7 +1695,7 @@ declare namespace ts {
|
||||
}
|
||||
declare namespace ts {
|
||||
/** The version of the language service API */
|
||||
let servicesVersion: string;
|
||||
const servicesVersion: string;
|
||||
interface Node {
|
||||
getSourceFile(): SourceFile;
|
||||
getChildCount(sourceFile?: SourceFile): number;
|
||||
@@ -1659,7 +1764,7 @@ declare namespace ts {
|
||||
/** Releases all resources held by this script snapshot */
|
||||
dispose?(): void;
|
||||
}
|
||||
module ScriptSnapshot {
|
||||
namespace ScriptSnapshot {
|
||||
function fromString(text: string): IScriptSnapshot;
|
||||
}
|
||||
interface PreProcessedFileInfo {
|
||||
@@ -1687,6 +1792,7 @@ declare namespace ts {
|
||||
error?(s: string): void;
|
||||
useCaseSensitiveFileNames?(): boolean;
|
||||
resolveModuleNames?(moduleNames: string[], containingFile: string): ResolvedModule[];
|
||||
directoryExists?(directoryName: string): boolean;
|
||||
}
|
||||
interface LanguageService {
|
||||
cleanupSemanticCache(): void;
|
||||
@@ -1782,7 +1888,7 @@ declare namespace ts {
|
||||
fileName: string;
|
||||
highlightSpans: HighlightSpan[];
|
||||
}
|
||||
module HighlightSpanKind {
|
||||
namespace HighlightSpanKind {
|
||||
const none: string;
|
||||
const definition: string;
|
||||
const reference: string;
|
||||
@@ -1824,6 +1930,7 @@ declare namespace ts {
|
||||
InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean;
|
||||
InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean;
|
||||
InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: boolean;
|
||||
InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: boolean;
|
||||
PlaceOpenBraceOnNewLineForFunctions: boolean;
|
||||
PlaceOpenBraceOnNewLineForControlBlocks: boolean;
|
||||
[s: string]: boolean | number | string;
|
||||
@@ -2068,7 +2175,7 @@ declare namespace ts {
|
||||
releaseDocument(fileName: string, compilationSettings: CompilerOptions): void;
|
||||
reportStats(): string;
|
||||
}
|
||||
module ScriptElementKind {
|
||||
namespace ScriptElementKind {
|
||||
const unknown: string;
|
||||
const warning: string;
|
||||
const keyword: string;
|
||||
@@ -2099,7 +2206,7 @@ declare namespace ts {
|
||||
const constElement: string;
|
||||
const letElement: string;
|
||||
}
|
||||
module ScriptElementKindModifier {
|
||||
namespace ScriptElementKindModifier {
|
||||
const none: string;
|
||||
const publicMemberModifier: string;
|
||||
const privateMemberModifier: string;
|
||||
|
||||
+5708
-4963
File diff suppressed because it is too large
Load Diff
@@ -26,7 +26,9 @@ class BooleanTriviaWalker extends Lint.RuleWalker {
|
||||
for (let index = 0; index < targetParameters.length; index++) {
|
||||
const param = targetParameters[index];
|
||||
const arg = node.arguments[index];
|
||||
if (!(arg && param)) continue;
|
||||
if (!(arg && param)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const argType = this.checker.getContextualType(arg);
|
||||
if (argType && (argType.getFlags() & ts.TypeFlags.Boolean)) {
|
||||
@@ -38,7 +40,9 @@ class BooleanTriviaWalker extends Lint.RuleWalker {
|
||||
if (ranges && ranges.length === 1 && ranges[0].kind === ts.SyntaxKind.MultiLineCommentTrivia) {
|
||||
triviaContent = arg.getFullText().slice(ranges[0].pos + 2, ranges[0].end - 2); // +/-2 to remove /**/
|
||||
}
|
||||
if (triviaContent !== param.getName()) {
|
||||
|
||||
const paramName = param.getName();
|
||||
if (triviaContent !== paramName && triviaContent !== paramName + ":") {
|
||||
this.addFailure(this.createFailure(arg.getStart(source), arg.getWidth(source), Rule.FAILURE_STRING_FACTORY(param.getName(), triviaContent)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
import * as Lint from "tslint/lib/lint";
|
||||
import * as ts from "typescript";
|
||||
|
||||
|
||||
export class Rule extends Lint.Rules.AbstractRule {
|
||||
public static POSTFIX_FAILURE_STRING = "Don't use '++' or '--' postfix operators outside statements or for loops.";
|
||||
public static PREFIX_FAILURE_STRING = "Don't use '++' or '--' prefix operators.";
|
||||
|
||||
public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
|
||||
return this.applyWithWalker(new IncrementDecrementWalker(sourceFile, this.getOptions()));
|
||||
}
|
||||
}
|
||||
|
||||
class IncrementDecrementWalker extends Lint.RuleWalker {
|
||||
|
||||
visitPostfixUnaryExpression(node: ts.PostfixUnaryExpression) {
|
||||
super.visitPostfixUnaryExpression(node);
|
||||
if (node.operator === ts.SyntaxKind.PlusPlusToken || node.operator == ts.SyntaxKind.MinusMinusToken) {
|
||||
this.visitIncrementDecrement(node);
|
||||
}
|
||||
}
|
||||
|
||||
visitPrefixUnaryExpression(node: ts.PrefixUnaryExpression) {
|
||||
super.visitPrefixUnaryExpression(node);
|
||||
if (node.operator === ts.SyntaxKind.PlusPlusToken || node.operator == ts.SyntaxKind.MinusMinusToken) {
|
||||
this.addFailure(this.createFailure(node.getStart(), node.getWidth(), Rule.PREFIX_FAILURE_STRING));
|
||||
}
|
||||
}
|
||||
|
||||
visitIncrementDecrement(node: ts.UnaryExpression) {
|
||||
if (node.parent && (node.parent.kind === ts.SyntaxKind.ExpressionStatement ||
|
||||
node.parent.kind === ts.SyntaxKind.ForStatement)) {
|
||||
return;
|
||||
}
|
||||
this.addFailure(this.createFailure(node.getStart(), node.getWidth(), Rule.POSTFIX_FAILURE_STRING));
|
||||
}
|
||||
}
|
||||
@@ -1,235 +0,0 @@
|
||||
// word2md - Word to Markdown conversion tool
|
||||
//
|
||||
// word2md converts a Microsoft Word document to Markdown formatted text. The tool uses the
|
||||
// Word Automation APIs to start an instance of Word and access the contents of the document
|
||||
// being converted. The tool must be run using the cscript.exe script host and requires Word
|
||||
// to be installed on the target machine. The name of the document to convert must be specified
|
||||
// as a command line argument and the resulting Markdown is written to standard output. The
|
||||
// tool recognizes the specific Word styles used in the TypeScript Language Specification.
|
||||
var sys = (function () {
|
||||
var fileStream = new ActiveXObject("ADODB.Stream");
|
||||
fileStream.Type = 2 /*text*/;
|
||||
var binaryStream = new ActiveXObject("ADODB.Stream");
|
||||
binaryStream.Type = 1 /*binary*/;
|
||||
var args = [];
|
||||
for (var i = 0; i < WScript.Arguments.length; i++) {
|
||||
args[i] = WScript.Arguments.Item(i);
|
||||
}
|
||||
return {
|
||||
args: args,
|
||||
createObject: function (typeName) { return new ActiveXObject(typeName); },
|
||||
write: function (s) {
|
||||
WScript.StdOut.Write(s);
|
||||
},
|
||||
writeFile: function (fileName, data) {
|
||||
fileStream.Open();
|
||||
binaryStream.Open();
|
||||
try {
|
||||
// Write characters in UTF-8 encoding
|
||||
fileStream.Charset = "utf-8";
|
||||
fileStream.WriteText(data);
|
||||
// We don't want the BOM, skip it by setting the starting location to 3 (size of BOM).
|
||||
fileStream.Position = 3;
|
||||
fileStream.CopyTo(binaryStream);
|
||||
binaryStream.SaveToFile(fileName, 2 /*overwrite*/);
|
||||
}
|
||||
finally {
|
||||
binaryStream.Close();
|
||||
fileStream.Close();
|
||||
}
|
||||
}
|
||||
};
|
||||
})();
|
||||
function convertDocumentToMarkdown(doc) {
|
||||
var result = "";
|
||||
var lastStyle;
|
||||
var lastInTable;
|
||||
var tableColumnCount;
|
||||
var tableCellIndex;
|
||||
var columnAlignment = [];
|
||||
function setProperties(target, properties) {
|
||||
for (var name in properties) {
|
||||
if (properties.hasOwnProperty(name)) {
|
||||
var value = properties[name];
|
||||
if (typeof value === "object") {
|
||||
setProperties(target[name], value);
|
||||
}
|
||||
else {
|
||||
target[name] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function findReplace(findText, findOptions, replaceText, replaceOptions) {
|
||||
var find = doc.range().find;
|
||||
find.clearFormatting();
|
||||
setProperties(find, findOptions);
|
||||
var replace = find.replacement;
|
||||
replace.clearFormatting();
|
||||
setProperties(replace, replaceOptions);
|
||||
find.execute(findText, false, false, false, false, false, true, 0, true, replaceText, 2);
|
||||
}
|
||||
function fixHyperlinks() {
|
||||
var count = doc.hyperlinks.count;
|
||||
for (var i = 0; i < count; i++) {
|
||||
var hyperlink = doc.hyperlinks.item(i + 1);
|
||||
var address = hyperlink.address;
|
||||
if (address && address.length > 0) {
|
||||
var textToDisplay = hyperlink.textToDisplay;
|
||||
hyperlink.textToDisplay = "[" + textToDisplay + "](" + address + ")";
|
||||
}
|
||||
}
|
||||
}
|
||||
function write(s) {
|
||||
result += s;
|
||||
}
|
||||
function writeTableHeader() {
|
||||
for (var i = 0; i < tableColumnCount - 1; i++) {
|
||||
switch (columnAlignment[i]) {
|
||||
case 1:
|
||||
write("|:---:");
|
||||
break;
|
||||
case 2:
|
||||
write("|---:");
|
||||
break;
|
||||
default:
|
||||
write("|---");
|
||||
}
|
||||
}
|
||||
write("|\n");
|
||||
}
|
||||
function trimEndFormattingMarks(text) {
|
||||
var i = text.length;
|
||||
while (i > 0 && text.charCodeAt(i - 1) < 0x20)
|
||||
i--;
|
||||
return text.substr(0, i);
|
||||
}
|
||||
function writeBlockEnd() {
|
||||
switch (lastStyle) {
|
||||
case "Code":
|
||||
write("```\n\n");
|
||||
break;
|
||||
case "List Paragraph":
|
||||
case "Table":
|
||||
case "TOC":
|
||||
write("\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
function writeParagraph(p) {
|
||||
var text = p.range.text;
|
||||
var style = p.style.nameLocal;
|
||||
var inTable = p.range.tables.count > 0;
|
||||
var level = 1;
|
||||
var sectionBreak = text.indexOf("\x0C") >= 0;
|
||||
text = trimEndFormattingMarks(text);
|
||||
if (inTable) {
|
||||
style = "Table";
|
||||
}
|
||||
else if (style.match(/\s\d$/)) {
|
||||
level = +style.substr(style.length - 1);
|
||||
style = style.substr(0, style.length - 2);
|
||||
}
|
||||
if (lastStyle && style !== lastStyle) {
|
||||
writeBlockEnd();
|
||||
}
|
||||
switch (style) {
|
||||
case "Heading":
|
||||
case "Appendix":
|
||||
var section = p.range.listFormat.listString;
|
||||
write("####".substr(0, level) + ' <a name="' + section + '"/>' + section + " " + text + "\n\n");
|
||||
break;
|
||||
case "Normal":
|
||||
if (text.length) {
|
||||
write(text + "\n\n");
|
||||
}
|
||||
break;
|
||||
case "List Paragraph":
|
||||
write(" ".substr(0, p.range.listFormat.listLevelNumber * 2 - 2) + "* " + text + "\n");
|
||||
break;
|
||||
case "Grammar":
|
||||
write("  " + text.replace(/\s\s\s/g, " ").replace(/\x0B/g, " \n   ") + "\n\n");
|
||||
break;
|
||||
case "Code":
|
||||
if (lastStyle !== "Code") {
|
||||
write("```TypeScript\n");
|
||||
}
|
||||
else {
|
||||
write("\n");
|
||||
}
|
||||
write(text.replace(/\x0B/g, " \n") + "\n");
|
||||
break;
|
||||
case "Table":
|
||||
if (!lastInTable) {
|
||||
tableColumnCount = p.range.tables.item(1).columns.count + 1;
|
||||
tableCellIndex = 0;
|
||||
}
|
||||
if (tableCellIndex < tableColumnCount) {
|
||||
columnAlignment[tableCellIndex] = p.alignment;
|
||||
}
|
||||
write("|" + text);
|
||||
tableCellIndex++;
|
||||
if (tableCellIndex % tableColumnCount === 0) {
|
||||
write("\n");
|
||||
if (tableCellIndex === tableColumnCount) {
|
||||
writeTableHeader();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "TOC Heading":
|
||||
write("## " + text + "\n\n");
|
||||
break;
|
||||
case "TOC":
|
||||
var strings = text.split("\t");
|
||||
write(" ".substr(0, level * 2 - 2) + "* [" + strings[0] + " " + strings[1] + "](#" + strings[0] + ")\n");
|
||||
break;
|
||||
}
|
||||
if (sectionBreak) {
|
||||
write("<br/>\n\n");
|
||||
}
|
||||
lastStyle = style;
|
||||
lastInTable = inTable;
|
||||
}
|
||||
function writeDocument() {
|
||||
var title = doc.builtInDocumentProperties.item(1) + "";
|
||||
if (title.length) {
|
||||
write("# " + title + "\n\n");
|
||||
}
|
||||
for (var p = doc.paragraphs.first; p; p = p.next()) {
|
||||
writeParagraph(p);
|
||||
}
|
||||
writeBlockEnd();
|
||||
}
|
||||
findReplace("<", {}, "<", {});
|
||||
findReplace("<", { style: "Code" }, "<", {});
|
||||
findReplace("<", { style: "Code Fragment" }, "<", {});
|
||||
findReplace("<", { style: "Terminal" }, "<", {});
|
||||
findReplace("", { font: { subscript: true } }, "<sub>^&</sub>", { font: { subscript: false } });
|
||||
findReplace("", { style: "Code Fragment" }, "`^&`", { style: -66 /* default font */ });
|
||||
findReplace("", { style: "Production" }, "*^&*", { style: -66 /* default font */ });
|
||||
findReplace("", { style: "Terminal" }, "`^&`", { style: -66 /* default font */ });
|
||||
findReplace("", { font: { bold: true, italic: true } }, "***^&***", { font: { bold: false, italic: false } });
|
||||
findReplace("", { font: { italic: true } }, "*^&*", { font: { italic: false } });
|
||||
doc.fields.toggleShowCodes();
|
||||
findReplace("^19 REF", {}, "[^&](#^&)", {});
|
||||
doc.fields.toggleShowCodes();
|
||||
fixHyperlinks();
|
||||
writeDocument();
|
||||
result = result.replace(/\x85/g, "\u2026");
|
||||
result = result.replace(/\x96/g, "\u2013");
|
||||
result = result.replace(/\x97/g, "\u2014");
|
||||
return result;
|
||||
}
|
||||
function main(args) {
|
||||
if (args.length !== 2) {
|
||||
sys.write("Syntax: word2md <inputfile> <outputfile>\n");
|
||||
return;
|
||||
}
|
||||
var app = sys.createObject("Word.Application");
|
||||
var doc = app.documents.open(args[0]);
|
||||
sys.writeFile(args[1], convertDocumentToMarkdown(doc));
|
||||
doc.close(false);
|
||||
app.quit();
|
||||
}
|
||||
main(sys.args);
|
||||
//# sourceMappingURL=file:///c:/ts/scripts/word2md.js.map
|
||||
+22
-5
@@ -72,6 +72,9 @@ module Word {
|
||||
listFormat: ListFormat;
|
||||
tables: Tables;
|
||||
text: string;
|
||||
textRetrievalMode: {
|
||||
includeHiddenText: boolean;
|
||||
}
|
||||
words: Ranges;
|
||||
}
|
||||
|
||||
@@ -258,13 +261,27 @@ function convertDocumentToMarkdown(doc: Word.Document): string {
|
||||
|
||||
function writeParagraph(p: Word.Paragraph) {
|
||||
|
||||
var text = p.range.text;
|
||||
var range = p.range;
|
||||
var text = range.text;
|
||||
var style = p.style.nameLocal;
|
||||
var inTable = p.range.tables.count > 0;
|
||||
var inTable = range.tables.count > 0;
|
||||
var level = 1;
|
||||
var sectionBreak = text.indexOf("\x0C") >= 0;
|
||||
|
||||
text = trimEndFormattingMarks(text);
|
||||
if (text === "/") {
|
||||
// An inline image shows up in the text as a "/". When we see a paragraph
|
||||
// consisting of nothing but "/", we check to see if the paragraph contains
|
||||
// hidden text and, if so, emit that instead. The hidden text is assumed to
|
||||
// contain an appropriate markdown image link.
|
||||
range.textRetrievalMode.includeHiddenText = true;
|
||||
var fullText = range.text;
|
||||
range.textRetrievalMode.includeHiddenText = false;
|
||||
if (text !== fullText) {
|
||||
text = "  " + fullText.substr(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (inTable) {
|
||||
style = "Table";
|
||||
}
|
||||
@@ -280,7 +297,7 @@ function convertDocumentToMarkdown(doc: Word.Document): string {
|
||||
|
||||
case "Heading":
|
||||
case "Appendix":
|
||||
var section = p.range.listFormat.listString;
|
||||
var section = range.listFormat.listString;
|
||||
write("####".substr(0, level) + ' <a name="' + section + '"/>' + section + " " + text + "\n\n");
|
||||
break;
|
||||
|
||||
@@ -291,7 +308,7 @@ function convertDocumentToMarkdown(doc: Word.Document): string {
|
||||
break;
|
||||
|
||||
case "List Paragraph":
|
||||
write(" ".substr(0, p.range.listFormat.listLevelNumber * 2 - 2) + "* " + text + "\n");
|
||||
write(" ".substr(0, range.listFormat.listLevelNumber * 2 - 2) + "* " + text + "\n");
|
||||
break;
|
||||
|
||||
case "Grammar":
|
||||
@@ -310,7 +327,7 @@ function convertDocumentToMarkdown(doc: Word.Document): string {
|
||||
|
||||
case "Table":
|
||||
if (!lastInTable) {
|
||||
tableColumnCount = p.range.tables.item(1).columns.count + 1;
|
||||
tableColumnCount = range.tables.item(1).columns.count + 1;
|
||||
tableCellIndex = 0;
|
||||
}
|
||||
if (tableCellIndex < tableColumnCount) {
|
||||
|
||||
+120
-58
@@ -7,7 +7,10 @@ namespace ts {
|
||||
let nextMergeId = 1;
|
||||
|
||||
export function getNodeId(node: Node): number {
|
||||
if (!node.id) node.id = nextNodeId++;
|
||||
if (!node.id) {
|
||||
node.id = nextNodeId;
|
||||
nextNodeId++;
|
||||
}
|
||||
return node.id;
|
||||
}
|
||||
|
||||
@@ -15,7 +18,8 @@ namespace ts {
|
||||
|
||||
export function getSymbolId(symbol: Symbol): number {
|
||||
if (!symbol.id) {
|
||||
symbol.id = nextSymbolId++;
|
||||
symbol.id = nextSymbolId;
|
||||
nextSymbolId++;
|
||||
}
|
||||
|
||||
return symbol.id;
|
||||
@@ -61,6 +65,7 @@ namespace ts {
|
||||
getTypeCount: () => typeCount,
|
||||
isUndefinedSymbol: symbol => symbol === undefinedSymbol,
|
||||
isArgumentsSymbol: symbol => symbol === argumentsSymbol,
|
||||
isUnknownSymbol: symbol => symbol === unknownSymbol,
|
||||
getDiagnostics,
|
||||
getGlobalDiagnostics,
|
||||
|
||||
@@ -287,7 +292,10 @@ namespace ts {
|
||||
}
|
||||
|
||||
function recordMergedSymbol(target: Symbol, source: Symbol) {
|
||||
if (!source.mergeId) source.mergeId = nextMergeId++;
|
||||
if (!source.mergeId) {
|
||||
source.mergeId = nextMergeId;
|
||||
nextMergeId++;
|
||||
}
|
||||
mergedSymbols[source.mergeId] = target;
|
||||
}
|
||||
|
||||
@@ -1301,7 +1309,8 @@ namespace ts {
|
||||
|
||||
function createType(flags: TypeFlags): Type {
|
||||
const result = new Type(checker, flags);
|
||||
result.id = typeCount++;
|
||||
result.id = typeCount;
|
||||
typeCount++;
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -1862,11 +1871,13 @@ namespace ts {
|
||||
}
|
||||
if (pos < end) {
|
||||
writePunctuation(writer, SyntaxKind.LessThanToken);
|
||||
writeType(typeArguments[pos++], TypeFormatFlags.None);
|
||||
writeType(typeArguments[pos], TypeFormatFlags.None);
|
||||
pos++;
|
||||
while (pos < end) {
|
||||
writePunctuation(writer, SyntaxKind.CommaToken);
|
||||
writeSpace(writer);
|
||||
writeType(typeArguments[pos++], TypeFormatFlags.None);
|
||||
writeType(typeArguments[pos], TypeFormatFlags.None);
|
||||
pos++;
|
||||
}
|
||||
writePunctuation(writer, SyntaxKind.GreaterThanToken);
|
||||
}
|
||||
@@ -2553,9 +2564,9 @@ namespace ts {
|
||||
|
||||
// Return the inferred type for a variable, parameter, or property declaration
|
||||
function getTypeForVariableLikeDeclaration(declaration: VariableLikeDeclaration): Type {
|
||||
// A variable declared in a for..in statement is always of type any
|
||||
// A variable declared in a for..in statement is always of type string
|
||||
if (declaration.parent.parent.kind === SyntaxKind.ForInStatement) {
|
||||
return anyType;
|
||||
return stringType;
|
||||
}
|
||||
|
||||
if (declaration.parent.parent.kind === SyntaxKind.ForOfStatement) {
|
||||
@@ -5719,7 +5730,7 @@ namespace ts {
|
||||
return Ternary.False;
|
||||
}
|
||||
let result = Ternary.True;
|
||||
for (let i = 0, len = sourceSignatures.length; i < len; ++i) {
|
||||
for (let i = 0, len = sourceSignatures.length; i < len; i++) {
|
||||
const related = compareSignaturesIdentical(sourceSignatures[i], targetSignatures[i], /*partialMatch*/ false, /*ignoreReturnTypes*/ false, isRelatedTo);
|
||||
if (!related) {
|
||||
return Ternary.False;
|
||||
@@ -7395,6 +7406,12 @@ namespace ts {
|
||||
}
|
||||
return type;
|
||||
}
|
||||
else if (operator === SyntaxKind.AmpersandAmpersandToken || operator === SyntaxKind.CommaToken) {
|
||||
if (node === binaryExpression.right) {
|
||||
return getContextualType(binaryExpression);
|
||||
}
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -7507,24 +7524,22 @@ namespace ts {
|
||||
return node === conditional.whenTrue || node === conditional.whenFalse ? getContextualType(conditional) : undefined;
|
||||
}
|
||||
|
||||
function getContextualTypeForJsxExpression(expr: JsxExpression | JsxSpreadAttribute): Type {
|
||||
// Contextual type only applies to JSX expressions that are in attribute assignments (not in 'Children' positions)
|
||||
if (expr.parent.kind === SyntaxKind.JsxAttribute) {
|
||||
const attrib = <JsxAttribute>expr.parent;
|
||||
const attrsType = getJsxElementAttributesType(<JsxOpeningLikeElement>attrib.parent);
|
||||
function getContextualTypeForJsxAttribute(attribute: JsxAttribute | JsxSpreadAttribute) {
|
||||
const kind = attribute.kind;
|
||||
const jsxElement = attribute.parent as JsxOpeningLikeElement;
|
||||
const attrsType = getJsxElementAttributesType(jsxElement);
|
||||
|
||||
if (attribute.kind === SyntaxKind.JsxAttribute) {
|
||||
if (!attrsType || isTypeAny(attrsType)) {
|
||||
return undefined;
|
||||
}
|
||||
else {
|
||||
return getTypeOfPropertyOfType(attrsType, attrib.name.text);
|
||||
}
|
||||
return getTypeOfPropertyOfType(attrsType, (attribute as JsxAttribute).name.text);
|
||||
}
|
||||
else if (attribute.kind === SyntaxKind.JsxSpreadAttribute) {
|
||||
return attrsType;
|
||||
}
|
||||
|
||||
if (expr.kind === SyntaxKind.JsxSpreadAttribute) {
|
||||
return getJsxElementAttributesType(<JsxOpeningLikeElement>expr.parent);
|
||||
}
|
||||
|
||||
return undefined;
|
||||
Debug.fail(`Expected JsxAttribute or JsxSpreadAttribute, got ts.SyntaxKind[${kind}]`);
|
||||
}
|
||||
|
||||
// Return the contextual type for a given expression node. During overload resolution, a contextual type may temporarily
|
||||
@@ -7592,8 +7607,10 @@ namespace ts {
|
||||
case SyntaxKind.ParenthesizedExpression:
|
||||
return getContextualType(<ParenthesizedExpression>parent);
|
||||
case SyntaxKind.JsxExpression:
|
||||
return getContextualType(<JsxExpression>parent);
|
||||
case SyntaxKind.JsxAttribute:
|
||||
case SyntaxKind.JsxSpreadAttribute:
|
||||
return getContextualTypeForJsxExpression(<JsxExpression>parent);
|
||||
return getContextualTypeForJsxAttribute(<JsxAttribute | JsxSpreadAttribute>parent);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
@@ -7981,31 +7998,12 @@ namespace ts {
|
||||
return jsxElementType || anyType;
|
||||
}
|
||||
|
||||
function tagNamesAreEquivalent(lhs: EntityName, rhs: EntityName): boolean {
|
||||
if (lhs.kind !== rhs.kind) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (lhs.kind === SyntaxKind.Identifier) {
|
||||
return (<Identifier>lhs).text === (<Identifier>rhs).text;
|
||||
}
|
||||
|
||||
return (<QualifiedName>lhs).right.text === (<QualifiedName>rhs).right.text &&
|
||||
tagNamesAreEquivalent((<QualifiedName>lhs).left, (<QualifiedName>rhs).left);
|
||||
}
|
||||
|
||||
function checkJsxElement(node: JsxElement) {
|
||||
// Check attributes
|
||||
checkJsxOpeningLikeElement(node.openingElement);
|
||||
|
||||
// Check that the closing tag matches
|
||||
if (!tagNamesAreEquivalent(node.openingElement.tagName, node.closingElement.tagName)) {
|
||||
error(node.closingElement, Diagnostics.Expected_corresponding_JSX_closing_tag_for_0, getTextOfNode(node.openingElement.tagName));
|
||||
}
|
||||
else {
|
||||
// Perform resolution on the closing tag so that rename/go to definition/etc work
|
||||
getJsxElementTagSymbol(node.closingElement);
|
||||
}
|
||||
// Perform resolution on the closing tag so that rename/go to definition/etc work
|
||||
getJsxElementTagSymbol(node.closingElement);
|
||||
|
||||
// Check children
|
||||
for (const child of node.children) {
|
||||
@@ -8158,6 +8156,7 @@ namespace ts {
|
||||
if (compilerOptions.noImplicitAny) {
|
||||
error(node, Diagnostics.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists, JsxNames.IntrinsicElements);
|
||||
}
|
||||
return unknownSymbol;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8406,14 +8405,13 @@ namespace ts {
|
||||
checkGrammarJsxElement(node);
|
||||
checkJsxPreconditions(node);
|
||||
|
||||
// If we're compiling under --jsx react, the symbol 'React' should
|
||||
// be marked as 'used' so we don't incorrectly elide its import. And if there
|
||||
// is no 'React' symbol in scope, we should issue an error.
|
||||
if (compilerOptions.jsx === JsxEmit.React) {
|
||||
const reactSym = resolveName(node.tagName, "React", SymbolFlags.Value, Diagnostics.Cannot_find_name_0, "React");
|
||||
if (reactSym) {
|
||||
getSymbolLinks(reactSym).referenced = true;
|
||||
}
|
||||
// The reactNamespace symbol should be marked as 'used' so we don't incorrectly elide its import. And if there
|
||||
// is no reactNamespace symbol in scope when targeting React emit, we should issue an error.
|
||||
const reactRefErr = compilerOptions.jsx === JsxEmit.React ? Diagnostics.Cannot_find_name_0 : undefined;
|
||||
const reactNamespace = compilerOptions.reactNamespace ? compilerOptions.reactNamespace : "React";
|
||||
const reactSym = resolveName(node.tagName, reactNamespace, SymbolFlags.Value, reactRefErr, reactNamespace);
|
||||
if (reactSym) {
|
||||
getSymbolLinks(reactSym).referenced = true;
|
||||
}
|
||||
|
||||
const targetAttributesType = getJsxElementAttributesType(node);
|
||||
@@ -8611,6 +8609,56 @@ namespace ts {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the symbol of the for-in variable declared or referenced by the given for-in statement.
|
||||
*/
|
||||
function getForInVariableSymbol(node: ForInStatement): Symbol {
|
||||
const initializer = node.initializer;
|
||||
if (initializer.kind === SyntaxKind.VariableDeclarationList) {
|
||||
const variable = (<VariableDeclarationList>initializer).declarations[0];
|
||||
if (variable && !isBindingPattern(variable.name)) {
|
||||
return getSymbolOfNode(variable);
|
||||
}
|
||||
}
|
||||
else if (initializer.kind === SyntaxKind.Identifier) {
|
||||
return getResolvedSymbol(<Identifier>initializer);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the given type is considered to have numeric property names.
|
||||
*/
|
||||
function hasNumericPropertyNames(type: Type) {
|
||||
return getIndexTypeOfType(type, IndexKind.Number) && !getIndexTypeOfType(type, IndexKind.String);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if given node is an expression consisting of an identifier (possibly parenthesized)
|
||||
* that references a for-in variable for an object with numeric property names.
|
||||
*/
|
||||
function isForInVariableForNumericPropertyNames(expr: Expression) {
|
||||
const e = skipParenthesizedNodes(expr);
|
||||
if (e.kind === SyntaxKind.Identifier) {
|
||||
const symbol = getResolvedSymbol(<Identifier>e);
|
||||
if (symbol.flags & SymbolFlags.Variable) {
|
||||
let child: Node = expr;
|
||||
let node = expr.parent;
|
||||
while (node) {
|
||||
if (node.kind === SyntaxKind.ForInStatement &&
|
||||
child === (<ForInStatement>node).statement &&
|
||||
getForInVariableSymbol(<ForInStatement>node) === symbol &&
|
||||
hasNumericPropertyNames(checkExpression((<ForInStatement>node).expression))) {
|
||||
return true;
|
||||
}
|
||||
child = node;
|
||||
node = node.parent;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function checkIndexedAccess(node: ElementAccessExpression): Type {
|
||||
// Grammar checking
|
||||
if (!node.argumentExpression) {
|
||||
@@ -8671,7 +8719,7 @@ namespace ts {
|
||||
if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, TypeFlags.StringLike | TypeFlags.NumberLike | TypeFlags.ESSymbol)) {
|
||||
|
||||
// Try to use a number indexer.
|
||||
if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, TypeFlags.NumberLike)) {
|
||||
if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, TypeFlags.NumberLike) || isForInVariableForNumericPropertyNames(node.argumentExpression)) {
|
||||
const numberIndexType = getIndexTypeOfType(objectType, IndexKind.Number);
|
||||
if (numberIndexType) {
|
||||
return numberIndexType;
|
||||
@@ -8686,7 +8734,9 @@ namespace ts {
|
||||
|
||||
// Fall back to any.
|
||||
if (compilerOptions.noImplicitAny && !compilerOptions.suppressImplicitAnyIndexErrors && !isTypeAny(objectType)) {
|
||||
error(node, Diagnostics.Index_signature_of_object_type_implicitly_has_an_any_type);
|
||||
error(node, getIndexTypeOfType(objectType, IndexKind.Number) ?
|
||||
Diagnostics.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number :
|
||||
Diagnostics.Index_signature_of_object_type_implicitly_has_an_any_type);
|
||||
}
|
||||
|
||||
return anyType;
|
||||
@@ -12745,7 +12795,8 @@ namespace ts {
|
||||
}
|
||||
// For a binding pattern, validate the initializer and exit
|
||||
if (isBindingPattern(node.name)) {
|
||||
if (node.initializer) {
|
||||
// Don't validate for-in initializer as it is already an error
|
||||
if (node.initializer && node.parent.parent.kind !== SyntaxKind.ForInStatement) {
|
||||
checkTypeAssignableTo(checkExpressionCached(node.initializer), getWidenedTypeForVariableLikeDeclaration(node), node, /*headMessage*/ undefined);
|
||||
checkParameterInitializer(node);
|
||||
}
|
||||
@@ -12755,7 +12806,8 @@ namespace ts {
|
||||
const type = getTypeOfVariableOrParameterOrProperty(symbol);
|
||||
if (node === symbol.valueDeclaration) {
|
||||
// Node is the primary declaration of the symbol, just validate the initializer
|
||||
if (node.initializer) {
|
||||
// Don't validate for-in initializer as it is already an error
|
||||
if (node.initializer && node.parent.parent.kind !== SyntaxKind.ForInStatement) {
|
||||
checkTypeAssignableTo(checkExpressionCached(node.initializer), type, node, /*headMessage*/ undefined);
|
||||
checkParameterInitializer(node);
|
||||
}
|
||||
@@ -13884,7 +13936,8 @@ namespace ts {
|
||||
}
|
||||
|
||||
if (autoValue !== undefined) {
|
||||
getNodeLinks(member).enumMemberValue = autoValue++;
|
||||
getNodeLinks(member).enumMemberValue = autoValue;
|
||||
autoValue++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14446,7 +14499,16 @@ namespace ts {
|
||||
function checkExportSpecifier(node: ExportSpecifier) {
|
||||
checkAliasSymbol(node);
|
||||
if (!(<ExportDeclaration>node.parent.parent).moduleSpecifier) {
|
||||
markExportAsReferenced(node);
|
||||
const exportedName = node.propertyName || node.name;
|
||||
// find immediate value referenced by exported name (SymbolFlags.Alias is set so we don't chase down aliases)
|
||||
const symbol = resolveName(exportedName, exportedName.text, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Alias,
|
||||
/*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined);
|
||||
if (symbol && isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0]))) {
|
||||
error(exportedName, Diagnostics.Cannot_re_export_name_that_is_not_defined_in_the_module);
|
||||
}
|
||||
else {
|
||||
markExportAsReferenced(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -54,6 +54,11 @@ namespace ts {
|
||||
description: Diagnostics.Specify_JSX_code_generation_Colon_preserve_or_react,
|
||||
error: Diagnostics.Argument_for_jsx_must_be_preserve_or_react
|
||||
},
|
||||
{
|
||||
name: "reactNamespace",
|
||||
type: "string",
|
||||
description: Diagnostics.Specifies_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit
|
||||
},
|
||||
{
|
||||
name: "listFiles",
|
||||
type: "boolean",
|
||||
@@ -334,7 +339,8 @@ namespace ts {
|
||||
function parseStrings(args: string[]) {
|
||||
let i = 0;
|
||||
while (i < args.length) {
|
||||
let s = args[i++];
|
||||
let s = args[i];
|
||||
i++;
|
||||
if (s.charCodeAt(0) === CharacterCodes.at) {
|
||||
parseResponseFile(s.slice(1));
|
||||
}
|
||||
@@ -356,18 +362,21 @@ namespace ts {
|
||||
|
||||
switch (opt.type) {
|
||||
case "number":
|
||||
options[opt.name] = parseInt(args[i++]);
|
||||
options[opt.name] = parseInt(args[i]);
|
||||
i++;
|
||||
break;
|
||||
case "boolean":
|
||||
options[opt.name] = true;
|
||||
break;
|
||||
case "string":
|
||||
options[opt.name] = args[i++] || "";
|
||||
options[opt.name] = args[i] || "";
|
||||
i++;
|
||||
break;
|
||||
// If not a primitive, the possible types are specified in what is effectively a map of options.
|
||||
default:
|
||||
let map = <Map<number>>opt.type;
|
||||
let key = (args[i++] || "").toLowerCase();
|
||||
let key = (args[i] || "").toLowerCase();
|
||||
i++;
|
||||
if (hasProperty(map, key)) {
|
||||
options[opt.name] = map[key];
|
||||
}
|
||||
|
||||
@@ -244,9 +244,11 @@ namespace ts {
|
||||
const count = array.length;
|
||||
if (count > 0) {
|
||||
let pos = 0;
|
||||
let result = arguments.length <= 2 ? array[pos++] : initial;
|
||||
let result = arguments.length <= 2 ? array[pos] : initial;
|
||||
pos++;
|
||||
while (pos < count) {
|
||||
result = f(<U>result, array[pos++]);
|
||||
result = f(<U>result, array[pos]);
|
||||
pos++;
|
||||
}
|
||||
return <U>result;
|
||||
}
|
||||
@@ -260,9 +262,11 @@ namespace ts {
|
||||
if (array) {
|
||||
let pos = array.length - 1;
|
||||
if (pos >= 0) {
|
||||
let result = arguments.length <= 2 ? array[pos--] : initial;
|
||||
let result = arguments.length <= 2 ? array[pos] : initial;
|
||||
pos--;
|
||||
while (pos >= 0) {
|
||||
result = f(<U>result, array[pos--]);
|
||||
result = f(<U>result, array[pos]);
|
||||
pos--;
|
||||
}
|
||||
return <U>result;
|
||||
}
|
||||
|
||||
@@ -511,7 +511,8 @@ namespace ts {
|
||||
}
|
||||
let count = 0;
|
||||
while (true) {
|
||||
const name = baseName + "_" + (++count);
|
||||
count++;
|
||||
const name = baseName + "_" + count;
|
||||
if (!hasProperty(currentIdentifiers, name)) {
|
||||
return name;
|
||||
}
|
||||
|
||||
@@ -1771,34 +1771,38 @@
|
||||
"category": "Error",
|
||||
"code": 2660
|
||||
},
|
||||
"Invalid module name in augmentation, module '{0}' cannot be found.": {
|
||||
"Cannot re-export name that is not defined in the module.": {
|
||||
"category": "Error",
|
||||
"code": 2661
|
||||
},
|
||||
"Module augmentation cannot introduce new names in the top level scope.": {
|
||||
"Invalid module name in augmentation, module '{0}' cannot be found.": {
|
||||
"category": "Error",
|
||||
"code": 2662
|
||||
},
|
||||
"Exports are not permitted in module augmentations.": {
|
||||
"Module augmentation cannot introduce new names in the top level scope.": {
|
||||
"category": "Error",
|
||||
"code": 2663
|
||||
},
|
||||
"Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.": {
|
||||
"Exports are not permitted in module augmentations.": {
|
||||
"category": "Error",
|
||||
"code": 2664
|
||||
},
|
||||
"'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible.": {
|
||||
"Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.": {
|
||||
"category": "Error",
|
||||
"code": 2665
|
||||
},
|
||||
"Augmentations for the global scope can only be directly nested in external modules or ambient module declarations.": {
|
||||
"'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible.": {
|
||||
"category": "Error",
|
||||
"code": 2666
|
||||
},
|
||||
"Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context.": {
|
||||
"Augmentations for the global scope can only be directly nested in external modules or ambient module declarations.": {
|
||||
"category": "Error",
|
||||
"code": 2667
|
||||
},
|
||||
"Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context.": {
|
||||
"category": "Error",
|
||||
"code": 2668
|
||||
},
|
||||
"Import declaration '{0}' is using private name '{1}'.": {
|
||||
"category": "Error",
|
||||
"code": 4000
|
||||
@@ -2151,6 +2155,10 @@
|
||||
"category": "Error",
|
||||
"code": 5058
|
||||
},
|
||||
"Invalide value for '--reactNamespace'. '{0}' is not a valid identifier.": {
|
||||
"category": "Error",
|
||||
"code": 5059
|
||||
},
|
||||
|
||||
"Concatenate and emit output to single file.": {
|
||||
"category": "Message",
|
||||
@@ -2421,6 +2429,10 @@
|
||||
"category": "Message",
|
||||
"code": 6083
|
||||
},
|
||||
"Specifies the object invoked for createElement and __spread when targeting 'react' JSX emit": {
|
||||
"category": "Message",
|
||||
"code": 6084
|
||||
},
|
||||
|
||||
"Variable '{0}' implicitly has an '{1}' type.": {
|
||||
"category": "Error",
|
||||
@@ -2450,6 +2462,10 @@
|
||||
"category": "Error",
|
||||
"code": 7013
|
||||
},
|
||||
"Element implicitly has an 'any' type because index expression is not of type 'number'.": {
|
||||
"category": "Error",
|
||||
"code": 7015
|
||||
},
|
||||
"Property '{0}' implicitly has type 'any', because its 'set' accessor lacks a type annotation.": {
|
||||
"category": "Error",
|
||||
"code": 7016
|
||||
@@ -2614,5 +2630,9 @@
|
||||
"A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.": {
|
||||
"category": "Error",
|
||||
"code": 17007
|
||||
},
|
||||
"JSX element '{0}' has no corresponding closing tag.": {
|
||||
"category": "Error",
|
||||
"code": 17008
|
||||
}
|
||||
}
|
||||
|
||||
+115
-77
@@ -464,8 +464,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
const writer = createTextWriter(newLine);
|
||||
const { write, writeTextOfNode, writeLine, increaseIndent, decreaseIndent } = writer;
|
||||
|
||||
const sourceMap = compilerOptions.sourceMap || compilerOptions.inlineSourceMap ? createSourceMapWriter(host, writer) : getNullSourceMapWriter();
|
||||
const { setSourceFile, emitStart, emitEnd, emitPos } = sourceMap;
|
||||
let sourceMap = compilerOptions.sourceMap || compilerOptions.inlineSourceMap ? createSourceMapWriter(host, writer) : getNullSourceMapWriter();
|
||||
let { setSourceFile, emitStart, emitEnd, emitPos } = sourceMap;
|
||||
|
||||
let currentSourceFile: SourceFile;
|
||||
let currentText: string;
|
||||
@@ -512,6 +512,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
/** If removeComments is true, no leading-comments needed to be emitted **/
|
||||
const emitLeadingCommentsOfPosition = compilerOptions.removeComments ? function (pos: number) { } : emitLeadingCommentsOfPositionWorker;
|
||||
|
||||
const setSourceMapWriterEmit = compilerOptions.sourceMap || compilerOptions.inlineSourceMap ? changeSourceMapEmit : function (writer: SourceMapWriter) { };
|
||||
|
||||
const moduleEmitDelegates: Map<(node: SourceFile, emitRelativePathAsModuleName?: boolean) => void> = {
|
||||
[ModuleKind.ES6]: emitES6Module,
|
||||
[ModuleKind.AMD]: emitAMDModule,
|
||||
@@ -1186,7 +1188,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
|
||||
function emitJsxElement(openingNode: JsxOpeningLikeElement, children?: JsxChild[]) {
|
||||
const syntheticReactRef = <Identifier>createSynthesizedNode(SyntaxKind.Identifier);
|
||||
syntheticReactRef.text = "React";
|
||||
syntheticReactRef.text = compilerOptions.reactNamespace ? compilerOptions.reactNamespace : "React";
|
||||
syntheticReactRef.parent = openingNode;
|
||||
|
||||
// Call React.createElement(tag, ...
|
||||
@@ -1975,7 +1977,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
result.expression = parenthesizeForAccess(expression);
|
||||
result.dotToken = createSynthesizedNode(SyntaxKind.DotToken);
|
||||
result.name = name;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -2568,7 +2569,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
leftHandSideExpression.argumentExpression.kind !== SyntaxKind.StringLiteral) {
|
||||
const tempArgumentExpression = createAndRecordTempVariable(TempFlags._i);
|
||||
(<ElementAccessExpression>synthesizedLHS).argumentExpression = tempArgumentExpression;
|
||||
emitAssignment(tempArgumentExpression, leftHandSideExpression.argumentExpression, /*shouldEmitCommaBeforeAssignment*/ true);
|
||||
emitAssignment(tempArgumentExpression, leftHandSideExpression.argumentExpression, /*shouldEmitCommaBeforeAssignment*/ true, leftHandSideExpression.expression);
|
||||
}
|
||||
else {
|
||||
(<ElementAccessExpression>synthesizedLHS).argumentExpression = leftHandSideExpression.argumentExpression;
|
||||
@@ -2796,7 +2797,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
* Returns false if nothing was written - this can happen for source file level variable declarations
|
||||
* in system modules where such variable declarations are hoisted.
|
||||
*/
|
||||
function tryEmitStartOfVariableDeclarationList(decl: VariableDeclarationList, startPos?: number): boolean {
|
||||
function tryEmitStartOfVariableDeclarationList(decl: VariableDeclarationList): boolean {
|
||||
if (shouldHoistVariable(decl, /*checkIfSourceFileLevelDecl*/ true)) {
|
||||
// variables in variable declaration list were already hoisted
|
||||
return false;
|
||||
@@ -2811,34 +2812,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
return false;
|
||||
}
|
||||
|
||||
let tokenKind = SyntaxKind.VarKeyword;
|
||||
emitStart(decl);
|
||||
if (decl && languageVersion >= ScriptTarget.ES6) {
|
||||
if (isLet(decl)) {
|
||||
tokenKind = SyntaxKind.LetKeyword;
|
||||
write("let ");
|
||||
}
|
||||
else if (isConst(decl)) {
|
||||
tokenKind = SyntaxKind.ConstKeyword;
|
||||
write("const ");
|
||||
}
|
||||
else {
|
||||
write("var ");
|
||||
}
|
||||
}
|
||||
|
||||
if (startPos !== undefined) {
|
||||
emitToken(tokenKind, startPos);
|
||||
write(" ");
|
||||
}
|
||||
else {
|
||||
switch (tokenKind) {
|
||||
case SyntaxKind.VarKeyword:
|
||||
write("var ");
|
||||
break;
|
||||
case SyntaxKind.LetKeyword:
|
||||
write("let ");
|
||||
break;
|
||||
case SyntaxKind.ConstKeyword:
|
||||
write("const ");
|
||||
break;
|
||||
}
|
||||
write("var ");
|
||||
}
|
||||
|
||||
// Note here we specifically dont emit end so that if we are going to emit binding pattern
|
||||
// we can alter the source map correctly
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -3177,7 +3167,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
endPos = emitToken(SyntaxKind.OpenParenToken, endPos);
|
||||
if (node.initializer && node.initializer.kind === SyntaxKind.VariableDeclarationList) {
|
||||
const variableDeclarationList = <VariableDeclarationList>node.initializer;
|
||||
const startIsEmitted = tryEmitStartOfVariableDeclarationList(variableDeclarationList, endPos);
|
||||
const startIsEmitted = tryEmitStartOfVariableDeclarationList(variableDeclarationList);
|
||||
if (startIsEmitted) {
|
||||
emitCommaList(variableDeclarationList.declarations);
|
||||
}
|
||||
@@ -3218,7 +3208,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
if (node.initializer.kind === SyntaxKind.VariableDeclarationList) {
|
||||
const variableDeclarationList = <VariableDeclarationList>node.initializer;
|
||||
if (variableDeclarationList.declarations.length >= 1) {
|
||||
tryEmitStartOfVariableDeclarationList(variableDeclarationList, endPos);
|
||||
tryEmitStartOfVariableDeclarationList(variableDeclarationList);
|
||||
emit(variableDeclarationList.declarations[0]);
|
||||
}
|
||||
}
|
||||
@@ -3305,21 +3295,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
write("; ");
|
||||
|
||||
// _i < _a.length;
|
||||
emitStart(node.initializer);
|
||||
emitStart(node.expression);
|
||||
emitNodeWithoutSourceMap(counter);
|
||||
write(" < ");
|
||||
|
||||
emitNodeWithCommentsAndWithoutSourcemap(rhsReference);
|
||||
write(".length");
|
||||
|
||||
emitEnd(node.initializer);
|
||||
emitEnd(node.expression);
|
||||
write("; ");
|
||||
|
||||
// _i++)
|
||||
emitStart(node.initializer);
|
||||
emitStart(node.expression);
|
||||
emitNodeWithoutSourceMap(counter);
|
||||
write("++");
|
||||
emitEnd(node.initializer);
|
||||
emitEnd(node.expression);
|
||||
emitToken(SyntaxKind.CloseParenToken, node.expression.end);
|
||||
|
||||
// Body
|
||||
@@ -3719,7 +3709,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
* @param value an expression as a right-hand-side operand of the assignment
|
||||
* @param shouldEmitCommaBeforeAssignment a boolean indicating whether to prefix an assignment with comma
|
||||
*/
|
||||
function emitAssignment(name: Identifier, value: Expression, shouldEmitCommaBeforeAssignment: boolean) {
|
||||
function emitAssignment(name: Identifier, value: Expression, shouldEmitCommaBeforeAssignment: boolean, nodeForSourceMap: Node) {
|
||||
if (shouldEmitCommaBeforeAssignment) {
|
||||
write(", ");
|
||||
}
|
||||
@@ -3735,15 +3725,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
const isVariableDeclarationOrBindingElement =
|
||||
name.parent && (name.parent.kind === SyntaxKind.VariableDeclaration || name.parent.kind === SyntaxKind.BindingElement);
|
||||
|
||||
if (isVariableDeclarationOrBindingElement) {
|
||||
emitModuleMemberName(<Declaration>name.parent);
|
||||
}
|
||||
else {
|
||||
emit(name);
|
||||
}
|
||||
// If this is first var declaration, we need to start at var/let/const keyword instead
|
||||
// otherwise use nodeForSourceMap as the start position
|
||||
emitStart(isFirstVariableDeclaration(nodeForSourceMap) ? nodeForSourceMap.parent : nodeForSourceMap);
|
||||
withTemporaryNoSourceMap(() => {
|
||||
if (isVariableDeclarationOrBindingElement) {
|
||||
emitModuleMemberName(<Declaration>name.parent);
|
||||
}
|
||||
else {
|
||||
emit(name);
|
||||
}
|
||||
|
||||
write(" = ");
|
||||
emit(value);
|
||||
write(" = ");
|
||||
emit(value);
|
||||
});
|
||||
emitEnd(nodeForSourceMap, /*stopOverridingSpan*/true);
|
||||
|
||||
if (exportChanged) {
|
||||
write(")");
|
||||
@@ -3756,15 +3752,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
* @param canDefineTempVariablesInPlace a boolean indicating whether you can define the temporary variable at an assignment location
|
||||
* @param shouldEmitCommaBeforeAssignment a boolean indicating whether an assignment should prefix with comma
|
||||
*/
|
||||
function emitTempVariableAssignment(expression: Expression, canDefineTempVariablesInPlace: boolean, shouldEmitCommaBeforeAssignment: boolean): Identifier {
|
||||
function emitTempVariableAssignment(expression: Expression, canDefineTempVariablesInPlace: boolean, shouldEmitCommaBeforeAssignment: boolean, sourceMapNode?: Node): Identifier {
|
||||
const identifier = createTempVariable(TempFlags.Auto);
|
||||
if (!canDefineTempVariablesInPlace) {
|
||||
recordTempDeclaration(identifier);
|
||||
}
|
||||
emitAssignment(identifier, expression, shouldEmitCommaBeforeAssignment);
|
||||
emitAssignment(identifier, expression, shouldEmitCommaBeforeAssignment, sourceMapNode || expression.parent);
|
||||
return identifier;
|
||||
}
|
||||
|
||||
function isFirstVariableDeclaration(root: Node) {
|
||||
return root.kind === SyntaxKind.VariableDeclaration &&
|
||||
root.parent.kind === SyntaxKind.VariableDeclarationList &&
|
||||
(<VariableDeclarationList>root.parent).declarations[0] === root;
|
||||
}
|
||||
|
||||
function emitDestructuring(root: BinaryExpression | VariableDeclaration | ParameterDeclaration, isAssignmentExpressionStatement: boolean, value?: Expression) {
|
||||
let emitCount = 0;
|
||||
|
||||
@@ -3787,6 +3789,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
}
|
||||
else {
|
||||
Debug.assert(!isAssignmentExpressionStatement);
|
||||
// If first variable declaration of variable statement correct the start location
|
||||
if (isFirstVariableDeclaration(root)) {
|
||||
// Use emit location of "var " as next emit start entry
|
||||
sourceMap.changeEmitSourcePos();
|
||||
}
|
||||
emitBindingElement(<BindingElement>root, value);
|
||||
}
|
||||
|
||||
@@ -3800,20 +3807,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
* @param reuseIdentifierExpressions true if identifier expressions can simply be returned;
|
||||
* false if it is necessary to always emit an identifier.
|
||||
*/
|
||||
function ensureIdentifier(expr: Expression, reuseIdentifierExpressions: boolean): Expression {
|
||||
function ensureIdentifier(expr: Expression, reuseIdentifierExpressions: boolean, sourceMapNode: Node): Expression {
|
||||
if (expr.kind === SyntaxKind.Identifier && reuseIdentifierExpressions) {
|
||||
return expr;
|
||||
}
|
||||
|
||||
const identifier = emitTempVariableAssignment(expr, canDefineTempVariablesInPlace, emitCount > 0);
|
||||
const identifier = emitTempVariableAssignment(expr, canDefineTempVariablesInPlace, emitCount > 0, sourceMapNode);
|
||||
emitCount++;
|
||||
return identifier;
|
||||
}
|
||||
|
||||
function createDefaultValueCheck(value: Expression, defaultValue: Expression): Expression {
|
||||
function createDefaultValueCheck(value: Expression, defaultValue: Expression, sourceMapNode: Node): Expression {
|
||||
// The value expression will be evaluated twice, so for anything but a simple identifier
|
||||
// we need to generate a temporary variable
|
||||
value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true);
|
||||
// If the temporary variable needs to be emitted use the source Map node for assignment of that statement
|
||||
value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true, sourceMapNode);
|
||||
// Return the expression 'value === void 0 ? defaultValue : value'
|
||||
const equals = <BinaryExpression>createSynthesizedNode(SyntaxKind.BinaryExpression);
|
||||
equals.left = value;
|
||||
@@ -3842,7 +3850,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
let index: Expression;
|
||||
const nameIsComputed = propName.kind === SyntaxKind.ComputedPropertyName;
|
||||
if (nameIsComputed) {
|
||||
index = ensureIdentifier((<ComputedPropertyName>propName).expression, /*reuseIdentifierExpressions*/ false);
|
||||
// TODO to handle when we look into sourcemaps for computed properties, for now use propName
|
||||
index = ensureIdentifier((<ComputedPropertyName>propName).expression, /*reuseIdentifierExpressions*/ false, propName);
|
||||
}
|
||||
else {
|
||||
// We create a synthetic copy of the identifier in order to avoid the rewriting that might
|
||||
@@ -3866,61 +3875,66 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
return call;
|
||||
}
|
||||
|
||||
function emitObjectLiteralAssignment(target: ObjectLiteralExpression, value: Expression) {
|
||||
function emitObjectLiteralAssignment(target: ObjectLiteralExpression, value: Expression, sourceMapNode: Node) {
|
||||
const properties = target.properties;
|
||||
if (properties.length !== 1) {
|
||||
// For anything but a single element destructuring we need to generate a temporary
|
||||
// to ensure value is evaluated exactly once.
|
||||
value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true);
|
||||
// When doing so we want to hightlight the passed in source map node since thats the one needing this temp assignment
|
||||
value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true, sourceMapNode);
|
||||
}
|
||||
for (const p of properties) {
|
||||
if (p.kind === SyntaxKind.PropertyAssignment || p.kind === SyntaxKind.ShorthandPropertyAssignment) {
|
||||
const propName = <Identifier | LiteralExpression>(<PropertyAssignment>p).name;
|
||||
const target = p.kind === SyntaxKind.ShorthandPropertyAssignment ? <ShorthandPropertyAssignment>p : (<PropertyAssignment>p).initializer || propName;
|
||||
emitDestructuringAssignment(target, createPropertyAccessForDestructuringProperty(value, propName));
|
||||
// Assignment for target = value.propName should highligh whole property, hence use p as source map node
|
||||
emitDestructuringAssignment(target, createPropertyAccessForDestructuringProperty(value, propName), p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function emitArrayLiteralAssignment(target: ArrayLiteralExpression, value: Expression) {
|
||||
function emitArrayLiteralAssignment(target: ArrayLiteralExpression, value: Expression, sourceMapNode: Node) {
|
||||
const elements = target.elements;
|
||||
if (elements.length !== 1) {
|
||||
// For anything but a single element destructuring we need to generate a temporary
|
||||
// to ensure value is evaluated exactly once.
|
||||
value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true);
|
||||
// When doing so we want to hightlight the passed in source map node since thats the one needing this temp assignment
|
||||
value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true, sourceMapNode);
|
||||
}
|
||||
for (let i = 0; i < elements.length; i++) {
|
||||
const e = elements[i];
|
||||
if (e.kind !== SyntaxKind.OmittedExpression) {
|
||||
// Assignment for target = value.propName should highligh whole property, hence use e as source map node
|
||||
if (e.kind !== SyntaxKind.SpreadElementExpression) {
|
||||
emitDestructuringAssignment(e, createElementAccessExpression(value, createNumericLiteral(i)));
|
||||
emitDestructuringAssignment(e, createElementAccessExpression(value, createNumericLiteral(i)), e);
|
||||
}
|
||||
else if (i === elements.length - 1) {
|
||||
emitDestructuringAssignment((<SpreadElementExpression>e).expression, createSliceCall(value, i));
|
||||
emitDestructuringAssignment((<SpreadElementExpression>e).expression, createSliceCall(value, i), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function emitDestructuringAssignment(target: Expression | ShorthandPropertyAssignment, value: Expression) {
|
||||
function emitDestructuringAssignment(target: Expression | ShorthandPropertyAssignment, value: Expression, sourceMapNode: Node) {
|
||||
// When emitting target = value use source map node to highlight, including any temporary assignments needed for this
|
||||
if (target.kind === SyntaxKind.ShorthandPropertyAssignment) {
|
||||
if ((<ShorthandPropertyAssignment>target).objectAssignmentInitializer) {
|
||||
value = createDefaultValueCheck(value, (<ShorthandPropertyAssignment>target).objectAssignmentInitializer);
|
||||
value = createDefaultValueCheck(value, (<ShorthandPropertyAssignment>target).objectAssignmentInitializer, sourceMapNode);
|
||||
}
|
||||
target = (<ShorthandPropertyAssignment>target).name;
|
||||
}
|
||||
else if (target.kind === SyntaxKind.BinaryExpression && (<BinaryExpression>target).operatorToken.kind === SyntaxKind.EqualsToken) {
|
||||
value = createDefaultValueCheck(value, (<BinaryExpression>target).right);
|
||||
value = createDefaultValueCheck(value, (<BinaryExpression>target).right, sourceMapNode);
|
||||
target = (<BinaryExpression>target).left;
|
||||
}
|
||||
if (target.kind === SyntaxKind.ObjectLiteralExpression) {
|
||||
emitObjectLiteralAssignment(<ObjectLiteralExpression>target, value);
|
||||
emitObjectLiteralAssignment(<ObjectLiteralExpression>target, value, sourceMapNode);
|
||||
}
|
||||
else if (target.kind === SyntaxKind.ArrayLiteralExpression) {
|
||||
emitArrayLiteralAssignment(<ArrayLiteralExpression>target, value);
|
||||
emitArrayLiteralAssignment(<ArrayLiteralExpression>target, value, sourceMapNode);
|
||||
}
|
||||
else {
|
||||
emitAssignment(<Identifier>target, value, /*shouldEmitCommaBeforeAssignment*/ emitCount > 0);
|
||||
emitAssignment(<Identifier>target, value, /*shouldEmitCommaBeforeAssignment*/ emitCount > 0, sourceMapNode);
|
||||
emitCount++;
|
||||
}
|
||||
}
|
||||
@@ -3933,14 +3947,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
emit(value);
|
||||
}
|
||||
else if (isAssignmentExpressionStatement) {
|
||||
emitDestructuringAssignment(target, value);
|
||||
// Source map node for root.left = root.right is root
|
||||
// but if root is synthetic, which could be in below case, use the target which is { a }
|
||||
// for ({a} of {a: string}) {
|
||||
// }
|
||||
emitDestructuringAssignment(target, value, nodeIsSynthesized(root) ? target : root);
|
||||
}
|
||||
else {
|
||||
if (root.parent.kind !== SyntaxKind.ParenthesizedExpression) {
|
||||
write("(");
|
||||
}
|
||||
value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true);
|
||||
emitDestructuringAssignment(target, value);
|
||||
// Temporary assignment needed to emit root should highlight whole binary expression
|
||||
value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true, root);
|
||||
// Source map node for root.left = root.right is root
|
||||
emitDestructuringAssignment(target, value, root);
|
||||
write(", ");
|
||||
emit(value);
|
||||
if (root.parent.kind !== SyntaxKind.ParenthesizedExpression) {
|
||||
@@ -3950,9 +3970,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
}
|
||||
|
||||
function emitBindingElement(target: BindingElement | VariableDeclaration, value: Expression) {
|
||||
// Any temporary assignments needed to emit target = value should point to target
|
||||
if (target.initializer) {
|
||||
// Combine value and initializer
|
||||
value = value ? createDefaultValueCheck(value, target.initializer) : target.initializer;
|
||||
value = value ? createDefaultValueCheck(value, target.initializer, target) : target.initializer;
|
||||
}
|
||||
else if (!value) {
|
||||
// Use 'void 0' in absence of value and initializer
|
||||
@@ -3968,7 +3989,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
// to ensure value is evaluated exactly once. Additionally, if we have zero elements
|
||||
// we need to emit *something* to ensure that in case a 'var' keyword was already emitted,
|
||||
// so in that case, we'll intentionally create that temporary.
|
||||
value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ numElements !== 0);
|
||||
value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ numElements !== 0, target);
|
||||
}
|
||||
|
||||
for (let i = 0; i < numElements; i++) {
|
||||
@@ -3990,7 +4011,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
}
|
||||
}
|
||||
else {
|
||||
emitAssignment(<Identifier>target.name, value, /*shouldEmitCommaBeforeAssignment*/ emitCount > 0);
|
||||
emitAssignment(<Identifier>target.name, value, /*shouldEmitCommaBeforeAssignment*/ emitCount > 0, target);
|
||||
emitCount++;
|
||||
}
|
||||
}
|
||||
@@ -5464,7 +5485,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
});
|
||||
leadingComma = true;
|
||||
}
|
||||
++parameterIndex;
|
||||
parameterIndex++;
|
||||
}
|
||||
}
|
||||
return argumentsWritten;
|
||||
@@ -6488,7 +6509,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
|
||||
let started = false;
|
||||
if (exportedDeclarations) {
|
||||
for (let i = 0; i < exportedDeclarations.length; ++i) {
|
||||
for (let i = 0; i < exportedDeclarations.length; i++) {
|
||||
// write name of exported declaration, i.e 'export var x...'
|
||||
writeExportedName(exportedDeclarations[i]);
|
||||
}
|
||||
@@ -6604,7 +6625,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
writeLine();
|
||||
write("var ");
|
||||
const seen: Map<string> = {};
|
||||
for (let i = 0; i < hoistedVars.length; ++i) {
|
||||
for (let i = 0; i < hoistedVars.length; i++) {
|
||||
const local = hoistedVars[i];
|
||||
const name = local.kind === SyntaxKind.Identifier
|
||||
? <Identifier>local
|
||||
@@ -6816,7 +6837,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
function emitSetters(exportStarFunction: string, dependencyGroups: DependencyGroup[]) {
|
||||
write("setters:[");
|
||||
|
||||
for (let i = 0; i < dependencyGroups.length; ++i) {
|
||||
for (let i = 0; i < dependencyGroups.length; i++) {
|
||||
if (i !== 0) {
|
||||
write(",");
|
||||
}
|
||||
@@ -6864,7 +6885,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
write(`${exportFunctionForFile}({`);
|
||||
writeLine();
|
||||
increaseIndent();
|
||||
for (let i = 0, len = (<ExportDeclaration>entry).exportClause.elements.length; i < len; ++i) {
|
||||
for (let i = 0, len = (<ExportDeclaration>entry).exportClause.elements.length; i < len; i++) {
|
||||
if (i !== 0) {
|
||||
write(",");
|
||||
writeLine();
|
||||
@@ -6909,7 +6930,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
write("execute: function() {");
|
||||
increaseIndent();
|
||||
writeLine();
|
||||
for (let i = startIndex; i < node.statements.length; ++i) {
|
||||
for (let i = startIndex; i < node.statements.length; i++) {
|
||||
const statement = node.statements[i];
|
||||
switch (statement.kind) {
|
||||
// - function declarations are not emitted because they were already hoisted
|
||||
@@ -6971,7 +6992,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
const groupIndices: Map<number> = {};
|
||||
const dependencyGroups: DependencyGroup[] = [];
|
||||
|
||||
for (let i = 0; i < externalImports.length; ++i) {
|
||||
for (let i = 0; i < externalImports.length; i++) {
|
||||
const text = getExternalModuleNameText(externalImports[i], emitRelativePathAsModuleName);
|
||||
if (hasProperty(groupIndices, text)) {
|
||||
// deduplicate/group entries in dependency list by the dependency name
|
||||
@@ -7221,7 +7242,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
// Replace entities like
|
||||
result = result.replace(/&(\w+);/g, function(s: any, m: string) {
|
||||
if (entities[m] !== undefined) {
|
||||
return String.fromCharCode(entities[m]);
|
||||
const ch = String.fromCharCode(entities[m]);
|
||||
// " needs to be escaped
|
||||
return ch === "\"" ? "\\\"" : ch;
|
||||
}
|
||||
else {
|
||||
return s;
|
||||
@@ -7294,7 +7317,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
|
||||
function emitDirectivePrologues(statements: Node[], startWithNewLine: boolean, ensureUseStrict?: boolean): number {
|
||||
let foundUseStrict = false;
|
||||
for (let i = 0; i < statements.length; ++i) {
|
||||
for (let i = 0; i < statements.length; i++) {
|
||||
if (isPrologueDirective(statements[i])) {
|
||||
if (isUseStrictPrologue(statements[i] as ExpressionStatement)) {
|
||||
foundUseStrict = true;
|
||||
@@ -7316,7 +7339,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
|
||||
function writeLines(text: string): void {
|
||||
const lines = text.split(/\r\n|\r|\n/g);
|
||||
for (let i = 0; i < lines.length; ++i) {
|
||||
for (let i = 0; i < lines.length; i++) {
|
||||
const line = lines[i];
|
||||
if (line.length) {
|
||||
writeLine();
|
||||
@@ -7432,6 +7455,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
}
|
||||
}
|
||||
|
||||
function changeSourceMapEmit(writer: SourceMapWriter) {
|
||||
sourceMap = writer;
|
||||
emitStart = writer.emitStart;
|
||||
emitEnd = writer.emitEnd;
|
||||
emitPos = writer.emitPos;
|
||||
setSourceFile = writer.setSourceFile;
|
||||
}
|
||||
|
||||
function withTemporaryNoSourceMap(callback: () => void) {
|
||||
const prevSourceMap = sourceMap;
|
||||
setSourceMapWriterEmit(getNullSourceMapWriter());
|
||||
callback();
|
||||
setSourceMapWriterEmit(prevSourceMap);
|
||||
}
|
||||
|
||||
function isSpecializedCommentHandling(node: Node): boolean {
|
||||
switch (node.kind) {
|
||||
// All of these entities are emitted in a specialized fashion. As such, we allow
|
||||
|
||||
+23
-1
@@ -3497,6 +3497,20 @@ namespace ts {
|
||||
return finishNode(node);
|
||||
}
|
||||
|
||||
function tagNamesAreEquivalent(lhs: EntityName, rhs: EntityName): boolean {
|
||||
if (lhs.kind !== rhs.kind) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (lhs.kind === SyntaxKind.Identifier) {
|
||||
return (<Identifier>lhs).text === (<Identifier>rhs).text;
|
||||
}
|
||||
|
||||
return (<QualifiedName>lhs).right.text === (<QualifiedName>rhs).right.text &&
|
||||
tagNamesAreEquivalent((<QualifiedName>lhs).left, (<QualifiedName>rhs).left);
|
||||
}
|
||||
|
||||
|
||||
function parseJsxElementOrSelfClosingElement(inExpressionContext: boolean): JsxElement | JsxSelfClosingElement {
|
||||
const opening = parseJsxOpeningOrSelfClosingElement(inExpressionContext);
|
||||
let result: JsxElement | JsxSelfClosingElement;
|
||||
@@ -3506,6 +3520,11 @@ namespace ts {
|
||||
|
||||
node.children = parseJsxChildren(node.openingElement.tagName);
|
||||
node.closingElement = parseJsxClosingElement(inExpressionContext);
|
||||
|
||||
if (!tagNamesAreEquivalent(node.openingElement.tagName, node.closingElement.tagName)) {
|
||||
parseErrorAtPosition(node.closingElement.pos, node.closingElement.end - node.closingElement.pos, Diagnostics.Expected_corresponding_JSX_closing_tag_for_0, getTextOfNodeFromSourceText(sourceText, node.openingElement.tagName));
|
||||
}
|
||||
|
||||
result = finishNode(node);
|
||||
}
|
||||
else {
|
||||
@@ -3565,10 +3584,13 @@ namespace ts {
|
||||
while (true) {
|
||||
token = scanner.reScanJsxToken();
|
||||
if (token === SyntaxKind.LessThanSlashToken) {
|
||||
// Closing tag
|
||||
break;
|
||||
}
|
||||
else if (token === SyntaxKind.EndOfFileToken) {
|
||||
parseErrorAtCurrentToken(Diagnostics.Expected_corresponding_JSX_closing_tag_for_0, getTextOfNodeFromSourceText(sourceText, openingTagName));
|
||||
// If we hit EOF, issue the error at the tag that lacks the closing element
|
||||
// rather than at the end of the file (which is useless)
|
||||
parseErrorAtPosition(openingTagName.pos, openingTagName.end - openingTagName.pos, Diagnostics.JSX_element_0_has_no_corresponding_closing_tag, getTextOfNodeFromSourceText(sourceText, openingTagName));
|
||||
break;
|
||||
}
|
||||
result.push(parseJsxChild());
|
||||
|
||||
+31
-13
@@ -53,13 +53,13 @@ namespace ts {
|
||||
if (getRootLength(moduleName) !== 0 || nameStartsWithDotSlashOrDotDotSlash(moduleName)) {
|
||||
const failedLookupLocations: string[] = [];
|
||||
const candidate = normalizePath(combinePaths(containingDirectory, moduleName));
|
||||
let resolvedFileName = loadNodeModuleFromFile(supportedExtensions, candidate, failedLookupLocations, host);
|
||||
let resolvedFileName = loadNodeModuleFromFile(supportedExtensions, candidate, failedLookupLocations, /*onlyRecordFailures*/ false, host);
|
||||
|
||||
if (resolvedFileName) {
|
||||
return { resolvedModule: { resolvedFileName }, failedLookupLocations };
|
||||
}
|
||||
|
||||
resolvedFileName = loadNodeModuleFromDirectory(supportedExtensions, candidate, failedLookupLocations, host);
|
||||
resolvedFileName = loadNodeModuleFromDirectory(supportedExtensions, candidate, failedLookupLocations, /*onlyRecordFailures*/ false, host);
|
||||
return resolvedFileName
|
||||
? { resolvedModule: { resolvedFileName }, failedLookupLocations }
|
||||
: { resolvedModule: undefined, failedLookupLocations };
|
||||
@@ -69,12 +69,22 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
function loadNodeModuleFromFile(extensions: string[], candidate: string, failedLookupLocation: string[], host: ModuleResolutionHost): string {
|
||||
/* @internal */
|
||||
export function directoryProbablyExists(directoryName: string, host: { directoryExists?: (directoryName: string) => boolean } ): boolean {
|
||||
// if host does not support 'directoryExists' assume that directory will exist
|
||||
return !host.directoryExists || host.directoryExists(directoryName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {boolean} onlyRecordFailures - if true then function won't try to actually load files but instead record all attempts as failures. This flag is necessary
|
||||
* in cases when we know upfront that all load attempts will fail (because containing folder does not exists) however we still need to record all failed lookup locations.
|
||||
*/
|
||||
function loadNodeModuleFromFile(extensions: string[], candidate: string, failedLookupLocation: string[], onlyRecordFailures: boolean, host: ModuleResolutionHost): string {
|
||||
return forEach(extensions, tryLoad);
|
||||
|
||||
function tryLoad(ext: string): string {
|
||||
const fileName = fileExtensionIs(candidate, ext) ? candidate : candidate + ext;
|
||||
if (host.fileExists(fileName)) {
|
||||
if (!onlyRecordFailures && host.fileExists(fileName)) {
|
||||
return fileName;
|
||||
}
|
||||
else {
|
||||
@@ -84,9 +94,10 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
function loadNodeModuleFromDirectory(extensions: string[], candidate: string, failedLookupLocation: string[], host: ModuleResolutionHost): string {
|
||||
function loadNodeModuleFromDirectory(extensions: string[], candidate: string, failedLookupLocation: string[], onlyRecordFailures: boolean, host: ModuleResolutionHost): string {
|
||||
const packageJsonPath = combinePaths(candidate, "package.json");
|
||||
if (host.fileExists(packageJsonPath)) {
|
||||
const directoryExists = !onlyRecordFailures && directoryProbablyExists(candidate, host);
|
||||
if (directoryExists && host.fileExists(packageJsonPath)) {
|
||||
|
||||
let jsonContent: { typings?: string };
|
||||
|
||||
@@ -100,7 +111,8 @@ namespace ts {
|
||||
}
|
||||
|
||||
if (typeof jsonContent.typings === "string") {
|
||||
const result = loadNodeModuleFromFile(extensions, normalizePath(combinePaths(candidate, jsonContent.typings)), failedLookupLocation, host);
|
||||
const path = normalizePath(combinePaths(candidate, jsonContent.typings));
|
||||
const result = loadNodeModuleFromFile(extensions, path, failedLookupLocation, !directoryProbablyExists(getDirectoryPath(path), host), host);
|
||||
if (result) {
|
||||
return result;
|
||||
}
|
||||
@@ -111,7 +123,7 @@ namespace ts {
|
||||
failedLookupLocation.push(packageJsonPath);
|
||||
}
|
||||
|
||||
return loadNodeModuleFromFile(extensions, combinePaths(candidate, "index"), failedLookupLocation, host);
|
||||
return loadNodeModuleFromFile(extensions, combinePaths(candidate, "index"), failedLookupLocation, !directoryExists, host);
|
||||
}
|
||||
|
||||
function loadModuleFromNodeModules(moduleName: string, directory: string, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations {
|
||||
@@ -121,14 +133,15 @@ namespace ts {
|
||||
const baseName = getBaseFileName(directory);
|
||||
if (baseName !== "node_modules") {
|
||||
const nodeModulesFolder = combinePaths(directory, "node_modules");
|
||||
const nodeModulesFolderExists = directoryProbablyExists(nodeModulesFolder, host);
|
||||
const candidate = normalizePath(combinePaths(nodeModulesFolder, moduleName));
|
||||
// Load only typescript files irrespective of allowJs option if loading from node modules
|
||||
let result = loadNodeModuleFromFile(supportedTypeScriptExtensions, candidate, failedLookupLocations, host);
|
||||
let result = loadNodeModuleFromFile(supportedTypeScriptExtensions, candidate, failedLookupLocations, !nodeModulesFolderExists, host);
|
||||
if (result) {
|
||||
return { resolvedModule: { resolvedFileName: result, isExternalLibraryImport: true }, failedLookupLocations };
|
||||
}
|
||||
|
||||
result = loadNodeModuleFromDirectory(supportedTypeScriptExtensions, candidate, failedLookupLocations, host);
|
||||
result = loadNodeModuleFromDirectory(supportedTypeScriptExtensions, candidate, failedLookupLocations, !nodeModulesFolderExists, host);
|
||||
if (result) {
|
||||
return { resolvedModule: { resolvedFileName: result, isExternalLibraryImport: true }, failedLookupLocations };
|
||||
}
|
||||
@@ -281,7 +294,8 @@ namespace ts {
|
||||
getCanonicalFileName,
|
||||
getNewLine: () => newLine,
|
||||
fileExists: fileName => sys.fileExists(fileName),
|
||||
readFile: fileName => sys.readFile(fileName)
|
||||
readFile: fileName => sys.readFile(fileName),
|
||||
directoryExists: directoryName => sys.directoryExists(directoryName)
|
||||
};
|
||||
}
|
||||
|
||||
@@ -522,7 +536,7 @@ namespace ts {
|
||||
}
|
||||
const resolutions = resolveModuleNamesWorker(moduleNames, getNormalizedAbsolutePath(newSourceFile.fileName, currentDirectory));
|
||||
// ensure that module resolution results are still correct
|
||||
for (let i = 0; i < moduleNames.length; ++i) {
|
||||
for (let i = 0; i < moduleNames.length; i++) {
|
||||
const newResolution = resolutions[i];
|
||||
const oldResolution = getResolvedModule(oldSourceFile, moduleNames[i]);
|
||||
const resolutionChanged = oldResolution
|
||||
@@ -550,7 +564,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
// update fileName -> file mapping
|
||||
for (let i = 0, len = newSourceFiles.length; i < len; ++i) {
|
||||
for (let i = 0, len = newSourceFiles.length; i < len; i++) {
|
||||
filesByName.set(filePaths[i], newSourceFiles[i]);
|
||||
}
|
||||
|
||||
@@ -1348,6 +1362,10 @@ namespace ts {
|
||||
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "emitDecoratorMetadata", "experimentalDecorators"));
|
||||
}
|
||||
|
||||
if (options.reactNamespace && !isIdentifier(options.reactNamespace, languageVersion)) {
|
||||
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Invalide_value_for_reactNamespace_0_is_not_a_valid_identifier, options.reactNamespace));
|
||||
}
|
||||
|
||||
// If the emit is enabled make sure that every output file is unique and not overwriting any of the input files
|
||||
if (!options.noEmit) {
|
||||
const emitHost = getEmitHost();
|
||||
|
||||
+79
-32
@@ -289,7 +289,8 @@ namespace ts {
|
||||
let pos = 0;
|
||||
let lineStart = 0;
|
||||
while (pos < text.length) {
|
||||
const ch = text.charCodeAt(pos++);
|
||||
const ch = text.charCodeAt(pos);
|
||||
pos++;
|
||||
switch (ch) {
|
||||
case CharacterCodes.carriageReturn:
|
||||
if (text.charCodeAt(pos) === CharacterCodes.lineFeed) {
|
||||
@@ -688,6 +689,21 @@ namespace ts {
|
||||
ch > CharacterCodes.maxAsciiCharacter && isUnicodeIdentifierPart(ch, languageVersion);
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export function isIdentifier(name: string, languageVersion: ScriptTarget): boolean {
|
||||
if (!isIdentifierStart(name.charCodeAt(0), languageVersion)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (let i = 1, n = name.length; i < n; i++) {
|
||||
if (!isIdentifierPart(name.charCodeAt(i), languageVersion)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Creates a scanner over a (possibly unspecified) range of a piece of text.
|
||||
export function createScanner(languageVersion: ScriptTarget,
|
||||
skipTrivia: boolean,
|
||||
@@ -824,7 +840,8 @@ namespace ts {
|
||||
}
|
||||
|
||||
function scanString(): string {
|
||||
const quote = text.charCodeAt(pos++);
|
||||
const quote = text.charCodeAt(pos);
|
||||
pos++;
|
||||
let result = "";
|
||||
let start = pos;
|
||||
while (true) {
|
||||
@@ -934,7 +951,8 @@ namespace ts {
|
||||
error(Diagnostics.Unexpected_end_of_text);
|
||||
return "";
|
||||
}
|
||||
const ch = text.charCodeAt(pos++);
|
||||
const ch = text.charCodeAt(pos);
|
||||
pos++;
|
||||
switch (ch) {
|
||||
case CharacterCodes._0:
|
||||
return "\0";
|
||||
@@ -1183,7 +1201,8 @@ namespace ts {
|
||||
}
|
||||
return pos += 2, token = SyntaxKind.ExclamationEqualsToken;
|
||||
}
|
||||
return pos++, token = SyntaxKind.ExclamationToken;
|
||||
pos++;
|
||||
return token = SyntaxKind.ExclamationToken;
|
||||
case CharacterCodes.doubleQuote:
|
||||
case CharacterCodes.singleQuote:
|
||||
tokenValue = scanString();
|
||||
@@ -1194,7 +1213,8 @@ namespace ts {
|
||||
if (text.charCodeAt(pos + 1) === CharacterCodes.equals) {
|
||||
return pos += 2, token = SyntaxKind.PercentEqualsToken;
|
||||
}
|
||||
return pos++, token = SyntaxKind.PercentToken;
|
||||
pos++;
|
||||
return token = SyntaxKind.PercentToken;
|
||||
case CharacterCodes.ampersand:
|
||||
if (text.charCodeAt(pos + 1) === CharacterCodes.ampersand) {
|
||||
return pos += 2, token = SyntaxKind.AmpersandAmpersandToken;
|
||||
@@ -1202,11 +1222,14 @@ namespace ts {
|
||||
if (text.charCodeAt(pos + 1) === CharacterCodes.equals) {
|
||||
return pos += 2, token = SyntaxKind.AmpersandEqualsToken;
|
||||
}
|
||||
return pos++, token = SyntaxKind.AmpersandToken;
|
||||
pos++;
|
||||
return token = SyntaxKind.AmpersandToken;
|
||||
case CharacterCodes.openParen:
|
||||
return pos++, token = SyntaxKind.OpenParenToken;
|
||||
pos++;
|
||||
return token = SyntaxKind.OpenParenToken;
|
||||
case CharacterCodes.closeParen:
|
||||
return pos++, token = SyntaxKind.CloseParenToken;
|
||||
pos++;
|
||||
return token = SyntaxKind.CloseParenToken;
|
||||
case CharacterCodes.asterisk:
|
||||
if (text.charCodeAt(pos + 1) === CharacterCodes.equals) {
|
||||
return pos += 2, token = SyntaxKind.AsteriskEqualsToken;
|
||||
@@ -1217,7 +1240,8 @@ namespace ts {
|
||||
}
|
||||
return pos += 2, token = SyntaxKind.AsteriskAsteriskToken;
|
||||
}
|
||||
return pos++, token = SyntaxKind.AsteriskToken;
|
||||
pos++;
|
||||
return token = SyntaxKind.AsteriskToken;
|
||||
case CharacterCodes.plus:
|
||||
if (text.charCodeAt(pos + 1) === CharacterCodes.plus) {
|
||||
return pos += 2, token = SyntaxKind.PlusPlusToken;
|
||||
@@ -1225,9 +1249,11 @@ namespace ts {
|
||||
if (text.charCodeAt(pos + 1) === CharacterCodes.equals) {
|
||||
return pos += 2, token = SyntaxKind.PlusEqualsToken;
|
||||
}
|
||||
return pos++, token = SyntaxKind.PlusToken;
|
||||
pos++;
|
||||
return token = SyntaxKind.PlusToken;
|
||||
case CharacterCodes.comma:
|
||||
return pos++, token = SyntaxKind.CommaToken;
|
||||
pos++;
|
||||
return token = SyntaxKind.CommaToken;
|
||||
case CharacterCodes.minus:
|
||||
if (text.charCodeAt(pos + 1) === CharacterCodes.minus) {
|
||||
return pos += 2, token = SyntaxKind.MinusMinusToken;
|
||||
@@ -1235,7 +1261,8 @@ namespace ts {
|
||||
if (text.charCodeAt(pos + 1) === CharacterCodes.equals) {
|
||||
return pos += 2, token = SyntaxKind.MinusEqualsToken;
|
||||
}
|
||||
return pos++, token = SyntaxKind.MinusToken;
|
||||
pos++;
|
||||
return token = SyntaxKind.MinusToken;
|
||||
case CharacterCodes.dot:
|
||||
if (isDigit(text.charCodeAt(pos + 1))) {
|
||||
tokenValue = scanNumber();
|
||||
@@ -1244,7 +1271,8 @@ namespace ts {
|
||||
if (text.charCodeAt(pos + 1) === CharacterCodes.dot && text.charCodeAt(pos + 2) === CharacterCodes.dot) {
|
||||
return pos += 3, token = SyntaxKind.DotDotDotToken;
|
||||
}
|
||||
return pos++, token = SyntaxKind.DotToken;
|
||||
pos++;
|
||||
return token = SyntaxKind.DotToken;
|
||||
case CharacterCodes.slash:
|
||||
// Single-line comment
|
||||
if (text.charCodeAt(pos + 1) === CharacterCodes.slash) {
|
||||
@@ -1302,7 +1330,8 @@ namespace ts {
|
||||
return pos += 2, token = SyntaxKind.SlashEqualsToken;
|
||||
}
|
||||
|
||||
return pos++, token = SyntaxKind.SlashToken;
|
||||
pos++;
|
||||
return token = SyntaxKind.SlashToken;
|
||||
|
||||
case CharacterCodes._0:
|
||||
if (pos + 2 < end && (text.charCodeAt(pos + 1) === CharacterCodes.X || text.charCodeAt(pos + 1) === CharacterCodes.x)) {
|
||||
@@ -1355,9 +1384,11 @@ namespace ts {
|
||||
tokenValue = scanNumber();
|
||||
return token = SyntaxKind.NumericLiteral;
|
||||
case CharacterCodes.colon:
|
||||
return pos++, token = SyntaxKind.ColonToken;
|
||||
pos++;
|
||||
return token = SyntaxKind.ColonToken;
|
||||
case CharacterCodes.semicolon:
|
||||
return pos++, token = SyntaxKind.SemicolonToken;
|
||||
pos++;
|
||||
return token = SyntaxKind.SemicolonToken;
|
||||
case CharacterCodes.lessThan:
|
||||
if (isConflictMarkerTrivia(text, pos)) {
|
||||
pos = scanConflictMarkerTrivia(text, pos, error);
|
||||
@@ -1383,7 +1414,8 @@ namespace ts {
|
||||
text.charCodeAt(pos + 2) !== CharacterCodes.asterisk) {
|
||||
return pos += 2, token = SyntaxKind.LessThanSlashToken;
|
||||
}
|
||||
return pos++, token = SyntaxKind.LessThanToken;
|
||||
pos++;
|
||||
return token = SyntaxKind.LessThanToken;
|
||||
case CharacterCodes.equals:
|
||||
if (isConflictMarkerTrivia(text, pos)) {
|
||||
pos = scanConflictMarkerTrivia(text, pos, error);
|
||||
@@ -1404,7 +1436,8 @@ namespace ts {
|
||||
if (text.charCodeAt(pos + 1) === CharacterCodes.greaterThan) {
|
||||
return pos += 2, token = SyntaxKind.EqualsGreaterThanToken;
|
||||
}
|
||||
return pos++, token = SyntaxKind.EqualsToken;
|
||||
pos++;
|
||||
return token = SyntaxKind.EqualsToken;
|
||||
case CharacterCodes.greaterThan:
|
||||
if (isConflictMarkerTrivia(text, pos)) {
|
||||
pos = scanConflictMarkerTrivia(text, pos, error);
|
||||
@@ -1416,20 +1449,26 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
return pos++, token = SyntaxKind.GreaterThanToken;
|
||||
pos++;
|
||||
return token = SyntaxKind.GreaterThanToken;
|
||||
case CharacterCodes.question:
|
||||
return pos++, token = SyntaxKind.QuestionToken;
|
||||
pos++;
|
||||
return token = SyntaxKind.QuestionToken;
|
||||
case CharacterCodes.openBracket:
|
||||
return pos++, token = SyntaxKind.OpenBracketToken;
|
||||
pos++;
|
||||
return token = SyntaxKind.OpenBracketToken;
|
||||
case CharacterCodes.closeBracket:
|
||||
return pos++, token = SyntaxKind.CloseBracketToken;
|
||||
pos++;
|
||||
return token = SyntaxKind.CloseBracketToken;
|
||||
case CharacterCodes.caret:
|
||||
if (text.charCodeAt(pos + 1) === CharacterCodes.equals) {
|
||||
return pos += 2, token = SyntaxKind.CaretEqualsToken;
|
||||
}
|
||||
return pos++, token = SyntaxKind.CaretToken;
|
||||
pos++;
|
||||
return token = SyntaxKind.CaretToken;
|
||||
case CharacterCodes.openBrace:
|
||||
return pos++, token = SyntaxKind.OpenBraceToken;
|
||||
pos++;
|
||||
return token = SyntaxKind.OpenBraceToken;
|
||||
case CharacterCodes.bar:
|
||||
if (text.charCodeAt(pos + 1) === CharacterCodes.bar) {
|
||||
return pos += 2, token = SyntaxKind.BarBarToken;
|
||||
@@ -1437,13 +1476,17 @@ namespace ts {
|
||||
if (text.charCodeAt(pos + 1) === CharacterCodes.equals) {
|
||||
return pos += 2, token = SyntaxKind.BarEqualsToken;
|
||||
}
|
||||
return pos++, token = SyntaxKind.BarToken;
|
||||
pos++;
|
||||
return token = SyntaxKind.BarToken;
|
||||
case CharacterCodes.closeBrace:
|
||||
return pos++, token = SyntaxKind.CloseBraceToken;
|
||||
pos++;
|
||||
return token = SyntaxKind.CloseBraceToken;
|
||||
case CharacterCodes.tilde:
|
||||
return pos++, token = SyntaxKind.TildeToken;
|
||||
pos++;
|
||||
return token = SyntaxKind.TildeToken;
|
||||
case CharacterCodes.at:
|
||||
return pos++, token = SyntaxKind.AtToken;
|
||||
pos++;
|
||||
return token = SyntaxKind.AtToken;
|
||||
case CharacterCodes.backslash:
|
||||
let cookedChar = peekUnicodeEscape();
|
||||
if (cookedChar >= 0 && isIdentifierStart(cookedChar, languageVersion)) {
|
||||
@@ -1452,7 +1495,8 @@ namespace ts {
|
||||
return token = getIdentifierToken();
|
||||
}
|
||||
error(Diagnostics.Invalid_character);
|
||||
return pos++, token = SyntaxKind.Unknown;
|
||||
pos++;
|
||||
return token = SyntaxKind.Unknown;
|
||||
default:
|
||||
if (isIdentifierStart(ch, languageVersion)) {
|
||||
pos++;
|
||||
@@ -1473,7 +1517,8 @@ namespace ts {
|
||||
continue;
|
||||
}
|
||||
error(Diagnostics.Invalid_character);
|
||||
return pos++, token = SyntaxKind.Unknown;
|
||||
pos++;
|
||||
return token = SyntaxKind.Unknown;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1490,10 +1535,12 @@ namespace ts {
|
||||
if (text.charCodeAt(pos + 1) === CharacterCodes.equals) {
|
||||
return pos += 2, token = SyntaxKind.GreaterThanGreaterThanEqualsToken;
|
||||
}
|
||||
return pos++, token = SyntaxKind.GreaterThanGreaterThanToken;
|
||||
pos++;
|
||||
return token = SyntaxKind.GreaterThanGreaterThanToken;
|
||||
}
|
||||
if (text.charCodeAt(pos) === CharacterCodes.equals) {
|
||||
return pos++, token = SyntaxKind.GreaterThanEqualsToken;
|
||||
pos++;
|
||||
return token = SyntaxKind.GreaterThanEqualsToken;
|
||||
}
|
||||
}
|
||||
return token;
|
||||
|
||||
@@ -7,7 +7,8 @@ namespace ts {
|
||||
setSourceFile(sourceFile: SourceFile): void;
|
||||
emitPos(pos: number): void;
|
||||
emitStart(range: TextRange): void;
|
||||
emitEnd(range: TextRange): void;
|
||||
emitEnd(range: TextRange, stopOverridingSpan?: boolean): void;
|
||||
changeEmitSourcePos(): void;
|
||||
getText(): string;
|
||||
getSourceMappingURL(): string;
|
||||
initialize(filePath: string, sourceMapFilePath: string, sourceFiles: SourceFile[], isBundledEmit: boolean): void;
|
||||
@@ -22,8 +23,9 @@ namespace ts {
|
||||
getSourceMapData(): SourceMapData { return undefined; },
|
||||
setSourceFile(sourceFile: SourceFile): void { },
|
||||
emitStart(range: TextRange): void { },
|
||||
emitEnd(range: TextRange): void { },
|
||||
emitEnd(range: TextRange, stopOverridingSpan?: boolean): void { },
|
||||
emitPos(pos: number): void { },
|
||||
changeEmitSourcePos(): void { },
|
||||
getText(): string { return undefined; },
|
||||
getSourceMappingURL(): string { return undefined; },
|
||||
initialize(filePath: string, sourceMapFilePath: string, sourceFiles: SourceFile[], isBundledEmit: boolean): void { },
|
||||
@@ -38,6 +40,8 @@ namespace ts {
|
||||
const compilerOptions = host.getCompilerOptions();
|
||||
let currentSourceFile: SourceFile;
|
||||
let sourceMapDir: string; // The directory in which sourcemap will be
|
||||
let stopOverridingSpan = false;
|
||||
let modifyLastSourcePos = false;
|
||||
|
||||
// Current source map file and its index in the sources list
|
||||
let sourceMapSourceIndex: number;
|
||||
@@ -56,6 +60,7 @@ namespace ts {
|
||||
emitPos,
|
||||
emitStart,
|
||||
emitEnd,
|
||||
changeEmitSourcePos,
|
||||
getText,
|
||||
getSourceMappingURL,
|
||||
initialize,
|
||||
@@ -142,6 +147,45 @@ namespace ts {
|
||||
sourceMapData = undefined;
|
||||
}
|
||||
|
||||
function updateLastEncodedAndRecordedSpans() {
|
||||
if (modifyLastSourcePos) {
|
||||
// Reset the source pos
|
||||
modifyLastSourcePos = false;
|
||||
|
||||
// Change Last recorded Map with last encoded emit line and character
|
||||
lastRecordedSourceMapSpan.emittedLine = lastEncodedSourceMapSpan.emittedLine;
|
||||
lastRecordedSourceMapSpan.emittedColumn = lastEncodedSourceMapSpan.emittedColumn;
|
||||
|
||||
// Pop sourceMapDecodedMappings to remove last entry
|
||||
sourceMapData.sourceMapDecodedMappings.pop();
|
||||
|
||||
// Change the last encoded source map
|
||||
lastEncodedSourceMapSpan = sourceMapData.sourceMapDecodedMappings.length ?
|
||||
sourceMapData.sourceMapDecodedMappings[sourceMapData.sourceMapDecodedMappings.length - 1] :
|
||||
undefined;
|
||||
|
||||
// TODO: Update lastEncodedNameIndex
|
||||
// Since we dont support this any more, lets not worry about it right now.
|
||||
// When we start supporting nameIndex, we will get back to this
|
||||
|
||||
// Change the encoded source map
|
||||
const sourceMapMappings = sourceMapData.sourceMapMappings;
|
||||
let lenthToSet = sourceMapMappings.length - 1;
|
||||
for (; lenthToSet >= 0; lenthToSet--) {
|
||||
const currentChar = sourceMapMappings.charAt(lenthToSet);
|
||||
if (currentChar === ",") {
|
||||
// Separator for the entry found
|
||||
break;
|
||||
}
|
||||
if (currentChar === ";" && lenthToSet !== 0 && sourceMapMappings.charAt(lenthToSet - 1) !== ";") {
|
||||
// Last line separator found
|
||||
break;
|
||||
}
|
||||
}
|
||||
sourceMapData.sourceMapMappings = sourceMapMappings.substr(0, Math.max(0, lenthToSet));
|
||||
}
|
||||
}
|
||||
|
||||
// Encoding for sourcemap span
|
||||
function encodeLastRecordedSourceMapSpan() {
|
||||
if (!lastRecordedSourceMapSpan || lastRecordedSourceMapSpan === lastEncodedSourceMapSpan) {
|
||||
@@ -178,6 +222,7 @@ namespace ts {
|
||||
|
||||
// 5. Relative namePosition 0 based
|
||||
if (lastRecordedSourceMapSpan.nameIndex >= 0) {
|
||||
Debug.assert(false, "We do not support name index right now, Make sure to update updateLastEncodedAndRecordedSpans when we start using this");
|
||||
sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.nameIndex - lastEncodedNameIndex);
|
||||
lastEncodedNameIndex = lastRecordedSourceMapSpan.nameIndex;
|
||||
}
|
||||
@@ -219,22 +264,36 @@ namespace ts {
|
||||
sourceColumn: sourceLinePos.character,
|
||||
sourceIndex: sourceMapSourceIndex
|
||||
};
|
||||
|
||||
stopOverridingSpan = false;
|
||||
}
|
||||
else {
|
||||
else if (!stopOverridingSpan) {
|
||||
// Take the new pos instead since there is no change in emittedLine and column since last location
|
||||
lastRecordedSourceMapSpan.sourceLine = sourceLinePos.line;
|
||||
lastRecordedSourceMapSpan.sourceColumn = sourceLinePos.character;
|
||||
lastRecordedSourceMapSpan.sourceIndex = sourceMapSourceIndex;
|
||||
}
|
||||
|
||||
updateLastEncodedAndRecordedSpans();
|
||||
}
|
||||
|
||||
function getStartPos(range: TextRange) {
|
||||
const rangeHasDecorators = !!(range as Node).decorators;
|
||||
return range.pos !== -1 ? skipTrivia(currentSourceFile.text, rangeHasDecorators ? (range as Node).decorators.end : range.pos) : -1;
|
||||
}
|
||||
|
||||
function emitStart(range: TextRange) {
|
||||
const rangeHasDecorators = !!(range as Node).decorators;
|
||||
emitPos(range.pos !== -1 ? skipTrivia(currentSourceFile.text, rangeHasDecorators ? (range as Node).decorators.end : range.pos) : -1);
|
||||
emitPos(getStartPos(range));
|
||||
}
|
||||
|
||||
function emitEnd(range: TextRange) {
|
||||
function emitEnd(range: TextRange, stopOverridingEnd?: boolean) {
|
||||
emitPos(range.end);
|
||||
stopOverridingSpan = stopOverridingEnd;
|
||||
}
|
||||
|
||||
function changeEmitSourcePos() {
|
||||
Debug.assert(!modifyLastSourcePos);
|
||||
modifyLastSourcePos = true;
|
||||
}
|
||||
|
||||
function setSourceFile(sourceFile: SourceFile) {
|
||||
|
||||
@@ -1741,6 +1741,7 @@ namespace ts {
|
||||
isImplementationOfOverload(node: FunctionLikeDeclaration): boolean;
|
||||
isUndefinedSymbol(symbol: Symbol): boolean;
|
||||
isArgumentsSymbol(symbol: Symbol): boolean;
|
||||
isUnknownSymbol(symbol: Symbol): boolean;
|
||||
|
||||
getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
|
||||
isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean;
|
||||
@@ -2385,6 +2386,7 @@ namespace ts {
|
||||
inlineSourceMap?: boolean;
|
||||
inlineSources?: boolean;
|
||||
jsx?: JsxEmit;
|
||||
reactNamespace?: string;
|
||||
listFiles?: boolean;
|
||||
locale?: string;
|
||||
mapRoot?: string;
|
||||
@@ -2652,6 +2654,8 @@ namespace ts {
|
||||
// readFile function is used to read arbitrary text files on disk, i.e. when resolution procedure needs the content of 'package.json'
|
||||
// to determine location of bundled typings for node module
|
||||
readFile(fileName: string): string;
|
||||
|
||||
directoryExists?(directoryName: string): boolean;
|
||||
}
|
||||
|
||||
export interface ResolvedModule {
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace ts {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (let i = 0; i < array1.length; ++i) {
|
||||
for (let i = 0; i < array1.length; i++) {
|
||||
const equals = equaler ? equaler(array1[i], array2[i]) : array1[i] === array2[i];
|
||||
if (!equals) {
|
||||
return false;
|
||||
@@ -1913,8 +1913,8 @@ namespace ts {
|
||||
writeTextOfNode,
|
||||
writeLiteral,
|
||||
writeLine,
|
||||
increaseIndent: () => indent++,
|
||||
decreaseIndent: () => indent--,
|
||||
increaseIndent: () => { indent++; },
|
||||
decreaseIndent: () => { indent--; },
|
||||
getIndent: () => indent,
|
||||
getTextPos: () => output.length,
|
||||
getLine: () => lineCount + 1,
|
||||
|
||||
@@ -317,6 +317,7 @@ namespace FourSlash {
|
||||
InsertSpaceAfterFunctionKeywordForAnonymousFunctions: false,
|
||||
InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: false,
|
||||
InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: false,
|
||||
InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: false,
|
||||
PlaceOpenBraceOnNewLineForFunctions: false,
|
||||
PlaceOpenBraceOnNewLineForControlBlocks: false,
|
||||
};
|
||||
@@ -727,7 +728,7 @@ namespace FourSlash {
|
||||
// Count only the references in local files. Filter the ones in lib and other files.
|
||||
ts.forEach(references, entry => {
|
||||
if (localFiles.some((fileName) => fileName === entry.fileName)) {
|
||||
++referencesCount;
|
||||
referencesCount++;
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1079,9 +1080,15 @@ namespace FourSlash {
|
||||
}
|
||||
|
||||
public baselineCurrentFileBreakpointLocations() {
|
||||
let baselineFile = this.testData.globalOptions[metadataOptionNames.baselineFile];
|
||||
if (!baselineFile) {
|
||||
baselineFile = this.activeFile.fileName.replace(this.basePath + "/breakpointValidation", "bpSpan");
|
||||
baselineFile = baselineFile.replace(".ts", ".baseline");
|
||||
|
||||
}
|
||||
Harness.Baseline.runBaseline(
|
||||
"Breakpoint Locations for " + this.activeFile.fileName,
|
||||
this.testData.globalOptions[metadataOptionNames.baselineFile],
|
||||
baselineFile,
|
||||
() => {
|
||||
return this.baselineCurrentFileLocations(pos => this.getBreakpointStatementLocation(pos));
|
||||
},
|
||||
@@ -1093,7 +1100,7 @@ namespace FourSlash {
|
||||
const emitFiles: FourSlashFile[] = []; // List of FourSlashFile that has emitThisFile flag on
|
||||
|
||||
const allFourSlashFiles = this.testData.files;
|
||||
for (let idx = 0; idx < allFourSlashFiles.length; ++idx) {
|
||||
for (let idx = 0; idx < allFourSlashFiles.length; idx++) {
|
||||
const file = allFourSlashFiles[idx];
|
||||
if (file.fileOptions[metadataOptionNames.emitThisFile] === "true") {
|
||||
// Find a file with the flag emitThisFile turned on
|
||||
@@ -1853,7 +1860,7 @@ namespace FourSlash {
|
||||
let item: ts.NavigateToItem = null;
|
||||
|
||||
// Count only the match that match the same MatchKind
|
||||
for (let i = 0; i < items.length; ++i) {
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
item = items[i];
|
||||
if (!matchKind || item.matchKind === matchKind) {
|
||||
actual++;
|
||||
@@ -3284,6 +3291,30 @@ namespace FourSlashInterface {
|
||||
return getClassification("typeAliasName", text, position);
|
||||
}
|
||||
|
||||
export function jsxOpenTagName(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } {
|
||||
return getClassification("jsxOpenTagName", text, position);
|
||||
}
|
||||
|
||||
export function jsxCloseTagName(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } {
|
||||
return getClassification("jsxCloseTagName", text, position);
|
||||
}
|
||||
|
||||
export function jsxSelfClosingTagName(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } {
|
||||
return getClassification("jsxSelfClosingTagName", text, position);
|
||||
}
|
||||
|
||||
export function jsxAttribute(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } {
|
||||
return getClassification("jsxAttribute", text, position);
|
||||
}
|
||||
|
||||
export function jsxText(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } {
|
||||
return getClassification("jsxText", text, position);
|
||||
}
|
||||
|
||||
export function jsxAttributeStringLiteralValue(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } {
|
||||
return getClassification("jsxAttributeStringLiteralValue", text, position);
|
||||
}
|
||||
|
||||
function getClassification(type: string, text: string, position?: number) {
|
||||
return {
|
||||
classificationType: type,
|
||||
|
||||
@@ -267,6 +267,10 @@ namespace Harness.LanguageService {
|
||||
log(s: string): void { this.nativeHost.log(s); }
|
||||
trace(s: string): void { this.nativeHost.trace(s); }
|
||||
error(s: string): void { this.nativeHost.error(s); }
|
||||
directoryExists(directoryName: string): boolean {
|
||||
// for tests pessimistically assume that directory always exists
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
class ClassifierShimProxy implements ts.Classifier {
|
||||
|
||||
@@ -307,9 +307,10 @@ class ProjectRunner extends RunnerBase {
|
||||
// If the generated output file resides in the parent folder or is rooted path,
|
||||
// we need to instead create files that can live in the project reference folder
|
||||
// but make sure extension of these files matches with the fileName the compiler asked to write
|
||||
diskRelativeName = "diskFile" + nonSubfolderDiskFiles++ +
|
||||
diskRelativeName = "diskFile" + nonSubfolderDiskFiles +
|
||||
(Harness.Compiler.isDTS(fileName) ? ".d.ts" :
|
||||
Harness.Compiler.isJS(fileName) ? ".js" : ".js.map");
|
||||
nonSubfolderDiskFiles++;
|
||||
}
|
||||
|
||||
if (Harness.Compiler.isJS(fileName)) {
|
||||
|
||||
Vendored
+5
-2
@@ -321,6 +321,7 @@ interface AudioContext extends EventTarget {
|
||||
destination: AudioDestinationNode;
|
||||
listener: AudioListener;
|
||||
sampleRate: number;
|
||||
state: string;
|
||||
createAnalyser(): AnalyserNode;
|
||||
createBiquadFilter(): BiquadFilterNode;
|
||||
createBuffer(numberOfChannels: number, length: number, sampleRate: number): AudioBuffer;
|
||||
@@ -2774,6 +2775,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
|
||||
tagName: string;
|
||||
id: string;
|
||||
className: string;
|
||||
innerHTML: string;
|
||||
getAttribute(name?: string): string;
|
||||
getAttributeNS(namespaceURI: string, localName: string): string;
|
||||
getAttributeNode(name: string): Attr;
|
||||
@@ -2969,7 +2971,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
|
||||
removeAttributeNode(oldAttr: Attr): Attr;
|
||||
requestFullscreen(): void;
|
||||
requestPointerLock(): void;
|
||||
setAttribute(name?: string, value?: string): void;
|
||||
setAttribute(name: string, value: string): void;
|
||||
setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;
|
||||
setAttributeNode(newAttr: Attr): Attr;
|
||||
setAttributeNodeNS(newAttr: Attr): Attr;
|
||||
@@ -5512,7 +5514,7 @@ interface HTMLMediaElement extends HTMLElement {
|
||||
* Gets or sets the current playback position, in seconds.
|
||||
*/
|
||||
preload: string;
|
||||
readyState: any;
|
||||
readyState: number;
|
||||
/**
|
||||
* Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked.
|
||||
*/
|
||||
@@ -6169,6 +6171,7 @@ interface HTMLSelectElement extends HTMLElement {
|
||||
* Returns whether an element will successfully validate based on forms validation rules and constraints.
|
||||
*/
|
||||
willValidate: boolean;
|
||||
selectedOptions: HTMLCollection;
|
||||
/**
|
||||
* Adds an element to the areas, controlRange, or options collection.
|
||||
* @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection.
|
||||
|
||||
Vendored
+28
-19
@@ -7,7 +7,7 @@ interface Symbol {
|
||||
/** Returns the primitive value of the specified object. */
|
||||
valueOf(): Object;
|
||||
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "Symbol";
|
||||
}
|
||||
|
||||
interface SymbolConstructor {
|
||||
@@ -565,7 +565,7 @@ interface IterableIterator<T> extends Iterator<T> {
|
||||
}
|
||||
|
||||
interface GeneratorFunction extends Function {
|
||||
|
||||
[Symbol.toStringTag]: "GeneratorFunction";
|
||||
}
|
||||
|
||||
interface GeneratorFunctionConstructor {
|
||||
@@ -690,7 +690,7 @@ interface Math {
|
||||
*/
|
||||
cbrt(x: number): number;
|
||||
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "Math";
|
||||
}
|
||||
|
||||
interface Date {
|
||||
@@ -807,7 +807,7 @@ interface Map<K, V> {
|
||||
size: number;
|
||||
values(): IterableIterator<V>;
|
||||
[Symbol.iterator]():IterableIterator<[K,V]>;
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "Map";
|
||||
}
|
||||
|
||||
interface MapConstructor {
|
||||
@@ -824,7 +824,7 @@ interface WeakMap<K, V> {
|
||||
get(key: K): V;
|
||||
has(key: K): boolean;
|
||||
set(key: K, value?: V): WeakMap<K, V>;
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "WeakMap";
|
||||
}
|
||||
|
||||
interface WeakMapConstructor {
|
||||
@@ -846,7 +846,7 @@ interface Set<T> {
|
||||
size: number;
|
||||
values(): IterableIterator<T>;
|
||||
[Symbol.iterator]():IterableIterator<T>;
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "Set";
|
||||
}
|
||||
|
||||
interface SetConstructor {
|
||||
@@ -862,7 +862,7 @@ interface WeakSet<T> {
|
||||
clear(): void;
|
||||
delete(value: T): boolean;
|
||||
has(value: T): boolean;
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "WeakSet";
|
||||
}
|
||||
|
||||
interface WeakSetConstructor {
|
||||
@@ -874,7 +874,7 @@ interface WeakSetConstructor {
|
||||
declare var WeakSet: WeakSetConstructor;
|
||||
|
||||
interface JSON {
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "JSON";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -884,11 +884,11 @@ interface JSON {
|
||||
* buffer as needed.
|
||||
*/
|
||||
interface ArrayBuffer {
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "ArrayBuffer";
|
||||
}
|
||||
|
||||
interface DataView {
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "DataView";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -909,6 +909,7 @@ interface Int8Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Int8Array";
|
||||
}
|
||||
|
||||
interface Int8ArrayConstructor {
|
||||
@@ -941,6 +942,7 @@ interface Uint8Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "UInt8Array";
|
||||
}
|
||||
|
||||
interface Uint8ArrayConstructor {
|
||||
@@ -976,6 +978,7 @@ interface Uint8ClampedArray {
|
||||
values(): IterableIterator<number>;
|
||||
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Uint8ClampedArray";
|
||||
}
|
||||
|
||||
interface Uint8ClampedArrayConstructor {
|
||||
@@ -1013,6 +1016,7 @@ interface Int16Array {
|
||||
|
||||
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Int16Array";
|
||||
}
|
||||
|
||||
interface Int16ArrayConstructor {
|
||||
@@ -1045,6 +1049,7 @@ interface Uint16Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Uint16Array";
|
||||
}
|
||||
|
||||
interface Uint16ArrayConstructor {
|
||||
@@ -1077,6 +1082,7 @@ interface Int32Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Int32Array";
|
||||
}
|
||||
|
||||
interface Int32ArrayConstructor {
|
||||
@@ -1109,6 +1115,7 @@ interface Uint32Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Uint32Array";
|
||||
}
|
||||
|
||||
interface Uint32ArrayConstructor {
|
||||
@@ -1141,6 +1148,7 @@ interface Float32Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Float32Array";
|
||||
}
|
||||
|
||||
interface Float32ArrayConstructor {
|
||||
@@ -1173,6 +1181,7 @@ interface Float64Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Float64Array";
|
||||
}
|
||||
|
||||
interface Float64ArrayConstructor {
|
||||
@@ -1249,7 +1258,7 @@ interface Promise<T> {
|
||||
catch(onrejected?: (reason: any) => T | PromiseLike<T>): Promise<T>;
|
||||
catch(onrejected?: (reason: any) => void): Promise<T>;
|
||||
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "Promise";
|
||||
}
|
||||
|
||||
interface PromiseConstructor {
|
||||
@@ -1272,15 +1281,15 @@ interface PromiseConstructor {
|
||||
* @param values An array of Promises.
|
||||
* @returns A new Promise.
|
||||
*/
|
||||
all<T1, T2>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>;
|
||||
all<T1, T2, T3>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<[T1, T2, T3]>;
|
||||
all<T1, T2, T3, T4>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>]): Promise<[T1, T2, T3, T4]>;
|
||||
all<T1, T2, T3, T4, T5>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>]): Promise<[T1, T2, T3, T4, T5]>;
|
||||
all<T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<[T1, T2, T3, T4, T5, T6]>;
|
||||
all<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<[T1, T2, T3, T4, T5, T6, T7]>;
|
||||
all<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
|
||||
all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
|
||||
all<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>, T10 | PromiseLike<T10>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
|
||||
all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
|
||||
all<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
|
||||
all<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<[T1, T2, T3, T4, T5, T6, T7]>;
|
||||
all<T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<[T1, T2, T3, T4, T5, T6]>;
|
||||
all<T1, T2, T3, T4, T5>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>]): Promise<[T1, T2, T3, T4, T5]>;
|
||||
all<T1, T2, T3, T4>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>]): Promise<[T1, T2, T3, T4]>;
|
||||
all<T1, T2, T3>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<[T1, T2, T3]>;
|
||||
all<T1, T2>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>;
|
||||
all<TAll>(values: Iterable<TAll | PromiseLike<TAll>>): Promise<TAll[]>;
|
||||
|
||||
/**
|
||||
|
||||
@@ -100,7 +100,8 @@ namespace ts.server {
|
||||
this.filenameToScript = createFileMap<ScriptInfo>();
|
||||
this.moduleResolutionHost = {
|
||||
fileExists: fileName => this.fileExists(fileName),
|
||||
readFile: fileName => this.host.readFile(fileName)
|
||||
readFile: fileName => this.host.readFile(fileName),
|
||||
directoryExists: directoryName => this.host.directoryExists(directoryName)
|
||||
};
|
||||
}
|
||||
|
||||
@@ -718,7 +719,8 @@ namespace ts.server {
|
||||
else {
|
||||
for (const directory of project.directoriesWatchedForTsconfig) {
|
||||
// if the ref count for this directory watcher drops to 0, it's time to close it
|
||||
if (!(--project.projectService.directoryWatchersRefCount[directory])) {
|
||||
project.projectService.directoryWatchersRefCount[directory]--;
|
||||
if (!project.projectService.directoryWatchersRefCount[directory]) {
|
||||
this.log("Close directory watcher for: " + directory);
|
||||
project.projectService.directoryWatchersForTsconfig[directory].close();
|
||||
delete project.projectService.directoryWatchersForTsconfig[directory];
|
||||
@@ -1330,6 +1332,7 @@ namespace ts.server {
|
||||
InsertSpaceAfterFunctionKeywordForAnonymousFunctions: false,
|
||||
InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: false,
|
||||
InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: false,
|
||||
InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: false,
|
||||
PlaceOpenBraceOnNewLineForFunctions: false,
|
||||
PlaceOpenBraceOnNewLineForControlBlocks: false,
|
||||
};
|
||||
@@ -1730,7 +1733,8 @@ namespace ts.server {
|
||||
let count = 1;
|
||||
let pos = 0;
|
||||
this.index.every((ll, s, len) => {
|
||||
starts[count++] = pos;
|
||||
starts[count] = pos;
|
||||
count++;
|
||||
pos += ll.text.length;
|
||||
return true;
|
||||
}, 0);
|
||||
@@ -1996,7 +2000,8 @@ namespace ts.server {
|
||||
while (adjustedStart >= childCharCount) {
|
||||
this.skipChild(adjustedStart, rangeLength, childIndex, walkFns, CharRangeSection.PreStart);
|
||||
adjustedStart -= childCharCount;
|
||||
child = this.children[++childIndex];
|
||||
childIndex++;
|
||||
child = this.children[childIndex];
|
||||
childCharCount = child.charCount();
|
||||
}
|
||||
// Case I: both start and end of range in same subtree
|
||||
@@ -2011,14 +2016,16 @@ namespace ts.server {
|
||||
return;
|
||||
}
|
||||
let adjustedLength = rangeLength - (childCharCount - adjustedStart);
|
||||
child = this.children[++childIndex];
|
||||
childIndex++;
|
||||
child = this.children[childIndex];
|
||||
childCharCount = child.charCount();
|
||||
while (adjustedLength > childCharCount) {
|
||||
if (this.execWalk(0, childCharCount, walkFns, childIndex, CharRangeSection.Mid)) {
|
||||
return;
|
||||
}
|
||||
adjustedLength -= childCharCount;
|
||||
child = this.children[++childIndex];
|
||||
childIndex++;
|
||||
child = this.children[childIndex];
|
||||
childCharCount = child.charCount();
|
||||
}
|
||||
if (adjustedLength > 0) {
|
||||
@@ -2142,7 +2149,8 @@ namespace ts.server {
|
||||
if (childIndex < clen) {
|
||||
splitNode = new LineNode();
|
||||
while (childIndex < clen) {
|
||||
splitNode.add(this.children[childIndex++]);
|
||||
splitNode.add(this.children[childIndex]);
|
||||
childIndex++;
|
||||
}
|
||||
splitNode.updateCounts();
|
||||
}
|
||||
@@ -2183,7 +2191,9 @@ namespace ts.server {
|
||||
let nodeIndex = 0;
|
||||
childIndex++;
|
||||
while ((childIndex < lineCollectionCapacity) && (nodeIndex < nodeCount)) {
|
||||
this.children[childIndex++] = nodes[nodeIndex++];
|
||||
this.children[childIndex] = nodes[nodeIndex];
|
||||
childIndex++;
|
||||
nodeIndex++;
|
||||
}
|
||||
let splitNodes: LineNode[] = [];
|
||||
let splitNodeCount = 0;
|
||||
@@ -2196,7 +2206,8 @@ namespace ts.server {
|
||||
}
|
||||
let splitNode = <LineNode>splitNodes[0];
|
||||
while (nodeIndex < nodeCount) {
|
||||
splitNode.add(nodes[nodeIndex++]);
|
||||
splitNode.add(nodes[nodeIndex]);
|
||||
nodeIndex++;
|
||||
if (splitNode.children.length === lineCollectionCapacity) {
|
||||
splitNodeIndex++;
|
||||
splitNode = <LineNode>splitNodes[splitNodeIndex];
|
||||
|
||||
@@ -263,7 +263,8 @@ namespace ts.server {
|
||||
let index = 0;
|
||||
const checkOne = () => {
|
||||
if (matchSeq(seq)) {
|
||||
const checkSpec = checkList[index++];
|
||||
const checkSpec = checkList[index];
|
||||
index++;
|
||||
if (checkSpec.project.getSourceFileFromName(checkSpec.fileName, requireOpen)) {
|
||||
this.syntacticCheck(checkSpec.fileName, checkSpec.project);
|
||||
this.immediateId = setImmediate(() => {
|
||||
|
||||
+271
-86
@@ -45,6 +45,10 @@ namespace ts.BreakpointResolver {
|
||||
return createTextSpanFromBounds(start, (endNode || startNode).getEnd());
|
||||
}
|
||||
|
||||
function textSpanEndingAtNextToken(startNode: Node, previousTokenToFindNextEndToken: Node): TextSpan {
|
||||
return textSpan(startNode, findNextToken(previousTokenToFindNextEndToken, previousTokenToFindNextEndToken.parent));
|
||||
}
|
||||
|
||||
function spanInNodeIfStartsOnSameLine(node: Node, otherwiseOnNode?: Node): TextSpan {
|
||||
if (node && lineOfPosition === sourceFile.getLineAndCharacterOfPosition(node.getStart(sourceFile)).line) {
|
||||
return spanInNode(node);
|
||||
@@ -66,33 +70,6 @@ namespace ts.BreakpointResolver {
|
||||
|
||||
function spanInNode(node: Node): TextSpan {
|
||||
if (node) {
|
||||
if (isExpression(node)) {
|
||||
if (node.parent.kind === SyntaxKind.DoStatement) {
|
||||
// Set span as if on while keyword
|
||||
return spanInPreviousNode(node);
|
||||
}
|
||||
|
||||
if (node.parent.kind === SyntaxKind.Decorator) {
|
||||
// Set breakpoint on the decorator emit
|
||||
return spanInNode(node.parent);
|
||||
}
|
||||
|
||||
if (node.parent.kind === SyntaxKind.ForStatement) {
|
||||
// For now lets set the span on this expression, fix it later
|
||||
return textSpan(node);
|
||||
}
|
||||
|
||||
if (node.parent.kind === SyntaxKind.BinaryExpression && (<BinaryExpression>node.parent).operatorToken.kind === SyntaxKind.CommaToken) {
|
||||
// if this is comma expression, the breakpoint is possible in this expression
|
||||
return textSpan(node);
|
||||
}
|
||||
|
||||
if (node.parent.kind === SyntaxKind.ArrowFunction && (<FunctionLikeDeclaration>node.parent).body === node) {
|
||||
// If this is body of arrow function, it is allowed to have the breakpoint
|
||||
return textSpan(node);
|
||||
}
|
||||
}
|
||||
|
||||
switch (node.kind) {
|
||||
case SyntaxKind.VariableStatement:
|
||||
// Span on first variable declaration
|
||||
@@ -120,7 +97,7 @@ namespace ts.BreakpointResolver {
|
||||
if (isFunctionBlock(node)) {
|
||||
return spanInFunctionBlock(<Block>node);
|
||||
}
|
||||
// Fall through
|
||||
// Fall through
|
||||
case SyntaxKind.ModuleBlock:
|
||||
return spanInBlock(<Block>node);
|
||||
|
||||
@@ -137,7 +114,7 @@ namespace ts.BreakpointResolver {
|
||||
|
||||
case SyntaxKind.WhileStatement:
|
||||
// Span on while(...)
|
||||
return textSpan(node, findNextToken((<WhileStatement>node).expression, node));
|
||||
return textSpanEndingAtNextToken(node, (<WhileStatement>node).expression);
|
||||
|
||||
case SyntaxKind.DoStatement:
|
||||
// span in statement of the do statement
|
||||
@@ -149,7 +126,7 @@ namespace ts.BreakpointResolver {
|
||||
|
||||
case SyntaxKind.IfStatement:
|
||||
// set on if(..) span
|
||||
return textSpan(node, findNextToken((<IfStatement>node).expression, node));
|
||||
return textSpanEndingAtNextToken(node, (<IfStatement>node).expression);
|
||||
|
||||
case SyntaxKind.LabeledStatement:
|
||||
// span in statement
|
||||
@@ -164,13 +141,16 @@ namespace ts.BreakpointResolver {
|
||||
return spanInForStatement(<ForStatement>node);
|
||||
|
||||
case SyntaxKind.ForInStatement:
|
||||
// span of for (a in ...)
|
||||
return textSpanEndingAtNextToken(node, (<ForInStatement>node).expression);
|
||||
|
||||
case SyntaxKind.ForOfStatement:
|
||||
// span on for (a in ...)
|
||||
return textSpan(node, findNextToken((<ForInStatement | ForOfStatement>node).expression, node));
|
||||
// span in initializer
|
||||
return spanInInitializerOfForLike(<ForOfStatement | ForInStatement>node);
|
||||
|
||||
case SyntaxKind.SwitchStatement:
|
||||
// span on switch(...)
|
||||
return textSpan(node, findNextToken((<SwitchStatement>node).expression, node));
|
||||
return textSpanEndingAtNextToken(node, (<SwitchStatement>node).expression);
|
||||
|
||||
case SyntaxKind.CaseClause:
|
||||
case SyntaxKind.DefaultClause:
|
||||
@@ -210,8 +190,7 @@ namespace ts.BreakpointResolver {
|
||||
case SyntaxKind.ClassDeclaration:
|
||||
case SyntaxKind.EnumDeclaration:
|
||||
case SyntaxKind.EnumMember:
|
||||
case SyntaxKind.CallExpression:
|
||||
case SyntaxKind.NewExpression:
|
||||
case SyntaxKind.BindingElement:
|
||||
// span on complete node
|
||||
return textSpan(node);
|
||||
|
||||
@@ -222,6 +201,10 @@ namespace ts.BreakpointResolver {
|
||||
case SyntaxKind.Decorator:
|
||||
return spanInNodeArray(node.parent.decorators);
|
||||
|
||||
case SyntaxKind.ObjectBindingPattern:
|
||||
case SyntaxKind.ArrayBindingPattern:
|
||||
return spanInBindingPattern(<BindingPattern>node);
|
||||
|
||||
// No breakpoint in interface, type alias
|
||||
case SyntaxKind.InterfaceDeclaration:
|
||||
case SyntaxKind.TypeAliasDeclaration:
|
||||
@@ -234,14 +217,17 @@ namespace ts.BreakpointResolver {
|
||||
|
||||
case SyntaxKind.CommaToken:
|
||||
return spanInPreviousNode(node)
|
||||
|
||||
|
||||
case SyntaxKind.OpenBraceToken:
|
||||
return spanInOpenBraceToken(node);
|
||||
|
||||
case SyntaxKind.CloseBraceToken:
|
||||
return spanInCloseBraceToken(node);
|
||||
|
||||
case SyntaxKind.OpenParenToken:
|
||||
case SyntaxKind.CloseBracketToken:
|
||||
return spanInCloseBracketToken(node);
|
||||
|
||||
case SyntaxKind.OpenParenToken:
|
||||
return spanInOpenParenToken(node);
|
||||
|
||||
case SyntaxKind.CloseParenToken:
|
||||
@@ -263,15 +249,93 @@ namespace ts.BreakpointResolver {
|
||||
case SyntaxKind.FinallyKeyword:
|
||||
return spanInNextNode(node);
|
||||
|
||||
case SyntaxKind.OfKeyword:
|
||||
return spanInOfKeyword(node);
|
||||
|
||||
default:
|
||||
// If this is name of property assignment, set breakpoint in the initializer
|
||||
if (node.parent.kind === SyntaxKind.PropertyAssignment && (<PropertyDeclaration>node.parent).name === node) {
|
||||
return spanInNode((<PropertyDeclaration>node.parent).initializer);
|
||||
// Destructuring pattern in destructuring assignment
|
||||
// [a, b, c] of
|
||||
// [a, b, c] = expression
|
||||
if (isArrayLiteralOrObjectLiteralDestructuringPattern(node)) {
|
||||
return spanInArrayLiteralOrObjectLiteralDestructuringPattern(<DestructuringPattern>node);
|
||||
}
|
||||
|
||||
// Set breakpoint on identifier element of destructuring pattern
|
||||
// a or ...c or d: x from
|
||||
// [a, b, ...c] or { a, b } or { d: x } from destructuring pattern
|
||||
if ((node.kind === SyntaxKind.Identifier ||
|
||||
node.kind == SyntaxKind.SpreadElementExpression ||
|
||||
node.kind === SyntaxKind.PropertyAssignment ||
|
||||
node.kind === SyntaxKind.ShorthandPropertyAssignment) &&
|
||||
isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent)) {
|
||||
return textSpan(node);
|
||||
}
|
||||
|
||||
if (node.kind === SyntaxKind.BinaryExpression) {
|
||||
const binaryExpression = <BinaryExpression>node;
|
||||
// Set breakpoint in destructuring pattern if its destructuring assignment
|
||||
// [a, b, c] or {a, b, c} of
|
||||
// [a, b, c] = expression or
|
||||
// {a, b, c} = expression
|
||||
if (isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left)) {
|
||||
return spanInArrayLiteralOrObjectLiteralDestructuringPattern(
|
||||
<ArrayLiteralExpression | ObjectLiteralExpression>binaryExpression.left);
|
||||
}
|
||||
|
||||
if (binaryExpression.operatorToken.kind === SyntaxKind.EqualsToken &&
|
||||
isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.parent)) {
|
||||
// Set breakpoint on assignment expression element of destructuring pattern
|
||||
// a = expression of
|
||||
// [a = expression, b, c] = someExpression or
|
||||
// { a = expression, b, c } = someExpression
|
||||
return textSpan(node);
|
||||
}
|
||||
|
||||
if (binaryExpression.operatorToken.kind === SyntaxKind.CommaToken) {
|
||||
return spanInNode(binaryExpression.left);
|
||||
}
|
||||
}
|
||||
|
||||
if (isExpression(node)) {
|
||||
switch (node.parent.kind) {
|
||||
case SyntaxKind.DoStatement:
|
||||
// Set span as if on while keyword
|
||||
return spanInPreviousNode(node);
|
||||
|
||||
case SyntaxKind.Decorator:
|
||||
// Set breakpoint on the decorator emit
|
||||
return spanInNode(node.parent);
|
||||
|
||||
case SyntaxKind.ForStatement:
|
||||
case SyntaxKind.ForOfStatement:
|
||||
return textSpan(node);
|
||||
|
||||
case SyntaxKind.BinaryExpression:
|
||||
if ((<BinaryExpression>node.parent).operatorToken.kind === SyntaxKind.CommaToken) {
|
||||
// if this is comma expression, the breakpoint is possible in this expression
|
||||
return textSpan(node);
|
||||
}
|
||||
break;
|
||||
|
||||
case SyntaxKind.ArrowFunction:
|
||||
if ((<FunctionLikeDeclaration>node.parent).body === node) {
|
||||
// If this is body of arrow function, it is allowed to have the breakpoint
|
||||
return textSpan(node);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// If this is name of property assignment, set breakpoint in the initializer
|
||||
if (node.parent.kind === SyntaxKind.PropertyAssignment &&
|
||||
(<PropertyDeclaration>node.parent).name === node &&
|
||||
!isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.parent)) {
|
||||
return spanInNode((<PropertyDeclaration>node.parent).initializer);
|
||||
}
|
||||
|
||||
// Breakpoint in type assertion goes to its operand
|
||||
if (node.parent.kind === SyntaxKind.TypeAssertionExpression && (<TypeAssertion>node.parent).type === node) {
|
||||
return spanInNode((<TypeAssertion>node.parent).expression);
|
||||
return spanInNextNode((<TypeAssertion>node.parent).type);
|
||||
}
|
||||
|
||||
// return type of function go to previous token
|
||||
@@ -279,48 +343,70 @@ namespace ts.BreakpointResolver {
|
||||
return spanInPreviousNode(node);
|
||||
}
|
||||
|
||||
// initializer of variable/parameter declaration go to previous node
|
||||
if ((node.parent.kind === SyntaxKind.VariableDeclaration ||
|
||||
node.parent.kind === SyntaxKind.Parameter)) {
|
||||
const paramOrVarDecl = <VariableDeclaration | ParameterDeclaration>node.parent;
|
||||
if (paramOrVarDecl.initializer === node ||
|
||||
paramOrVarDecl.type === node ||
|
||||
isAssignmentOperator(node.kind)) {
|
||||
return spanInPreviousNode(node);
|
||||
}
|
||||
}
|
||||
|
||||
if (node.parent.kind === SyntaxKind.BinaryExpression) {
|
||||
const binaryExpression = <BinaryExpression>node.parent;
|
||||
if (isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left) &&
|
||||
(binaryExpression.right === node ||
|
||||
binaryExpression.operatorToken === node)) {
|
||||
// If initializer of destructuring assignment move to previous token
|
||||
return spanInPreviousNode(node);
|
||||
}
|
||||
}
|
||||
|
||||
// Default go to parent to set the breakpoint
|
||||
return spanInNode(node.parent);
|
||||
}
|
||||
}
|
||||
|
||||
function textSpanFromVariableDeclaration(variableDeclaration: VariableDeclaration): TextSpan {
|
||||
let declarations = variableDeclaration.parent.declarations;
|
||||
if (declarations && declarations[0] === variableDeclaration) {
|
||||
// First declaration - include let keyword
|
||||
return textSpan(findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent), variableDeclaration);
|
||||
}
|
||||
else {
|
||||
// Span only on this declaration
|
||||
return textSpan(variableDeclaration);
|
||||
}
|
||||
}
|
||||
|
||||
function spanInVariableDeclaration(variableDeclaration: VariableDeclaration): TextSpan {
|
||||
// If declaration of for in statement, just set the span in parent
|
||||
if (variableDeclaration.parent.parent.kind === SyntaxKind.ForInStatement ||
|
||||
variableDeclaration.parent.parent.kind === SyntaxKind.ForOfStatement) {
|
||||
if (variableDeclaration.parent.parent.kind === SyntaxKind.ForInStatement) {
|
||||
return spanInNode(variableDeclaration.parent.parent);
|
||||
}
|
||||
|
||||
let isParentVariableStatement = variableDeclaration.parent.parent.kind === SyntaxKind.VariableStatement;
|
||||
let isDeclarationOfForStatement = variableDeclaration.parent.parent.kind === SyntaxKind.ForStatement && contains((<VariableDeclarationList>(<ForStatement>variableDeclaration.parent.parent).initializer).declarations, variableDeclaration);
|
||||
let declarations = isParentVariableStatement
|
||||
? (<VariableStatement>variableDeclaration.parent.parent).declarationList.declarations
|
||||
: isDeclarationOfForStatement
|
||||
? (<VariableDeclarationList>(<ForStatement>variableDeclaration.parent.parent).initializer).declarations
|
||||
: undefined;
|
||||
|
||||
// If this is a destructuring pattern set breakpoint in binding pattern
|
||||
if (isBindingPattern(variableDeclaration.name)) {
|
||||
return spanInBindingPattern(<BindingPattern>variableDeclaration.name);
|
||||
}
|
||||
|
||||
// Breakpoint is possible in variableDeclaration only if there is initialization
|
||||
if (variableDeclaration.initializer || (variableDeclaration.flags & NodeFlags.Export)) {
|
||||
if (declarations && declarations[0] === variableDeclaration) {
|
||||
if (isParentVariableStatement) {
|
||||
// First declaration - include let keyword
|
||||
return textSpan(variableDeclaration.parent, variableDeclaration);
|
||||
}
|
||||
else {
|
||||
Debug.assert(isDeclarationOfForStatement);
|
||||
// Include let keyword from for statement declarations in the span
|
||||
return textSpan(findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent), variableDeclaration);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Span only on this declaration
|
||||
return textSpan(variableDeclaration);
|
||||
}
|
||||
// or its declaration from 'for of'
|
||||
if (variableDeclaration.initializer ||
|
||||
(variableDeclaration.flags & NodeFlags.Export) ||
|
||||
variableDeclaration.parent.parent.kind === SyntaxKind.ForOfStatement) {
|
||||
return textSpanFromVariableDeclaration(variableDeclaration);
|
||||
}
|
||||
else if (declarations && declarations[0] !== variableDeclaration) {
|
||||
|
||||
let declarations = variableDeclaration.parent.declarations;
|
||||
if (declarations && declarations[0] !== variableDeclaration) {
|
||||
// If we cant set breakpoint on this declaration, set it on previous one
|
||||
let indexOfCurrentDeclaration = indexOf(declarations, variableDeclaration);
|
||||
return spanInVariableDeclaration(declarations[indexOfCurrentDeclaration - 1]);
|
||||
// Because the variable declaration may be binding pattern and
|
||||
// we would like to set breakpoint in last binding element if thats the case,
|
||||
// use preceding token instead
|
||||
return spanInNode(findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -331,7 +417,11 @@ namespace ts.BreakpointResolver {
|
||||
}
|
||||
|
||||
function spanInParameterDeclaration(parameter: ParameterDeclaration): TextSpan {
|
||||
if (canHaveSpanInParameterDeclaration(parameter)) {
|
||||
if (isBindingPattern(parameter.name)) {
|
||||
// set breakpoint in binding pattern
|
||||
return spanInBindingPattern(<BindingPattern>parameter.name);
|
||||
}
|
||||
else if (canHaveSpanInParameterDeclaration(parameter)) {
|
||||
return textSpan(parameter);
|
||||
}
|
||||
else {
|
||||
@@ -388,11 +478,11 @@ namespace ts.BreakpointResolver {
|
||||
case SyntaxKind.WhileStatement:
|
||||
case SyntaxKind.IfStatement:
|
||||
case SyntaxKind.ForInStatement:
|
||||
case SyntaxKind.ForOfStatement:
|
||||
return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]);
|
||||
|
||||
// Set span on previous token if it starts on same line otherwise on the first statement of the block
|
||||
case SyntaxKind.ForStatement:
|
||||
case SyntaxKind.ForOfStatement:
|
||||
return spanInNodeIfStartsOnSameLine(findPrecedingToken(block.pos, sourceFile, block.parent), block.statements[0]);
|
||||
}
|
||||
|
||||
@@ -400,17 +490,23 @@ namespace ts.BreakpointResolver {
|
||||
return spanInNode(block.statements[0]);
|
||||
}
|
||||
|
||||
function spanInInitializerOfForLike(forLikeStaement: ForStatement | ForOfStatement | ForInStatement): TextSpan {
|
||||
if (forLikeStaement.initializer.kind === SyntaxKind.VariableDeclarationList) {
|
||||
// declaration list, set breakpoint in first declaration
|
||||
let variableDeclarationList = <VariableDeclarationList>forLikeStaement.initializer;
|
||||
if (variableDeclarationList.declarations.length > 0) {
|
||||
return spanInNode(variableDeclarationList.declarations[0]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Expression - set breakpoint in it
|
||||
return spanInNode(forLikeStaement.initializer);
|
||||
}
|
||||
}
|
||||
|
||||
function spanInForStatement(forStatement: ForStatement): TextSpan {
|
||||
if (forStatement.initializer) {
|
||||
if (forStatement.initializer.kind === SyntaxKind.VariableDeclarationList) {
|
||||
let variableDeclarationList = <VariableDeclarationList>forStatement.initializer;
|
||||
if (variableDeclarationList.declarations.length > 0) {
|
||||
return spanInNode(variableDeclarationList.declarations[0]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
return spanInNode(forStatement.initializer);
|
||||
}
|
||||
return spanInInitializerOfForLike(forStatement);
|
||||
}
|
||||
|
||||
if (forStatement.condition) {
|
||||
@@ -421,6 +517,45 @@ namespace ts.BreakpointResolver {
|
||||
}
|
||||
}
|
||||
|
||||
function spanInBindingPattern(bindingPattern: BindingPattern): TextSpan {
|
||||
// Set breakpoint in first binding element
|
||||
let firstBindingElement = forEach(bindingPattern.elements,
|
||||
element => element.kind !== SyntaxKind.OmittedExpression ? element : undefined);
|
||||
|
||||
if (firstBindingElement) {
|
||||
return spanInNode(firstBindingElement);
|
||||
}
|
||||
|
||||
// Empty binding pattern of binding element, set breakpoint on binding element
|
||||
if (bindingPattern.parent.kind === SyntaxKind.BindingElement) {
|
||||
return textSpan(bindingPattern.parent);
|
||||
}
|
||||
|
||||
// Variable declaration is used as the span
|
||||
return textSpanFromVariableDeclaration(<VariableDeclaration>bindingPattern.parent);
|
||||
}
|
||||
|
||||
function spanInArrayLiteralOrObjectLiteralDestructuringPattern(node: DestructuringPattern): TextSpan {
|
||||
Debug.assert(node.kind !== SyntaxKind.ArrayBindingPattern && node.kind !== SyntaxKind.ObjectBindingPattern);
|
||||
const elements: NodeArray<Expression | ObjectLiteralElement> =
|
||||
node.kind === SyntaxKind.ArrayLiteralExpression ?
|
||||
(<ArrayLiteralExpression>node).elements :
|
||||
(<ObjectLiteralExpression>node).properties;
|
||||
|
||||
const firstBindingElement = forEach(elements,
|
||||
element => element.kind !== SyntaxKind.OmittedExpression ? element : undefined);
|
||||
|
||||
if (firstBindingElement) {
|
||||
return spanInNode(firstBindingElement);
|
||||
}
|
||||
|
||||
// Could be ArrayLiteral from destructuring assignment or
|
||||
// just nested element in another destructuring assignment
|
||||
// set breakpoint on assignment when parent is destructuring assignment
|
||||
// Otherwise set breakpoint for this element
|
||||
return textSpan(node.parent.kind === SyntaxKind.BinaryExpression ? node.parent : node);
|
||||
}
|
||||
|
||||
// Tokens:
|
||||
function spanInOpenBraceToken(node: Node): TextSpan {
|
||||
switch (node.parent.kind) {
|
||||
@@ -472,18 +607,52 @@ namespace ts.BreakpointResolver {
|
||||
}
|
||||
return undefined;
|
||||
|
||||
case SyntaxKind.ObjectBindingPattern:
|
||||
// Breakpoint in last binding element or binding pattern if it contains no elements
|
||||
let bindingPattern = <BindingPattern>node.parent;
|
||||
return spanInNode(lastOrUndefined(bindingPattern.elements) || bindingPattern);
|
||||
|
||||
// Default to parent node
|
||||
default:
|
||||
if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent)) {
|
||||
// Breakpoint in last binding element or binding pattern if it contains no elements
|
||||
let objectLiteral = <ObjectLiteralExpression>node.parent;
|
||||
return textSpan(lastOrUndefined(objectLiteral.properties) || objectLiteral);
|
||||
}
|
||||
return spanInNode(node.parent);
|
||||
}
|
||||
}
|
||||
|
||||
function spanInCloseBracketToken(node: Node): TextSpan {
|
||||
switch (node.parent.kind) {
|
||||
case SyntaxKind.ArrayBindingPattern:
|
||||
// Breakpoint in last binding element or binding pattern if it contains no elements
|
||||
let bindingPattern = <BindingPattern>node.parent;
|
||||
return textSpan(lastOrUndefined(bindingPattern.elements) || bindingPattern);
|
||||
|
||||
default:
|
||||
if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent)) {
|
||||
// Breakpoint in last binding element or binding pattern if it contains no elements
|
||||
let arrayLiteral = <ArrayLiteralExpression>node.parent;
|
||||
return textSpan(lastOrUndefined(arrayLiteral.elements) || arrayLiteral);
|
||||
}
|
||||
|
||||
// Default to parent node
|
||||
return spanInNode(node.parent);
|
||||
}
|
||||
}
|
||||
|
||||
function spanInOpenParenToken(node: Node): TextSpan {
|
||||
if (node.parent.kind === SyntaxKind.DoStatement) {
|
||||
// Go to while keyword and do action instead
|
||||
if (node.parent.kind === SyntaxKind.DoStatement || // Go to while keyword and do action instead
|
||||
node.parent.kind === SyntaxKind.CallExpression ||
|
||||
node.parent.kind === SyntaxKind.NewExpression) {
|
||||
return spanInPreviousNode(node);
|
||||
}
|
||||
|
||||
if (node.parent.kind === SyntaxKind.ParenthesizedExpression) {
|
||||
return spanInNextNode(node);
|
||||
}
|
||||
|
||||
// Default to parent node
|
||||
return spanInNode(node.parent);
|
||||
}
|
||||
@@ -502,6 +671,10 @@ namespace ts.BreakpointResolver {
|
||||
case SyntaxKind.WhileStatement:
|
||||
case SyntaxKind.DoStatement:
|
||||
case SyntaxKind.ForStatement:
|
||||
case SyntaxKind.ForOfStatement:
|
||||
case SyntaxKind.CallExpression:
|
||||
case SyntaxKind.NewExpression:
|
||||
case SyntaxKind.ParenthesizedExpression:
|
||||
return spanInPreviousNode(node);
|
||||
|
||||
// Default to parent node
|
||||
@@ -512,7 +685,9 @@ namespace ts.BreakpointResolver {
|
||||
|
||||
function spanInColonToken(node: Node): TextSpan {
|
||||
// Is this : specifying return annotation of the function declaration
|
||||
if (isFunctionLike(node.parent) || node.parent.kind === SyntaxKind.PropertyAssignment) {
|
||||
if (isFunctionLike(node.parent) ||
|
||||
node.parent.kind === SyntaxKind.PropertyAssignment ||
|
||||
node.parent.kind === SyntaxKind.Parameter) {
|
||||
return spanInPreviousNode(node);
|
||||
}
|
||||
|
||||
@@ -521,7 +696,7 @@ namespace ts.BreakpointResolver {
|
||||
|
||||
function spanInGreaterThanOrLessThanToken(node: Node): TextSpan {
|
||||
if (node.parent.kind === SyntaxKind.TypeAssertionExpression) {
|
||||
return spanInNode((<TypeAssertion>node.parent).expression);
|
||||
return spanInNextNode(node);
|
||||
}
|
||||
|
||||
return spanInNode(node.parent);
|
||||
@@ -530,7 +705,17 @@ namespace ts.BreakpointResolver {
|
||||
function spanInWhileKeyword(node: Node): TextSpan {
|
||||
if (node.parent.kind === SyntaxKind.DoStatement) {
|
||||
// Set span on while expression
|
||||
return textSpan(node, findNextToken((<DoStatement>node.parent).expression, node.parent));
|
||||
return textSpanEndingAtNextToken(node, (<DoStatement>node.parent).expression);
|
||||
}
|
||||
|
||||
// Default to parent node
|
||||
return spanInNode(node.parent);
|
||||
}
|
||||
|
||||
function spanInOfKeyword(node: Node): TextSpan {
|
||||
if (node.parent.kind === SyntaxKind.ForOfStatement) {
|
||||
// set using next token
|
||||
return spanInNextNode(node);
|
||||
}
|
||||
|
||||
// Default to parent node
|
||||
|
||||
@@ -121,7 +121,7 @@ namespace ts.formatting {
|
||||
|
||||
function findOutermostParent(position: number, expectedTokenKind: SyntaxKind, sourceFile: SourceFile): Node {
|
||||
let precedingToken = findPrecedingToken(position, sourceFile);
|
||||
|
||||
|
||||
// when it is claimed that trigger character was typed at given position
|
||||
// we verify that there is a token with a matching kind whose end is equal to position (because the character was just typed).
|
||||
// If this condition is not hold - then trigger character was typed in some other context,
|
||||
@@ -151,7 +151,7 @@ namespace ts.formatting {
|
||||
|
||||
return current;
|
||||
}
|
||||
|
||||
|
||||
// Returns true if node is a element in some list in parent
|
||||
// i.e. parent is class declaration with the list of members and node is one of members.
|
||||
function isListElement(parent: Node, node: Node): boolean {
|
||||
@@ -198,7 +198,7 @@ namespace ts.formatting {
|
||||
if (!errors.length) {
|
||||
return rangeHasNoErrors;
|
||||
}
|
||||
|
||||
|
||||
// pick only errors that fall in range
|
||||
let sorted = errors
|
||||
.filter(d => rangeOverlapsWithStartEnd(originalRange, d.start, d.start + d.length))
|
||||
@@ -341,6 +341,14 @@ namespace ts.formatting {
|
||||
processNode(enclosingNode, enclosingNode, startLine, undecoratedStartLine, initialIndentation, delta);
|
||||
}
|
||||
|
||||
if (!formattingScanner.isOnToken()) {
|
||||
let leadingTrivia = formattingScanner.getCurrentLeadingTrivia();
|
||||
if (leadingTrivia) {
|
||||
processTrivia(leadingTrivia, enclosingNode, enclosingNode, undefined);
|
||||
trimTrailingWhitespacesForRemainingRange();
|
||||
}
|
||||
}
|
||||
|
||||
formattingScanner.close();
|
||||
|
||||
return edits;
|
||||
@@ -360,7 +368,9 @@ namespace ts.formatting {
|
||||
range: TextRange,
|
||||
inheritedIndentation: number): number {
|
||||
|
||||
if (rangeOverlapsWithStartEnd(range, startPos, endPos)) {
|
||||
if (rangeOverlapsWithStartEnd(range, startPos, endPos) ||
|
||||
rangeContainsStartEnd(range, startPos, endPos) /* Not to miss zero-range nodes e.g. JsxText */) {
|
||||
|
||||
if (inheritedIndentation !== Constants.Unknown) {
|
||||
return inheritedIndentation;
|
||||
}
|
||||
@@ -826,9 +836,7 @@ namespace ts.formatting {
|
||||
}
|
||||
|
||||
// We need to trim trailing whitespace between the tokens if they were on different lines, and no rule was applied to put them on the same line
|
||||
trimTrailingWhitespaces =
|
||||
(rule.Operation.Action & (RuleAction.NewLine | RuleAction.Space)) &&
|
||||
rule.Flag !== RuleFlags.CanDeleteNewLines;
|
||||
trimTrailingWhitespaces = !(rule.Operation.Action & RuleAction.Delete) && rule.Flag !== RuleFlags.CanDeleteNewLines;
|
||||
}
|
||||
else {
|
||||
trimTrailingWhitespaces = true;
|
||||
@@ -927,17 +935,41 @@ namespace ts.formatting {
|
||||
continue;
|
||||
}
|
||||
|
||||
let pos = lineEndPosition;
|
||||
while (pos >= lineStartPosition && isWhiteSpace(sourceFile.text.charCodeAt(pos))) {
|
||||
pos--;
|
||||
}
|
||||
if (pos !== lineEndPosition) {
|
||||
Debug.assert(pos === lineStartPosition || !isWhiteSpace(sourceFile.text.charCodeAt(pos)));
|
||||
recordDelete(pos + 1, lineEndPosition - pos);
|
||||
let whitespaceStart = getTrailingWhitespaceStartPosition(lineStartPosition, lineEndPosition);
|
||||
if (whitespaceStart !== -1) {
|
||||
Debug.assert(whitespaceStart === lineStartPosition || !isWhiteSpace(sourceFile.text.charCodeAt(whitespaceStart - 1)));
|
||||
recordDelete(whitespaceStart, lineEndPosition + 1 - whitespaceStart);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param start The position of the first character in range
|
||||
* @param end The position of the last character in range
|
||||
*/
|
||||
function getTrailingWhitespaceStartPosition(start: number, end: number) {
|
||||
let pos = end;
|
||||
while (pos >= start && isWhiteSpace(sourceFile.text.charCodeAt(pos))) {
|
||||
pos--;
|
||||
}
|
||||
if (pos !== end) {
|
||||
return pos + 1;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Trimming will be done for lines after the previous range
|
||||
*/
|
||||
function trimTrailingWhitespacesForRemainingRange() {
|
||||
let startPosition = previousRange ? previousRange.end : originalRange.pos;
|
||||
|
||||
let startLine = sourceFile.getLineAndCharacterOfPosition(startPosition).line;
|
||||
let endLine = sourceFile.getLineAndCharacterOfPosition(originalRange.end).line;
|
||||
|
||||
trimTrailingWhitespacesForLines(startLine, endLine + 1, previousRange);
|
||||
}
|
||||
|
||||
function newTextChange(start: number, len: number, newText: string): TextChange {
|
||||
return { span: createTextSpan(start, len), newText }
|
||||
}
|
||||
|
||||
@@ -5,21 +5,22 @@
|
||||
namespace ts.formatting {
|
||||
const standardScanner = createScanner(ScriptTarget.Latest, /*skipTrivia*/ false, LanguageVariant.Standard);
|
||||
const jsxScanner = createScanner(ScriptTarget.Latest, /*skipTrivia*/ false, LanguageVariant.JSX);
|
||||
|
||||
|
||||
/**
|
||||
* Scanner that is currently used for formatting
|
||||
*/
|
||||
let scanner: Scanner;
|
||||
|
||||
|
||||
export interface FormattingScanner {
|
||||
advance(): void;
|
||||
isOnToken(): boolean;
|
||||
readTokenInfo(n: Node): TokenInfo;
|
||||
getCurrentLeadingTrivia(): TextRangeWithKind[];
|
||||
lastTrailingTriviaWasNewLine(): boolean;
|
||||
close(): void;
|
||||
}
|
||||
|
||||
const enum ScanAction{
|
||||
const enum ScanAction {
|
||||
Scan,
|
||||
RescanGreaterThanToken,
|
||||
RescanSlashToken,
|
||||
@@ -37,19 +38,20 @@ namespace ts.formatting {
|
||||
let wasNewLine: boolean = true;
|
||||
let leadingTrivia: TextRangeWithKind[];
|
||||
let trailingTrivia: TextRangeWithKind[];
|
||||
|
||||
|
||||
let savedPos: number;
|
||||
let lastScanAction: ScanAction;
|
||||
let lastTokenInfo: TokenInfo;
|
||||
|
||||
return {
|
||||
advance: advance,
|
||||
readTokenInfo: readTokenInfo,
|
||||
isOnToken: isOnToken,
|
||||
advance,
|
||||
readTokenInfo,
|
||||
isOnToken,
|
||||
getCurrentLeadingTrivia: () => leadingTrivia,
|
||||
lastTrailingTriviaWasNewLine: () => wasNewLine,
|
||||
close: () => {
|
||||
Debug.assert(scanner !== undefined);
|
||||
|
||||
|
||||
lastTokenInfo = undefined;
|
||||
scanner.setText(undefined);
|
||||
scanner = undefined;
|
||||
@@ -58,7 +60,7 @@ namespace ts.formatting {
|
||||
|
||||
function advance(): void {
|
||||
Debug.assert(scanner !== undefined);
|
||||
|
||||
|
||||
lastTokenInfo = undefined;
|
||||
let isStarted = scanner.getStartPos() !== startPos;
|
||||
|
||||
@@ -81,7 +83,7 @@ namespace ts.formatting {
|
||||
|
||||
let t: SyntaxKind;
|
||||
let pos = scanner.getStartPos();
|
||||
|
||||
|
||||
// Read leading trivia and token
|
||||
while (pos < endPos) {
|
||||
let t = scanner.getToken();
|
||||
@@ -122,10 +124,10 @@ namespace ts.formatting {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function shouldRescanJsxIdentifier(node: Node): boolean {
|
||||
if (node.parent) {
|
||||
switch(node.parent.kind) {
|
||||
switch (node.parent.kind) {
|
||||
case SyntaxKind.JsxAttribute:
|
||||
case SyntaxKind.JsxOpeningElement:
|
||||
case SyntaxKind.JsxClosingElement:
|
||||
@@ -133,7 +135,7 @@ namespace ts.formatting {
|
||||
return node.kind === SyntaxKind.Identifier;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -142,7 +144,7 @@ namespace ts.formatting {
|
||||
}
|
||||
|
||||
function shouldRescanTemplateToken(container: Node): boolean {
|
||||
return container.kind === SyntaxKind.TemplateMiddle ||
|
||||
return container.kind === SyntaxKind.TemplateMiddle ||
|
||||
container.kind === SyntaxKind.TemplateTail;
|
||||
}
|
||||
|
||||
@@ -152,11 +154,11 @@ namespace ts.formatting {
|
||||
|
||||
function readTokenInfo(n: Node): TokenInfo {
|
||||
Debug.assert(scanner !== undefined);
|
||||
|
||||
|
||||
if (!isOnToken()) {
|
||||
// scanner is not on the token (either advance was not called yet or scanner is already past the end position)
|
||||
return {
|
||||
leadingTrivia: leadingTrivia,
|
||||
leadingTrivia,
|
||||
trailingTrivia: undefined,
|
||||
token: undefined
|
||||
};
|
||||
@@ -164,7 +166,7 @@ namespace ts.formatting {
|
||||
|
||||
// normally scanner returns the smallest available token
|
||||
// check the kind of context node to determine if scanner should have more greedy behavior and consume more text.
|
||||
let expectedScanAction =
|
||||
let expectedScanAction =
|
||||
shouldRescanGreaterThanToken(n)
|
||||
? ScanAction.RescanGreaterThanToken
|
||||
: shouldRescanSlashToken(n)
|
||||
@@ -226,7 +228,7 @@ namespace ts.formatting {
|
||||
if (trailingTrivia) {
|
||||
trailingTrivia = undefined;
|
||||
}
|
||||
while(scanner.getStartPos() < endPos) {
|
||||
while (scanner.getStartPos() < endPos) {
|
||||
currentToken = scanner.scan();
|
||||
if (!isTrivia(currentToken)) {
|
||||
break;
|
||||
@@ -261,7 +263,7 @@ namespace ts.formatting {
|
||||
|
||||
function isOnToken(): boolean {
|
||||
Debug.assert(scanner !== undefined);
|
||||
|
||||
|
||||
let current = (lastTokenInfo && lastTokenInfo.token.kind) || scanner.getToken();
|
||||
let startPos = (lastTokenInfo && lastTokenInfo.token.pos) || scanner.getStartPos();
|
||||
return startPos < endPos && current !== SyntaxKind.EndOfFileToken && !isTrivia(current);
|
||||
|
||||
@@ -219,9 +219,11 @@ namespace ts.formatting {
|
||||
public SpaceBetweenAsyncAndFunctionKeyword: Rule;
|
||||
|
||||
// Template strings
|
||||
public SpaceBetweenTagAndTemplateString: Rule;
|
||||
public NoSpaceBetweenTagAndTemplateString: Rule;
|
||||
public NoSpaceAfterTemplateHeadAndMiddle: Rule;
|
||||
public SpaceAfterTemplateHeadAndMiddle: Rule;
|
||||
public NoSpaceBeforeTemplateMiddleAndTail: Rule;
|
||||
public SpaceBeforeTemplateMiddleAndTail: Rule;
|
||||
|
||||
constructor() {
|
||||
///
|
||||
@@ -376,9 +378,7 @@ namespace ts.formatting {
|
||||
this.SpaceBetweenAsyncAndFunctionKeyword = new Rule(RuleDescriptor.create1(SyntaxKind.AsyncKeyword, SyntaxKind.FunctionKeyword), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space));
|
||||
|
||||
// template string
|
||||
this.SpaceBetweenTagAndTemplateString = new Rule(RuleDescriptor.create3(SyntaxKind.Identifier, Shared.TokenRange.FromTokens([SyntaxKind.NoSubstitutionTemplateLiteral, SyntaxKind.TemplateHead])), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space));
|
||||
this.NoSpaceAfterTemplateHeadAndMiddle = new Rule(RuleDescriptor.create4(Shared.TokenRange.FromTokens([SyntaxKind.TemplateHead, SyntaxKind.TemplateMiddle]), Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete));
|
||||
this.NoSpaceBeforeTemplateMiddleAndTail = new Rule(RuleDescriptor.create4(Shared.TokenRange.Any, Shared.TokenRange.FromTokens([SyntaxKind.TemplateMiddle, SyntaxKind.TemplateTail])), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete));
|
||||
this.NoSpaceBetweenTagAndTemplateString = new Rule(RuleDescriptor.create3(SyntaxKind.Identifier, Shared.TokenRange.FromTokens([SyntaxKind.NoSubstitutionTemplateLiteral, SyntaxKind.TemplateHead])), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete));
|
||||
|
||||
// These rules are higher in priority than user-configurable rules.
|
||||
this.HighPriorityCommonRules = [
|
||||
@@ -406,7 +406,7 @@ namespace ts.formatting {
|
||||
this.SpaceBeforeBinaryKeywordOperator, this.SpaceAfterBinaryKeywordOperator,
|
||||
this.SpaceAfterVoidOperator,
|
||||
this.SpaceBetweenAsyncAndOpenParen, this.SpaceBetweenAsyncAndFunctionKeyword,
|
||||
this.SpaceBetweenTagAndTemplateString, this.NoSpaceAfterTemplateHeadAndMiddle, this.NoSpaceBeforeTemplateMiddleAndTail,
|
||||
this.NoSpaceBetweenTagAndTemplateString,
|
||||
|
||||
// TypeScript-specific rules
|
||||
this.NoSpaceAfterConstructor, this.NoSpaceAfterModuleImport,
|
||||
@@ -444,7 +444,7 @@ namespace ts.formatting {
|
||||
///
|
||||
|
||||
// Insert space after comma delimiter
|
||||
this.SpaceAfterComma = new Rule(RuleDescriptor.create3(SyntaxKind.CommaToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space));
|
||||
this.SpaceAfterComma = new Rule(RuleDescriptor.create3(SyntaxKind.CommaToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNextTokenNotCloseBracket), RuleAction.Space));
|
||||
this.NoSpaceAfterComma = new Rule(RuleDescriptor.create3(SyntaxKind.CommaToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete));
|
||||
|
||||
// Insert space before and after binary operators
|
||||
@@ -485,6 +485,12 @@ namespace ts.formatting {
|
||||
this.NoSpaceAfterOpenBracket = new Rule(RuleDescriptor.create3(SyntaxKind.OpenBracketToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete));
|
||||
this.NoSpaceBeforeCloseBracket = new Rule(RuleDescriptor.create2(Shared.TokenRange.Any, SyntaxKind.CloseBracketToken), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete));
|
||||
|
||||
// Insert space after opening and before closing template string braces
|
||||
this.NoSpaceAfterTemplateHeadAndMiddle = new Rule(RuleDescriptor.create4(Shared.TokenRange.FromTokens([SyntaxKind.TemplateHead, SyntaxKind.TemplateMiddle]), Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete));
|
||||
this.SpaceAfterTemplateHeadAndMiddle = new Rule(RuleDescriptor.create4(Shared.TokenRange.FromTokens([SyntaxKind.TemplateHead, SyntaxKind.TemplateMiddle]), Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space));
|
||||
this.NoSpaceBeforeTemplateMiddleAndTail = new Rule(RuleDescriptor.create4(Shared.TokenRange.Any, Shared.TokenRange.FromTokens([SyntaxKind.TemplateMiddle, SyntaxKind.TemplateTail])), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete));
|
||||
this.SpaceBeforeTemplateMiddleAndTail = new Rule(RuleDescriptor.create4(Shared.TokenRange.Any, Shared.TokenRange.FromTokens([SyntaxKind.TemplateMiddle, SyntaxKind.TemplateTail])), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space));
|
||||
|
||||
// Insert space after function keyword for anonymous functions
|
||||
this.SpaceAfterAnonymousFunctionKeyword = new Rule(RuleDescriptor.create1(SyntaxKind.FunctionKeyword, SyntaxKind.OpenParenToken), RuleOperation.create2(new RuleOperationContext(Rules.IsFunctionDeclContext), RuleAction.Space));
|
||||
this.NoSpaceAfterAnonymousFunctionKeyword = new Rule(RuleDescriptor.create1(SyntaxKind.FunctionKeyword, SyntaxKind.OpenParenToken), RuleOperation.create2(new RuleOperationContext(Rules.IsFunctionDeclContext), RuleAction.Delete));
|
||||
@@ -705,6 +711,10 @@ namespace ts.formatting {
|
||||
return context.currentTokenSpan.kind !== SyntaxKind.CommaToken;
|
||||
}
|
||||
|
||||
static IsNextTokenNotCloseBracket(context: FormattingContext): boolean {
|
||||
return context.nextTokenSpan.kind !== SyntaxKind.CloseBracketToken;
|
||||
}
|
||||
|
||||
static IsArrowFunctionContext(context: FormattingContext): boolean {
|
||||
return context.contextNode.kind === SyntaxKind.ArrowFunction;
|
||||
}
|
||||
|
||||
@@ -71,15 +71,24 @@ namespace ts.formatting {
|
||||
rules.push(this.globalRules.NoSpaceBetweenParens);
|
||||
}
|
||||
|
||||
if ( options.InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets ) {
|
||||
rules.push( this.globalRules.SpaceAfterOpenBracket );
|
||||
rules.push( this.globalRules.SpaceBeforeCloseBracket );
|
||||
rules.push( this.globalRules.NoSpaceBetweenBrackets );
|
||||
if (options.InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets) {
|
||||
rules.push(this.globalRules.SpaceAfterOpenBracket);
|
||||
rules.push(this.globalRules.SpaceBeforeCloseBracket);
|
||||
rules.push(this.globalRules.NoSpaceBetweenBrackets);
|
||||
}
|
||||
else {
|
||||
rules.push( this.globalRules.NoSpaceAfterOpenBracket );
|
||||
rules.push( this.globalRules.NoSpaceBeforeCloseBracket );
|
||||
rules.push( this.globalRules.NoSpaceBetweenBrackets );
|
||||
rules.push(this.globalRules.NoSpaceAfterOpenBracket);
|
||||
rules.push(this.globalRules.NoSpaceBeforeCloseBracket);
|
||||
rules.push(this.globalRules.NoSpaceBetweenBrackets);
|
||||
}
|
||||
|
||||
if (options.InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces) {
|
||||
rules.push(this.globalRules.SpaceAfterTemplateHeadAndMiddle);
|
||||
rules.push(this.globalRules.SpaceBeforeTemplateMiddleAndTail);
|
||||
}
|
||||
else {
|
||||
rules.push(this.globalRules.NoSpaceAfterTemplateHeadAndMiddle);
|
||||
rules.push(this.globalRules.NoSpaceBeforeTemplateMiddleAndTail);
|
||||
}
|
||||
|
||||
if (options.InsertSpaceAfterSemicolonInForStatements) {
|
||||
|
||||
@@ -450,8 +450,9 @@ namespace ts.formatting {
|
||||
case SyntaxKind.ConditionalExpression:
|
||||
case SyntaxKind.ArrayBindingPattern:
|
||||
case SyntaxKind.ObjectBindingPattern:
|
||||
case SyntaxKind.JsxElement:
|
||||
case SyntaxKind.JsxOpeningElement:
|
||||
case SyntaxKind.JsxSelfClosingElement:
|
||||
case SyntaxKind.JsxExpression:
|
||||
case SyntaxKind.MethodSignature:
|
||||
case SyntaxKind.CallSignature:
|
||||
case SyntaxKind.ConstructSignature:
|
||||
@@ -467,6 +468,7 @@ namespace ts.formatting {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export function nodeWillIndentChild(parent: TextRangeWithKind, child: TextRangeWithKind, indentByDefault: boolean) {
|
||||
let childKind = child ? child.kind : SyntaxKind.Unknown;
|
||||
switch (parent.kind) {
|
||||
@@ -484,6 +486,8 @@ namespace ts.formatting {
|
||||
case SyntaxKind.GetAccessor:
|
||||
case SyntaxKind.SetAccessor:
|
||||
return childKind !== SyntaxKind.Block;
|
||||
case SyntaxKind.JsxElement:
|
||||
return childKind !== SyntaxKind.JsxClosingElement;
|
||||
}
|
||||
// No explicit rule for given nodes so the result will follow the default value argument
|
||||
return indentByDefault;
|
||||
|
||||
+24
-24
@@ -3,19 +3,19 @@ namespace ts.NavigateTo {
|
||||
type RawNavigateToItem = { name: string; fileName: string; matchKind: PatternMatchKind; isCaseSensitive: boolean; declaration: Declaration };
|
||||
|
||||
export function getNavigateToItems(program: Program, cancellationToken: CancellationToken, searchValue: string, maxResultCount: number): NavigateToItem[] {
|
||||
let patternMatcher = createPatternMatcher(searchValue);
|
||||
const patternMatcher = createPatternMatcher(searchValue);
|
||||
let rawItems: RawNavigateToItem[] = [];
|
||||
|
||||
// This means "compare in a case insensitive manner."
|
||||
let baseSensitivity: Intl.CollatorOptions = { sensitivity: "base" };
|
||||
const baseSensitivity: Intl.CollatorOptions = { sensitivity: "base" };
|
||||
|
||||
// Search the declarations in all files and output matched NavigateToItem into array of NavigateToItem[]
|
||||
forEach(program.getSourceFiles(), sourceFile => {
|
||||
cancellationToken.throwIfCancellationRequested();
|
||||
|
||||
let nameToDeclarations = sourceFile.getNamedDeclarations();
|
||||
for (let name in nameToDeclarations) {
|
||||
let declarations = getProperty(nameToDeclarations, name);
|
||||
const nameToDeclarations = sourceFile.getNamedDeclarations();
|
||||
for (const name in nameToDeclarations) {
|
||||
const declarations = getProperty(nameToDeclarations, name);
|
||||
if (declarations) {
|
||||
// First do a quick check to see if the name of the declaration matches the
|
||||
// last portion of the (possibly) dotted name they're searching for.
|
||||
@@ -25,11 +25,11 @@ namespace ts.NavigateTo {
|
||||
continue;
|
||||
}
|
||||
|
||||
for (let declaration of declarations) {
|
||||
for (const declaration of declarations) {
|
||||
// It was a match! If the pattern has dots in it, then also see if the
|
||||
// declaration container matches as well.
|
||||
if (patternMatcher.patternContainsDots) {
|
||||
let containers = getContainers(declaration);
|
||||
const containers = getContainers(declaration);
|
||||
if (!containers) {
|
||||
return undefined;
|
||||
}
|
||||
@@ -41,8 +41,8 @@ namespace ts.NavigateTo {
|
||||
}
|
||||
}
|
||||
|
||||
let fileName = sourceFile.fileName;
|
||||
let matchKind = bestMatchKind(matches);
|
||||
const fileName = sourceFile.fileName;
|
||||
const matchKind = bestMatchKind(matches);
|
||||
rawItems.push({ name, fileName, matchKind, isCaseSensitive: allMatchesAreCaseSensitive(matches), declaration });
|
||||
}
|
||||
}
|
||||
@@ -54,7 +54,7 @@ namespace ts.NavigateTo {
|
||||
rawItems = rawItems.slice(0, maxResultCount);
|
||||
}
|
||||
|
||||
let items = map(rawItems, createNavigateToItem);
|
||||
const items = map(rawItems, createNavigateToItem);
|
||||
|
||||
return items;
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace ts.NavigateTo {
|
||||
Debug.assert(matches.length > 0);
|
||||
|
||||
// This is a case sensitive match, only if all the submatches were case sensitive.
|
||||
for (let match of matches) {
|
||||
for (const match of matches) {
|
||||
if (!match.isCaseSensitive) {
|
||||
return false;
|
||||
}
|
||||
@@ -86,16 +86,16 @@ namespace ts.NavigateTo {
|
||||
|
||||
function tryAddSingleDeclarationName(declaration: Declaration, containers: string[]) {
|
||||
if (declaration && declaration.name) {
|
||||
let text = getTextOfIdentifierOrLiteral(declaration.name);
|
||||
const text = getTextOfIdentifierOrLiteral(declaration.name);
|
||||
if (text !== undefined) {
|
||||
containers.unshift(text);
|
||||
}
|
||||
else if (declaration.name.kind === SyntaxKind.ComputedPropertyName) {
|
||||
return tryAddComputedPropertyName((<ComputedPropertyName>declaration.name).expression, containers, /*includeLastPortion:*/ true);
|
||||
return tryAddComputedPropertyName((<ComputedPropertyName>declaration.name).expression, containers, /*includeLastPortion*/ true);
|
||||
}
|
||||
else {
|
||||
// Don't know how to add this.
|
||||
return false
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ namespace ts.NavigateTo {
|
||||
//
|
||||
// [X.Y.Z]() { }
|
||||
function tryAddComputedPropertyName(expression: Expression, containers: string[], includeLastPortion: boolean): boolean {
|
||||
let text = getTextOfIdentifierOrLiteral(expression);
|
||||
const text = getTextOfIdentifierOrLiteral(expression);
|
||||
if (text !== undefined) {
|
||||
if (includeLastPortion) {
|
||||
containers.unshift(text);
|
||||
@@ -115,24 +115,24 @@ namespace ts.NavigateTo {
|
||||
}
|
||||
|
||||
if (expression.kind === SyntaxKind.PropertyAccessExpression) {
|
||||
let propertyAccess = <PropertyAccessExpression>expression;
|
||||
const propertyAccess = <PropertyAccessExpression>expression;
|
||||
if (includeLastPortion) {
|
||||
containers.unshift(propertyAccess.name.text);
|
||||
}
|
||||
|
||||
return tryAddComputedPropertyName(propertyAccess.expression, containers, /*includeLastPortion:*/ true);
|
||||
return tryAddComputedPropertyName(propertyAccess.expression, containers, /*includeLastPortion*/ true);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function getContainers(declaration: Declaration) {
|
||||
let containers: string[] = [];
|
||||
const containers: string[] = [];
|
||||
|
||||
// First, if we started with a computed property name, then add all but the last
|
||||
// portion into the container array.
|
||||
if (declaration.name.kind === SyntaxKind.ComputedPropertyName) {
|
||||
if (!tryAddComputedPropertyName((<ComputedPropertyName>declaration.name).expression, containers, /*includeLastPortion:*/ false)) {
|
||||
if (!tryAddComputedPropertyName((<ComputedPropertyName>declaration.name).expression, containers, /*includeLastPortion*/ false)) {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
@@ -155,8 +155,8 @@ namespace ts.NavigateTo {
|
||||
Debug.assert(matches.length > 0);
|
||||
let bestMatchKind = PatternMatchKind.camelCase;
|
||||
|
||||
for (let match of matches) {
|
||||
let kind = match.kind;
|
||||
for (const match of matches) {
|
||||
const kind = match.kind;
|
||||
if (kind < bestMatchKind) {
|
||||
bestMatchKind = kind;
|
||||
}
|
||||
@@ -171,13 +171,13 @@ namespace ts.NavigateTo {
|
||||
// We first sort case insensitively. So "Aaa" will come before "bar".
|
||||
// Then we sort case sensitively, so "aaa" will come before "Aaa".
|
||||
return i1.matchKind - i2.matchKind ||
|
||||
i1.name.localeCompare(i2.name, undefined, baseSensitivity) ||
|
||||
i1.name.localeCompare(i2.name, undefined, baseSensitivity) ||
|
||||
i1.name.localeCompare(i2.name);
|
||||
}
|
||||
|
||||
function createNavigateToItem(rawItem: RawNavigateToItem): NavigateToItem {
|
||||
let declaration = rawItem.declaration;
|
||||
let container = <Declaration>getContainerNode(declaration);
|
||||
const declaration = rawItem.declaration;
|
||||
const container = <Declaration>getContainerNode(declaration);
|
||||
return {
|
||||
name: rawItem.name,
|
||||
kind: getNodeKind(declaration),
|
||||
|
||||
@@ -1,180 +1,179 @@
|
||||
/* @internal */
|
||||
namespace ts {
|
||||
export module OutliningElementsCollector {
|
||||
export function collectElements(sourceFile: SourceFile): OutliningSpan[] {
|
||||
let elements: OutliningSpan[] = [];
|
||||
let collapseText = "...";
|
||||
namespace ts.OutliningElementsCollector {
|
||||
export function collectElements(sourceFile: SourceFile): OutliningSpan[] {
|
||||
const elements: OutliningSpan[] = [];
|
||||
const collapseText = "...";
|
||||
|
||||
function addOutliningSpan(hintSpanNode: Node, startElement: Node, endElement: Node, autoCollapse: boolean) {
|
||||
if (hintSpanNode && startElement && endElement) {
|
||||
let span: OutliningSpan = {
|
||||
textSpan: createTextSpanFromBounds(startElement.pos, endElement.end),
|
||||
hintSpan: createTextSpanFromBounds(hintSpanNode.getStart(), hintSpanNode.end),
|
||||
bannerText: collapseText,
|
||||
autoCollapse: autoCollapse
|
||||
};
|
||||
elements.push(span);
|
||||
}
|
||||
function addOutliningSpan(hintSpanNode: Node, startElement: Node, endElement: Node, autoCollapse: boolean) {
|
||||
if (hintSpanNode && startElement && endElement) {
|
||||
const span: OutliningSpan = {
|
||||
textSpan: createTextSpanFromBounds(startElement.pos, endElement.end),
|
||||
hintSpan: createTextSpanFromBounds(hintSpanNode.getStart(), hintSpanNode.end),
|
||||
bannerText: collapseText,
|
||||
autoCollapse: autoCollapse
|
||||
};
|
||||
elements.push(span);
|
||||
}
|
||||
}
|
||||
|
||||
function addOutliningSpanComments(commentSpan: CommentRange, autoCollapse: boolean) {
|
||||
if (commentSpan) {
|
||||
let span: OutliningSpan = {
|
||||
textSpan: createTextSpanFromBounds(commentSpan.pos, commentSpan.end),
|
||||
hintSpan: createTextSpanFromBounds(commentSpan.pos, commentSpan.end),
|
||||
bannerText: collapseText,
|
||||
autoCollapse: autoCollapse
|
||||
};
|
||||
elements.push(span);
|
||||
}
|
||||
function addOutliningSpanComments(commentSpan: CommentRange, autoCollapse: boolean) {
|
||||
if (commentSpan) {
|
||||
const span: OutliningSpan = {
|
||||
textSpan: createTextSpanFromBounds(commentSpan.pos, commentSpan.end),
|
||||
hintSpan: createTextSpanFromBounds(commentSpan.pos, commentSpan.end),
|
||||
bannerText: collapseText,
|
||||
autoCollapse: autoCollapse
|
||||
};
|
||||
elements.push(span);
|
||||
}
|
||||
}
|
||||
|
||||
function addOutliningForLeadingCommentsForNode(n: Node) {
|
||||
let comments = ts.getLeadingCommentRangesOfNode(n, sourceFile);
|
||||
function addOutliningForLeadingCommentsForNode(n: Node) {
|
||||
const comments = ts.getLeadingCommentRangesOfNode(n, sourceFile);
|
||||
|
||||
if (comments) {
|
||||
let firstSingleLineCommentStart = -1;
|
||||
let lastSingleLineCommentEnd = -1;
|
||||
let isFirstSingleLineComment = true;
|
||||
let singleLineCommentCount = 0;
|
||||
if (comments) {
|
||||
let firstSingleLineCommentStart = -1;
|
||||
let lastSingleLineCommentEnd = -1;
|
||||
let isFirstSingleLineComment = true;
|
||||
let singleLineCommentCount = 0;
|
||||
|
||||
for (let currentComment of comments) {
|
||||
for (const currentComment of comments) {
|
||||
|
||||
// For single line comments, combine consecutive ones (2 or more) into
|
||||
// a single span from the start of the first till the end of the last
|
||||
if (currentComment.kind === SyntaxKind.SingleLineCommentTrivia) {
|
||||
if (isFirstSingleLineComment) {
|
||||
firstSingleLineCommentStart = currentComment.pos;
|
||||
}
|
||||
isFirstSingleLineComment = false;
|
||||
lastSingleLineCommentEnd = currentComment.end;
|
||||
singleLineCommentCount++;
|
||||
// For single line comments, combine consecutive ones (2 or more) into
|
||||
// a single span from the start of the first till the end of the last
|
||||
if (currentComment.kind === SyntaxKind.SingleLineCommentTrivia) {
|
||||
if (isFirstSingleLineComment) {
|
||||
firstSingleLineCommentStart = currentComment.pos;
|
||||
}
|
||||
else if (currentComment.kind === SyntaxKind.MultiLineCommentTrivia) {
|
||||
combineAndAddMultipleSingleLineComments(singleLineCommentCount, firstSingleLineCommentStart, lastSingleLineCommentEnd);
|
||||
addOutliningSpanComments(currentComment, /*autoCollapse*/ false);
|
||||
isFirstSingleLineComment = false;
|
||||
lastSingleLineCommentEnd = currentComment.end;
|
||||
singleLineCommentCount++;
|
||||
}
|
||||
else if (currentComment.kind === SyntaxKind.MultiLineCommentTrivia) {
|
||||
combineAndAddMultipleSingleLineComments(singleLineCommentCount, firstSingleLineCommentStart, lastSingleLineCommentEnd);
|
||||
addOutliningSpanComments(currentComment, /*autoCollapse*/ false);
|
||||
|
||||
singleLineCommentCount = 0;
|
||||
lastSingleLineCommentEnd = -1;
|
||||
isFirstSingleLineComment = true;
|
||||
singleLineCommentCount = 0;
|
||||
lastSingleLineCommentEnd = -1;
|
||||
isFirstSingleLineComment = true;
|
||||
}
|
||||
}
|
||||
|
||||
combineAndAddMultipleSingleLineComments(singleLineCommentCount, firstSingleLineCommentStart, lastSingleLineCommentEnd);
|
||||
}
|
||||
}
|
||||
|
||||
function combineAndAddMultipleSingleLineComments(count: number, start: number, end: number) {
|
||||
|
||||
// Only outline spans of two or more consecutive single line comments
|
||||
if (count > 1) {
|
||||
const multipleSingleLineComments = {
|
||||
pos: start,
|
||||
end: end,
|
||||
kind: SyntaxKind.SingleLineCommentTrivia
|
||||
};
|
||||
|
||||
addOutliningSpanComments(multipleSingleLineComments, /*autoCollapse*/ false);
|
||||
}
|
||||
}
|
||||
|
||||
function autoCollapse(node: Node) {
|
||||
return isFunctionBlock(node) && node.parent.kind !== SyntaxKind.ArrowFunction;
|
||||
}
|
||||
|
||||
let depth = 0;
|
||||
const maxDepth = 20;
|
||||
function walk(n: Node): void {
|
||||
if (depth > maxDepth) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isDeclaration(n)) {
|
||||
addOutliningForLeadingCommentsForNode(n);
|
||||
}
|
||||
|
||||
switch (n.kind) {
|
||||
case SyntaxKind.Block:
|
||||
if (!isFunctionBlock(n)) {
|
||||
const parent = n.parent;
|
||||
const openBrace = findChildOfKind(n, SyntaxKind.OpenBraceToken, sourceFile);
|
||||
const closeBrace = findChildOfKind(n, SyntaxKind.CloseBraceToken, sourceFile);
|
||||
|
||||
// Check if the block is standalone, or 'attached' to some parent statement.
|
||||
// If the latter, we want to collaps the block, but consider its hint span
|
||||
// to be the entire span of the parent.
|
||||
if (parent.kind === SyntaxKind.DoStatement ||
|
||||
parent.kind === SyntaxKind.ForInStatement ||
|
||||
parent.kind === SyntaxKind.ForOfStatement ||
|
||||
parent.kind === SyntaxKind.ForStatement ||
|
||||
parent.kind === SyntaxKind.IfStatement ||
|
||||
parent.kind === SyntaxKind.WhileStatement ||
|
||||
parent.kind === SyntaxKind.WithStatement ||
|
||||
parent.kind === SyntaxKind.CatchClause) {
|
||||
|
||||
addOutliningSpan(parent, openBrace, closeBrace, autoCollapse(n));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
combineAndAddMultipleSingleLineComments(singleLineCommentCount, firstSingleLineCommentStart, lastSingleLineCommentEnd);
|
||||
}
|
||||
}
|
||||
|
||||
function combineAndAddMultipleSingleLineComments(count: number, start: number, end: number) {
|
||||
// Only outline spans of two or more consecutive single line comments
|
||||
if (count > 1) {
|
||||
let multipleSingleLineComments = {
|
||||
pos: start,
|
||||
end: end,
|
||||
kind: SyntaxKind.SingleLineCommentTrivia
|
||||
}
|
||||
|
||||
addOutliningSpanComments(multipleSingleLineComments, /*autoCollapse*/ false);
|
||||
}
|
||||
}
|
||||
|
||||
function autoCollapse(node: Node) {
|
||||
return isFunctionBlock(node) && node.parent.kind !== SyntaxKind.ArrowFunction;
|
||||
}
|
||||
|
||||
let depth = 0;
|
||||
let maxDepth = 20;
|
||||
function walk(n: Node): void {
|
||||
if (depth > maxDepth) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isDeclaration(n)) {
|
||||
addOutliningForLeadingCommentsForNode(n);
|
||||
}
|
||||
|
||||
switch (n.kind) {
|
||||
case SyntaxKind.Block:
|
||||
if (!isFunctionBlock(n)) {
|
||||
let parent = n.parent;
|
||||
let openBrace = findChildOfKind(n, SyntaxKind.OpenBraceToken, sourceFile);
|
||||
let closeBrace = findChildOfKind(n, SyntaxKind.CloseBraceToken, sourceFile);
|
||||
|
||||
// Check if the block is standalone, or 'attached' to some parent statement.
|
||||
// If the latter, we want to collaps the block, but consider its hint span
|
||||
// to be the entire span of the parent.
|
||||
if (parent.kind === SyntaxKind.DoStatement ||
|
||||
parent.kind === SyntaxKind.ForInStatement ||
|
||||
parent.kind === SyntaxKind.ForOfStatement ||
|
||||
parent.kind === SyntaxKind.ForStatement ||
|
||||
parent.kind === SyntaxKind.IfStatement ||
|
||||
parent.kind === SyntaxKind.WhileStatement ||
|
||||
parent.kind === SyntaxKind.WithStatement ||
|
||||
parent.kind === SyntaxKind.CatchClause) {
|
||||
|
||||
if (parent.kind === SyntaxKind.TryStatement) {
|
||||
// Could be the try-block, or the finally-block.
|
||||
const tryStatement = <TryStatement>parent;
|
||||
if (tryStatement.tryBlock === n) {
|
||||
addOutliningSpan(parent, openBrace, closeBrace, autoCollapse(n));
|
||||
break;
|
||||
}
|
||||
|
||||
if (parent.kind === SyntaxKind.TryStatement) {
|
||||
// Could be the try-block, or the finally-block.
|
||||
let tryStatement = <TryStatement>parent;
|
||||
if (tryStatement.tryBlock === n) {
|
||||
addOutliningSpan(parent, openBrace, closeBrace, autoCollapse(n));
|
||||
else if (tryStatement.finallyBlock === n) {
|
||||
const finallyKeyword = findChildOfKind(tryStatement, SyntaxKind.FinallyKeyword, sourceFile);
|
||||
if (finallyKeyword) {
|
||||
addOutliningSpan(finallyKeyword, openBrace, closeBrace, autoCollapse(n));
|
||||
break;
|
||||
}
|
||||
else if (tryStatement.finallyBlock === n) {
|
||||
let finallyKeyword = findChildOfKind(tryStatement, SyntaxKind.FinallyKeyword, sourceFile);
|
||||
if (finallyKeyword) {
|
||||
addOutliningSpan(finallyKeyword, openBrace, closeBrace, autoCollapse(n));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// fall through.
|
||||
}
|
||||
|
||||
// Block was a standalone block. In this case we want to only collapse
|
||||
// the span of the block, independent of any parent span.
|
||||
let span = createTextSpanFromBounds(n.getStart(), n.end);
|
||||
elements.push({
|
||||
textSpan: span,
|
||||
hintSpan: span,
|
||||
bannerText: collapseText,
|
||||
autoCollapse: autoCollapse(n)
|
||||
});
|
||||
break;
|
||||
// fall through.
|
||||
}
|
||||
// Fallthrough.
|
||||
|
||||
case SyntaxKind.ModuleBlock: {
|
||||
let openBrace = findChildOfKind(n, SyntaxKind.OpenBraceToken, sourceFile);
|
||||
let closeBrace = findChildOfKind(n, SyntaxKind.CloseBraceToken, sourceFile);
|
||||
addOutliningSpan(n.parent, openBrace, closeBrace, autoCollapse(n));
|
||||
// Block was a standalone block. In this case we want to only collapse
|
||||
// the span of the block, independent of any parent span.
|
||||
const span = createTextSpanFromBounds(n.getStart(), n.end);
|
||||
elements.push({
|
||||
textSpan: span,
|
||||
hintSpan: span,
|
||||
bannerText: collapseText,
|
||||
autoCollapse: autoCollapse(n)
|
||||
});
|
||||
break;
|
||||
}
|
||||
case SyntaxKind.ClassDeclaration:
|
||||
case SyntaxKind.InterfaceDeclaration:
|
||||
case SyntaxKind.EnumDeclaration:
|
||||
case SyntaxKind.ObjectLiteralExpression:
|
||||
case SyntaxKind.CaseBlock: {
|
||||
let openBrace = findChildOfKind(n, SyntaxKind.OpenBraceToken, sourceFile);
|
||||
let closeBrace = findChildOfKind(n, SyntaxKind.CloseBraceToken, sourceFile);
|
||||
addOutliningSpan(n, openBrace, closeBrace, autoCollapse(n));
|
||||
break;
|
||||
}
|
||||
case SyntaxKind.ArrayLiteralExpression:
|
||||
let openBracket = findChildOfKind(n, SyntaxKind.OpenBracketToken, sourceFile);
|
||||
let closeBracket = findChildOfKind(n, SyntaxKind.CloseBracketToken, sourceFile);
|
||||
addOutliningSpan(n, openBracket, closeBracket, autoCollapse(n));
|
||||
break;
|
||||
// Fallthrough.
|
||||
|
||||
case SyntaxKind.ModuleBlock: {
|
||||
const openBrace = findChildOfKind(n, SyntaxKind.OpenBraceToken, sourceFile);
|
||||
const closeBrace = findChildOfKind(n, SyntaxKind.CloseBraceToken, sourceFile);
|
||||
addOutliningSpan(n.parent, openBrace, closeBrace, autoCollapse(n));
|
||||
break;
|
||||
}
|
||||
depth++;
|
||||
forEachChild(n, walk);
|
||||
depth--;
|
||||
case SyntaxKind.ClassDeclaration:
|
||||
case SyntaxKind.InterfaceDeclaration:
|
||||
case SyntaxKind.EnumDeclaration:
|
||||
case SyntaxKind.ObjectLiteralExpression:
|
||||
case SyntaxKind.CaseBlock: {
|
||||
const openBrace = findChildOfKind(n, SyntaxKind.OpenBraceToken, sourceFile);
|
||||
const closeBrace = findChildOfKind(n, SyntaxKind.CloseBraceToken, sourceFile);
|
||||
addOutliningSpan(n, openBrace, closeBrace, autoCollapse(n));
|
||||
break;
|
||||
}
|
||||
case SyntaxKind.ArrayLiteralExpression:
|
||||
const openBracket = findChildOfKind(n, SyntaxKind.OpenBracketToken, sourceFile);
|
||||
const closeBracket = findChildOfKind(n, SyntaxKind.CloseBracketToken, sourceFile);
|
||||
addOutliningSpan(n, openBracket, closeBracket, autoCollapse(n));
|
||||
break;
|
||||
}
|
||||
|
||||
walk(sourceFile);
|
||||
return elements;
|
||||
depth++;
|
||||
forEachChild(n, walk);
|
||||
depth--;
|
||||
}
|
||||
|
||||
walk(sourceFile);
|
||||
return elements;
|
||||
}
|
||||
}
|
||||
+82
-136
@@ -8,10 +8,10 @@ namespace ts {
|
||||
camelCase
|
||||
}
|
||||
|
||||
// Information about a match made by the pattern matcher between a candidate and the
|
||||
// Information about a match made by the pattern matcher between a candidate and the
|
||||
// search pattern.
|
||||
export interface PatternMatch {
|
||||
// What kind of match this was. Exact matches are better than prefix matches which are
|
||||
// What kind of match this was. Exact matches are better than prefix matches which are
|
||||
// better than substring matches which are better than CamelCase matches.
|
||||
kind: PatternMatchKind;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace ts {
|
||||
// it was a better match.
|
||||
camelCaseWeight?: number;
|
||||
|
||||
// If this was a match where all constituent parts of the candidate and search pattern
|
||||
// If this was a match where all constituent parts of the candidate and search pattern
|
||||
// matched case sensitively or case insensitively. Case sensitive matches of the kind
|
||||
// are better matches than insensitive matches.
|
||||
isCaseSensitive: boolean;
|
||||
@@ -35,7 +35,7 @@ namespace ts {
|
||||
// once you no longer need it.
|
||||
export interface PatternMatcher {
|
||||
// Used to match a candidate against the last segment of a possibly dotted pattern. This
|
||||
// is useful as a quick check to prevent having to compute a container before calling
|
||||
// is useful as a quick check to prevent having to compute a container before calling
|
||||
// "getMatches".
|
||||
//
|
||||
// For example, if the search pattern is "ts.c.SK" and the candidate is "SyntaxKind", then
|
||||
@@ -55,8 +55,8 @@ namespace ts {
|
||||
}
|
||||
|
||||
// First we break up the pattern given by dots. Each portion of the pattern between the
|
||||
// dots is a 'Segment'. The 'Segment' contains information about the entire section of
|
||||
// text between the dots, as well as information about any individual 'Words' that we
|
||||
// dots is a 'Segment'. The 'Segment' contains information about the entire section of
|
||||
// text between the dots, as well as information about any individual 'Words' that we
|
||||
// can break the segment into. A 'Word' is simply a contiguous sequence of characters
|
||||
// that can appear in a typescript identifier. So "GetKeyword" would be one word, while
|
||||
// "Get Keyword" would be two words. Once we have the individual 'words', we break those
|
||||
@@ -64,20 +64,20 @@ namespace ts {
|
||||
// word, it make character spans corresponding to "U", "I" and "Element". These spans
|
||||
// are then used when doing camel cased matches against candidate patterns.
|
||||
interface Segment {
|
||||
// Information about the entire piece of text between the dots. For example, if the
|
||||
// text between the dots is 'GetKeyword', then TotalTextChunk.Text will be 'GetKeyword' and
|
||||
// Information about the entire piece of text between the dots. For example, if the
|
||||
// text between the dots is 'GetKeyword', then TotalTextChunk.Text will be 'GetKeyword' and
|
||||
// TotalTextChunk.CharacterSpans will correspond to 'Get', 'Keyword'.
|
||||
totalTextChunk: TextChunk;
|
||||
|
||||
// Information about the subwords compromising the total word. For example, if the
|
||||
// text between the dots is 'GetFoo KeywordBar', then the subwords will be 'GetFoo'
|
||||
// and 'KeywordBar'. Those individual words will have CharacterSpans of ('Get' and
|
||||
// 'Foo') and('Keyword' and 'Bar') respectively.
|
||||
// Information about the subwords compromising the total word. For example, if the
|
||||
// text between the dots is 'GetFoo KeywordBar', then the subwords will be 'GetFoo'
|
||||
// and 'KeywordBar'. Those individual words will have CharacterSpans of ('Get' and
|
||||
// 'Foo') and('Keyword' and 'Bar') respectively.
|
||||
subWordTextChunks: TextChunk[];
|
||||
}
|
||||
|
||||
// Information about a chunk of text from the pattern. The chunk is a piece of text, with
|
||||
// cached information about the character spans within in. Character spans are used for
|
||||
// Information about a chunk of text from the pattern. The chunk is a piece of text, with
|
||||
// cached information about the character spans within in. Character spans are used for
|
||||
// camel case matching.
|
||||
interface TextChunk {
|
||||
// The text of the chunk. This should be a contiguous sequence of character that could
|
||||
@@ -92,9 +92,9 @@ namespace ts {
|
||||
// for something entirely lowercase or not.
|
||||
isLowerCase: boolean;
|
||||
|
||||
// The spans in this text chunk that we think are of interest and should be matched
|
||||
// The spans in this text chunk that we think are of interest and should be matched
|
||||
// independently. For example, if the chunk is for "UIElement" the the spans of interest
|
||||
// correspond to "U", "I" and "Element". If "UIElement" isn't found as an exaxt, prefix.
|
||||
// correspond to "U", "I" and "Element". If "UIElement" isn't found as an exact, prefix.
|
||||
// or substring match, then the character spans will be used to attempt a camel case match.
|
||||
characterSpans: TextSpan[];
|
||||
}
|
||||
@@ -110,20 +110,19 @@ namespace ts {
|
||||
|
||||
export function createPatternMatcher(pattern: string): PatternMatcher {
|
||||
// We'll often see the same candidate string many times when searching (For example, when
|
||||
// we see the name of a module that is used everywhere, or the name of an overload). As
|
||||
// such, we cache the information we compute about the candidate for the life of this
|
||||
// we see the name of a module that is used everywhere, or the name of an overload). As
|
||||
// such, we cache the information we compute about the candidate for the life of this
|
||||
// pattern matcher so we don't have to compute it multiple times.
|
||||
let stringToWordSpans: Map<TextSpan[]> = {};
|
||||
const stringToWordSpans: Map<TextSpan[]> = {};
|
||||
|
||||
pattern = pattern.trim();
|
||||
|
||||
let fullPatternSegment = createSegment(pattern);
|
||||
let dotSeparatedSegments = pattern.split(".").map(p => createSegment(p.trim()));
|
||||
let invalidPattern = dotSeparatedSegments.length === 0 || forEach(dotSeparatedSegments, segmentIsInvalid);
|
||||
const dotSeparatedSegments = pattern.split(".").map(p => createSegment(p.trim()));
|
||||
const invalidPattern = dotSeparatedSegments.length === 0 || forEach(dotSeparatedSegments, segmentIsInvalid);
|
||||
|
||||
return {
|
||||
getMatches,
|
||||
getMatchesForLastSegmentOfPattern,
|
||||
getMatchesForLastSegmentOfPattern,
|
||||
patternContainsDots: dotSeparatedSegments.length > 1
|
||||
};
|
||||
|
||||
@@ -131,7 +130,7 @@ namespace ts {
|
||||
function skipMatch(candidate: string) {
|
||||
return invalidPattern || !candidate;
|
||||
}
|
||||
|
||||
|
||||
function getMatchesForLastSegmentOfPattern(candidate: string): PatternMatch[] {
|
||||
if (skipMatch(candidate)) {
|
||||
return undefined;
|
||||
@@ -148,7 +147,7 @@ namespace ts {
|
||||
// First, check that the last part of the dot separated pattern matches the name of the
|
||||
// candidate. If not, then there's no point in proceeding and doing the more
|
||||
// expensive work.
|
||||
let candidateMatch = matchSegment(candidate, lastOrUndefined(dotSeparatedSegments));
|
||||
const candidateMatch = matchSegment(candidate, lastOrUndefined(dotSeparatedSegments));
|
||||
if (!candidateMatch) {
|
||||
return undefined;
|
||||
}
|
||||
@@ -165,16 +164,16 @@ namespace ts {
|
||||
|
||||
// So far so good. Now break up the container for the candidate and check if all
|
||||
// the dotted parts match up correctly.
|
||||
let totalMatch = candidateMatch;
|
||||
const totalMatch = candidateMatch;
|
||||
|
||||
for (let i = dotSeparatedSegments.length - 2, j = candidateContainers.length - 1;
|
||||
i >= 0;
|
||||
i--, j--) {
|
||||
i -= 1, j -= 1) {
|
||||
|
||||
let segment = dotSeparatedSegments[i];
|
||||
let containerName = candidateContainers[j];
|
||||
const segment = dotSeparatedSegments[i];
|
||||
const containerName = candidateContainers[j];
|
||||
|
||||
let containerMatch = matchSegment(containerName, segment);
|
||||
const containerMatch = matchSegment(containerName, segment);
|
||||
if (!containerMatch) {
|
||||
// This container didn't match the pattern piece. So there's no match at all.
|
||||
return undefined;
|
||||
@@ -197,7 +196,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
function matchTextChunk(candidate: string, chunk: TextChunk, punctuationStripped: boolean): PatternMatch {
|
||||
let index = indexOfIgnoringCase(candidate, chunk.textLowerCase);
|
||||
const index = indexOfIgnoringCase(candidate, chunk.textLowerCase);
|
||||
if (index === 0) {
|
||||
if (chunk.text.length === candidate.length) {
|
||||
// a) Check if the part matches the candidate entirely, in an case insensitive or
|
||||
@@ -211,18 +210,18 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
let isLowercase = chunk.isLowerCase;
|
||||
const isLowercase = chunk.isLowerCase;
|
||||
if (isLowercase) {
|
||||
if (index > 0) {
|
||||
// c) If the part is entirely lowercase, then check if it is contained anywhere in the
|
||||
// candidate in a case insensitive manner. If so, return that there was a substring
|
||||
// match.
|
||||
// match.
|
||||
//
|
||||
// Note: We only have a substring match if the lowercase part is prefix match of some
|
||||
// word part. That way we don't match something like 'Class' when the user types 'a'.
|
||||
// But we would match 'FooAttribute' (since 'Attribute' starts with 'a').
|
||||
let wordSpans = getWordSpans(candidate);
|
||||
for (let span of wordSpans) {
|
||||
const wordSpans = getWordSpans(candidate);
|
||||
for (const span of wordSpans) {
|
||||
if (partStartsWith(candidate, span, chunk.text, /*ignoreCase:*/ true)) {
|
||||
return createPatternMatch(PatternMatchKind.substring, punctuationStripped,
|
||||
/*isCaseSensitive:*/ partStartsWith(candidate, span, chunk.text, /*ignoreCase:*/ false));
|
||||
@@ -242,7 +241,7 @@ namespace ts {
|
||||
if (!isLowercase) {
|
||||
// e) If the part was not entirely lowercase, then attempt a camel cased match as well.
|
||||
if (chunk.characterSpans.length > 0) {
|
||||
let candidateParts = getWordSpans(candidate);
|
||||
const candidateParts = getWordSpans(candidate);
|
||||
let camelCaseWeight = tryCamelCaseMatch(candidate, candidateParts, chunk, /*ignoreCase:*/ false);
|
||||
if (camelCaseWeight !== undefined) {
|
||||
return createPatternMatch(PatternMatchKind.camelCase, punctuationStripped, /*isCaseSensitive:*/ true, /*camelCaseWeight:*/ camelCaseWeight);
|
||||
@@ -259,8 +258,8 @@ namespace ts {
|
||||
// f) Is the pattern a substring of the candidate starting on one of the candidate's word boundaries?
|
||||
|
||||
// We could check every character boundary start of the candidate for the pattern. However, that's
|
||||
// an m * n operation in the wost case. Instead, find the first instance of the pattern
|
||||
// substring, and see if it starts on a capital letter. It seems unlikely that the user will try to
|
||||
// an m * n operation in the wost case. Instead, find the first instance of the pattern
|
||||
// substring, and see if it starts on a capital letter. It seems unlikely that the user will try to
|
||||
// filter the list based on a substring that starts on a capital letter and also with a lowercase one.
|
||||
// (Pattern: fogbar, Candidate: quuxfogbarFogBar).
|
||||
if (chunk.text.length < candidate.length) {
|
||||
@@ -275,7 +274,7 @@ namespace ts {
|
||||
|
||||
function containsSpaceOrAsterisk(text: string): boolean {
|
||||
for (let i = 0; i < text.length; i++) {
|
||||
let ch = text.charCodeAt(i);
|
||||
const ch = text.charCodeAt(i);
|
||||
if (ch === CharacterCodes.space || ch === CharacterCodes.asterisk) {
|
||||
return true;
|
||||
}
|
||||
@@ -293,7 +292,7 @@ namespace ts {
|
||||
// Note: if the segment contains a space or an asterisk then we must assume that it's a
|
||||
// multi-word segment.
|
||||
if (!containsSpaceOrAsterisk(segment.totalTextChunk.text)) {
|
||||
let match = matchTextChunk(candidate, segment.totalTextChunk, /*punctuationStripped:*/ false);
|
||||
const match = matchTextChunk(candidate, segment.totalTextChunk, /*punctuationStripped:*/ false);
|
||||
if (match) {
|
||||
return [match];
|
||||
}
|
||||
@@ -317,7 +316,7 @@ namespace ts {
|
||||
//
|
||||
// c) If the word is entirely lowercase, then check if it is contained anywhere in the
|
||||
// candidate in a case insensitive manner. If so, return that there was a substring
|
||||
// match.
|
||||
// match.
|
||||
//
|
||||
// Note: We only have a substring match if the lowercase part is prefix match of
|
||||
// some word part. That way we don't match something like 'Class' when the user
|
||||
@@ -331,17 +330,17 @@ namespace ts {
|
||||
// e) If the word was not entirely lowercase, then attempt a camel cased match as
|
||||
// well.
|
||||
//
|
||||
// f) The word is all lower case. Is it a case insensitive substring of the candidate starting
|
||||
// f) The word is all lower case. Is it a case insensitive substring of the candidate starting
|
||||
// on a part boundary of the candidate?
|
||||
//
|
||||
// Only if all words have some sort of match is the pattern considered matched.
|
||||
|
||||
let subWordTextChunks = segment.subWordTextChunks;
|
||||
const subWordTextChunks = segment.subWordTextChunks;
|
||||
let matches: PatternMatch[] = undefined;
|
||||
|
||||
for (let subWordTextChunk of subWordTextChunks) {
|
||||
for (const subWordTextChunk of subWordTextChunks) {
|
||||
// Try to match the candidate with this word
|
||||
let result = matchTextChunk(candidate, subWordTextChunk, /*punctuationStripped:*/ true);
|
||||
const result = matchTextChunk(candidate, subWordTextChunk, /*punctuationStripped:*/ true);
|
||||
if (!result) {
|
||||
return undefined;
|
||||
}
|
||||
@@ -354,18 +353,18 @@ namespace ts {
|
||||
}
|
||||
|
||||
function partStartsWith(candidate: string, candidateSpan: TextSpan, pattern: string, ignoreCase: boolean, patternSpan?: TextSpan): boolean {
|
||||
let patternPartStart = patternSpan ? patternSpan.start : 0;
|
||||
let patternPartLength = patternSpan ? patternSpan.length : pattern.length;
|
||||
const patternPartStart = patternSpan ? patternSpan.start : 0;
|
||||
const patternPartLength = patternSpan ? patternSpan.length : pattern.length;
|
||||
|
||||
if (patternPartLength > candidateSpan.length) {
|
||||
// Pattern part is longer than the candidate part. There can never be a match.
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (ignoreCase) {
|
||||
for (let i = 0; i < patternPartLength; i++) {
|
||||
let ch1 = pattern.charCodeAt(patternPartStart + i);
|
||||
let ch2 = candidate.charCodeAt(candidateSpan.start + i);
|
||||
const ch1 = pattern.charCodeAt(patternPartStart + i);
|
||||
const ch2 = candidate.charCodeAt(candidateSpan.start + i);
|
||||
if (toLowerCase(ch1) !== toLowerCase(ch2)) {
|
||||
return false;
|
||||
}
|
||||
@@ -373,8 +372,8 @@ namespace ts {
|
||||
}
|
||||
else {
|
||||
for (let i = 0; i < patternPartLength; i++) {
|
||||
let ch1 = pattern.charCodeAt(patternPartStart + i);
|
||||
let ch2 = candidate.charCodeAt(candidateSpan.start + i);
|
||||
const ch1 = pattern.charCodeAt(patternPartStart + i);
|
||||
const ch2 = candidate.charCodeAt(candidateSpan.start + i);
|
||||
if (ch1 !== ch2) {
|
||||
return false;
|
||||
}
|
||||
@@ -385,12 +384,12 @@ namespace ts {
|
||||
}
|
||||
|
||||
function tryCamelCaseMatch(candidate: string, candidateParts: TextSpan[], chunk: TextChunk, ignoreCase: boolean): number {
|
||||
let chunkCharacterSpans = chunk.characterSpans;
|
||||
const chunkCharacterSpans = chunk.characterSpans;
|
||||
|
||||
// Note: we may have more pattern parts than candidate parts. This is because multiple
|
||||
// pattern parts may match a candidate part. For example "SiUI" against "SimpleUI".
|
||||
// We'll have 3 pattern parts Si/U/I against two candidate parts Simple/UI. However, U
|
||||
// and I will both match in UI.
|
||||
// and I will both match in UI.
|
||||
|
||||
let currentCandidate = 0;
|
||||
let currentChunkSpan = 0;
|
||||
@@ -426,14 +425,14 @@ namespace ts {
|
||||
// Consider the case of matching SiUI against SimpleUIElement. The candidate parts
|
||||
// will be Simple/UI/Element, and the pattern parts will be Si/U/I. We'll match 'Si'
|
||||
// against 'Simple' first. Then we'll match 'U' against 'UI'. However, we want to
|
||||
// still keep matching pattern parts against that candidate part.
|
||||
// still keep matching pattern parts against that candidate part.
|
||||
for (; currentChunkSpan < chunkCharacterSpans.length; currentChunkSpan++) {
|
||||
let chunkCharacterSpan = chunkCharacterSpans[currentChunkSpan];
|
||||
const chunkCharacterSpan = chunkCharacterSpans[currentChunkSpan];
|
||||
|
||||
if (gotOneMatchThisCandidate) {
|
||||
// We've already gotten one pattern part match in this candidate. We will
|
||||
// only continue trying to consumer pattern parts if the last part and this
|
||||
// part are both upper case.
|
||||
// part are both upper case.
|
||||
if (!isUpperCaseLetter(chunk.text.charCodeAt(chunkCharacterSpans[currentChunkSpan - 1].start)) ||
|
||||
!isUpperCaseLetter(chunk.text.charCodeAt(chunkCharacterSpans[currentChunkSpan].start))) {
|
||||
break;
|
||||
@@ -470,55 +469,11 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
// Helper function to compare two matches to determine which is better. Matches are first
|
||||
// ordered by kind (so all prefix matches always beat all substring matches). Then, if the
|
||||
// match is a camel case match, the relative weights of the match are used to determine
|
||||
// which is better (with a greater weight being better). Then if the match is of the same
|
||||
// type, then a case sensitive match is considered better than an insensitive one.
|
||||
function patternMatchCompareTo(match1: PatternMatch, match2: PatternMatch): number {
|
||||
return compareType(match1, match2) ||
|
||||
compareCamelCase(match1, match2) ||
|
||||
compareCase(match1, match2) ||
|
||||
comparePunctuation(match1, match2);
|
||||
}
|
||||
|
||||
function comparePunctuation(result1: PatternMatch, result2: PatternMatch) {
|
||||
// Consider a match to be better if it was successful without stripping punctuation
|
||||
// versus a match that had to strip punctuation to succeed.
|
||||
if (result1.punctuationStripped !== result2.punctuationStripped) {
|
||||
return result1.punctuationStripped ? 1 : -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
function compareCase(result1: PatternMatch, result2: PatternMatch) {
|
||||
if (result1.isCaseSensitive !== result2.isCaseSensitive) {
|
||||
return result1.isCaseSensitive ? -1 : 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
function compareType(result1: PatternMatch, result2: PatternMatch) {
|
||||
return result1.kind - result2.kind;
|
||||
}
|
||||
|
||||
function compareCamelCase(result1: PatternMatch, result2: PatternMatch) {
|
||||
if (result1.kind === PatternMatchKind.camelCase && result2.kind === PatternMatchKind.camelCase) {
|
||||
// Swap the values here. If result1 has a higher weight, then we want it to come
|
||||
// first.
|
||||
return result2.camelCaseWeight - result1.camelCaseWeight;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
function createSegment(text: string): Segment {
|
||||
return {
|
||||
totalTextChunk: createTextChunk(text),
|
||||
subWordTextChunks: breakPatternIntoTextChunks(text)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// A segment is considered invalid if we couldn't find any words in it.
|
||||
@@ -536,9 +491,9 @@ namespace ts {
|
||||
return false;
|
||||
}
|
||||
|
||||
// TODO: find a way to determine this for any unicode characters in a
|
||||
// TODO: find a way to determine this for any unicode characters in a
|
||||
// non-allocating manner.
|
||||
let str = String.fromCharCode(ch);
|
||||
const str = String.fromCharCode(ch);
|
||||
return str === str.toUpperCase();
|
||||
}
|
||||
|
||||
@@ -553,22 +508,12 @@ namespace ts {
|
||||
}
|
||||
|
||||
|
||||
// TODO: find a way to determine this for any unicode characters in a
|
||||
// TODO: find a way to determine this for any unicode characters in a
|
||||
// non-allocating manner.
|
||||
let str = String.fromCharCode(ch);
|
||||
const str = String.fromCharCode(ch);
|
||||
return str === str.toLowerCase();
|
||||
}
|
||||
|
||||
function containsUpperCaseLetter(string: string): boolean {
|
||||
for (let i = 0, n = string.length; i < n; i++) {
|
||||
if (isUpperCaseLetter(string.charCodeAt(i))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function startsWith(string: string, search: string) {
|
||||
for (let i = 0, n = search.length; i < n; i++) {
|
||||
if (string.charCodeAt(i) !== search.charCodeAt(i)) {
|
||||
@@ -593,8 +538,8 @@ namespace ts {
|
||||
// Assumes 'value' is already lowercase.
|
||||
function startsWithIgnoringCase(string: string, value: string, start: number): boolean {
|
||||
for (let i = 0, n = value.length; i < n; i++) {
|
||||
let ch1 = toLowerCase(string.charCodeAt(i + start));
|
||||
let ch2 = value.charCodeAt(i);
|
||||
const ch1 = toLowerCase(string.charCodeAt(i + start));
|
||||
const ch2 = value.charCodeAt(i);
|
||||
|
||||
if (ch1 !== ch2) {
|
||||
return false;
|
||||
@@ -614,7 +559,7 @@ namespace ts {
|
||||
return ch;
|
||||
}
|
||||
|
||||
// TODO: find a way to compute this for any unicode characters in a
|
||||
// TODO: find a way to compute this for any unicode characters in a
|
||||
// non-allocating manner.
|
||||
return String.fromCharCode(ch).toLowerCase().charCodeAt(0);
|
||||
}
|
||||
@@ -629,16 +574,17 @@ namespace ts {
|
||||
}
|
||||
|
||||
function breakPatternIntoTextChunks(pattern: string): TextChunk[] {
|
||||
let result: TextChunk[] = [];
|
||||
const result: TextChunk[] = [];
|
||||
let wordStart = 0;
|
||||
let wordLength = 0;
|
||||
|
||||
for (let i = 0; i < pattern.length; i++) {
|
||||
let ch = pattern.charCodeAt(i);
|
||||
const ch = pattern.charCodeAt(i);
|
||||
if (isWordChar(ch)) {
|
||||
if (wordLength++ === 0) {
|
||||
if (wordLength === 0) {
|
||||
wordStart = i;
|
||||
}
|
||||
wordLength++;
|
||||
}
|
||||
else {
|
||||
if (wordLength > 0) {
|
||||
@@ -656,13 +602,13 @@ namespace ts {
|
||||
}
|
||||
|
||||
function createTextChunk(text: string): TextChunk {
|
||||
let textLowerCase = text.toLowerCase();
|
||||
const textLowerCase = text.toLowerCase();
|
||||
return {
|
||||
text,
|
||||
textLowerCase,
|
||||
isLowerCase: text === textLowerCase,
|
||||
characterSpans: breakIntoCharacterSpans(text)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/* @internal */ export function breakIntoCharacterSpans(identifier: string): TextSpan[] {
|
||||
@@ -674,15 +620,15 @@ namespace ts {
|
||||
}
|
||||
|
||||
function breakIntoSpans(identifier: string, word: boolean): TextSpan[] {
|
||||
let result: TextSpan[] = [];
|
||||
const result: TextSpan[] = [];
|
||||
|
||||
let wordStart = 0;
|
||||
for (let i = 1, n = identifier.length; i < n; i++) {
|
||||
let lastIsDigit = isDigit(identifier.charCodeAt(i - 1));
|
||||
let currentIsDigit = isDigit(identifier.charCodeAt(i));
|
||||
const lastIsDigit = isDigit(identifier.charCodeAt(i - 1));
|
||||
const currentIsDigit = isDigit(identifier.charCodeAt(i));
|
||||
|
||||
let hasTransitionFromLowerToUpper = transitionFromLowerToUpper(identifier, word, i);
|
||||
let hasTransitionFromUpperToLower = transitionFromUpperToLower(identifier, word, i, wordStart);
|
||||
const hasTransitionFromLowerToUpper = transitionFromLowerToUpper(identifier, word, i);
|
||||
const hasTransitionFromUpperToLower = transitionFromUpperToLower(identifier, word, i, wordStart);
|
||||
|
||||
if (charIsPunctuation(identifier.charCodeAt(i - 1)) ||
|
||||
charIsPunctuation(identifier.charCodeAt(i)) ||
|
||||
@@ -738,7 +684,7 @@ namespace ts {
|
||||
|
||||
function isAllPunctuation(identifier: string, start: number, end: number): boolean {
|
||||
for (let i = start; i < end; i++) {
|
||||
let ch = identifier.charCodeAt(i);
|
||||
const ch = identifier.charCodeAt(i);
|
||||
|
||||
// We don't consider _ or $ as punctuation as there may be things with that name.
|
||||
if (!charIsPunctuation(ch) || ch === CharacterCodes._ || ch === CharacterCodes.$) {
|
||||
@@ -759,8 +705,8 @@ namespace ts {
|
||||
// etc.
|
||||
if (index !== wordStart &&
|
||||
index + 1 < identifier.length) {
|
||||
let currentIsUpper = isUpperCaseLetter(identifier.charCodeAt(index));
|
||||
let nextIsLower = isLowerCaseLetter(identifier.charCodeAt(index + 1));
|
||||
const currentIsUpper = isUpperCaseLetter(identifier.charCodeAt(index));
|
||||
const nextIsLower = isLowerCaseLetter(identifier.charCodeAt(index + 1));
|
||||
|
||||
if (currentIsUpper && nextIsLower) {
|
||||
// We have a transition from an upper to a lower letter here. But we only
|
||||
@@ -786,12 +732,12 @@ namespace ts {
|
||||
}
|
||||
|
||||
function transitionFromLowerToUpper(identifier: string, word: boolean, index: number): boolean {
|
||||
let lastIsUpper = isUpperCaseLetter(identifier.charCodeAt(index - 1));
|
||||
let currentIsUpper = isUpperCaseLetter(identifier.charCodeAt(index));
|
||||
const lastIsUpper = isUpperCaseLetter(identifier.charCodeAt(index - 1));
|
||||
const currentIsUpper = isUpperCaseLetter(identifier.charCodeAt(index));
|
||||
|
||||
// See if the casing indicates we're starting a new word. Note: if we're breaking on
|
||||
// words, then just seeing an upper case character isn't enough. Instead, it has to
|
||||
// be uppercase and the previous character can't be uppercase.
|
||||
// be uppercase and the previous character can't be uppercase.
|
||||
//
|
||||
// For example, breaking "AddMetadata" on words would make: Add Metadata
|
||||
//
|
||||
@@ -802,7 +748,7 @@ namespace ts {
|
||||
// on characters would be: A M
|
||||
//
|
||||
// We break the search string on characters. But we break the symbol name on words.
|
||||
let transition = word
|
||||
const transition = word
|
||||
? (currentIsUpper && !lastIsUpper)
|
||||
: currentIsUpper;
|
||||
return transition;
|
||||
|
||||
+57
-19
@@ -469,7 +469,8 @@ namespace ts {
|
||||
|
||||
function pushDocCommentLineText(docComments: SymbolDisplayPart[], text: string, blankLineCount: number) {
|
||||
// Add the empty lines in between texts
|
||||
while (blankLineCount--) {
|
||||
while (blankLineCount) {
|
||||
blankLineCount--;
|
||||
docComments.push(textPart(""));
|
||||
}
|
||||
|
||||
@@ -1034,6 +1035,7 @@ namespace ts {
|
||||
* host specific questions using 'getScriptSnapshot'.
|
||||
*/
|
||||
resolveModuleNames?(moduleNames: string[], containingFile: string): ResolvedModule[];
|
||||
directoryExists?(directoryName: string): boolean;
|
||||
}
|
||||
|
||||
//
|
||||
@@ -1217,6 +1219,7 @@ namespace ts {
|
||||
InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean;
|
||||
InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean;
|
||||
InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: boolean;
|
||||
InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: boolean;
|
||||
PlaceOpenBraceOnNewLineForFunctions: boolean;
|
||||
PlaceOpenBraceOnNewLineForControlBlocks: boolean;
|
||||
[s: string]: boolean | number | string;
|
||||
@@ -1614,6 +1617,9 @@ namespace ts {
|
||||
public static jsxOpenTagName = "jsx open tag name";
|
||||
public static jsxCloseTagName = "jsx close tag name";
|
||||
public static jsxSelfClosingTagName = "jsx self closing tag name";
|
||||
public static jsxAttribute = "jsx attribute";
|
||||
public static jsxText = "jsx text";
|
||||
public static jsxAttributeStringLiteralValue = "jsx attribute string literal value";
|
||||
}
|
||||
|
||||
export const enum ClassificationType {
|
||||
@@ -1638,6 +1644,9 @@ namespace ts {
|
||||
jsxOpenTagName = 19,
|
||||
jsxCloseTagName = 20,
|
||||
jsxSelfClosingTagName = 21,
|
||||
jsxAttribute = 22,
|
||||
jsxText = 23,
|
||||
jsxAttributeStringLiteralValue = 24,
|
||||
}
|
||||
|
||||
/// Language Service
|
||||
@@ -1911,7 +1920,8 @@ namespace ts {
|
||||
getCurrentDirectory: () => "",
|
||||
getNewLine: () => newLine,
|
||||
fileExists: (fileName): boolean => fileName === inputFileName,
|
||||
readFile: (fileName): string => ""
|
||||
readFile: (fileName): string => "",
|
||||
directoryExists: directoryExists => true
|
||||
};
|
||||
|
||||
const program = createProgram([inputFileName], options, compilerHost);
|
||||
@@ -2768,6 +2778,10 @@ namespace ts {
|
||||
// stub missing host functionality
|
||||
const entry = hostCache.getOrCreateEntry(fileName);
|
||||
return entry && entry.scriptSnapshot.getText(0, entry.scriptSnapshot.getLength());
|
||||
},
|
||||
directoryExists: directoryName => {
|
||||
Debug.assert(!host.resolveModuleNames);
|
||||
return directoryProbablyExists(directoryName, host);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2972,15 +2986,9 @@ namespace ts {
|
||||
// e.g "b a" is valid quoted name but when we strip off the quotes, it is invalid.
|
||||
// We, thus, need to check if whatever was inside the quotes is actually a valid identifier name.
|
||||
if (performCharacterChecks) {
|
||||
if (!isIdentifierStart(name.charCodeAt(0), target)) {
|
||||
if (!isIdentifier(name, target)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
for (let i = 1, n = name.length; i < n; i++) {
|
||||
if (!isIdentifierPart(name.charCodeAt(i), target)) {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return name;
|
||||
@@ -3098,6 +3106,7 @@ namespace ts {
|
||||
}
|
||||
else if (kind === SyntaxKind.SlashToken && contextToken.parent.kind === SyntaxKind.JsxClosingElement) {
|
||||
isStartingCloseTag = true;
|
||||
location = contextToken;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3123,8 +3132,11 @@ namespace ts {
|
||||
}
|
||||
else if (isStartingCloseTag) {
|
||||
const tagName = (<JsxElement>contextToken.parent.parent).openingElement.tagName;
|
||||
symbols = [typeChecker.getSymbolAtLocation(tagName)];
|
||||
const tagSymbol = typeChecker.getSymbolAtLocation(tagName);
|
||||
|
||||
if (!typeChecker.isUnknownSymbol(tagSymbol)) {
|
||||
symbols = [tagSymbol];
|
||||
}
|
||||
isMemberCompletion = true;
|
||||
isNewIdentifierLocation = false;
|
||||
}
|
||||
@@ -3830,7 +3842,23 @@ namespace ts {
|
||||
}
|
||||
else {
|
||||
if (!symbols || symbols.length === 0) {
|
||||
return undefined;
|
||||
if (sourceFile.languageVariant === LanguageVariant.JSX &&
|
||||
location.parent && location.parent.kind === SyntaxKind.JsxClosingElement) {
|
||||
// In the TypeScript JSX element, if such element is not defined. When users query for completion at closing tag,
|
||||
// instead of simply giving unknown value, the completion will return the tag-name of an associated opening-element.
|
||||
// For example:
|
||||
// var x = <div> </ /*1*/> completion list at "1" will contain "div" with type any
|
||||
const tagName = (<JsxElement>location.parent.parent).openingElement.tagName;
|
||||
entries.push({
|
||||
name: (<Identifier>tagName).text,
|
||||
kind: undefined,
|
||||
kindModifiers: undefined,
|
||||
sortText: "0",
|
||||
});
|
||||
}
|
||||
else {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
getCompletionEntriesFromSymbols(symbols, entries);
|
||||
@@ -4438,7 +4466,7 @@ namespace ts {
|
||||
const typeChecker = program.getTypeChecker();
|
||||
const symbol = typeChecker.getSymbolAtLocation(node);
|
||||
|
||||
if (!symbol) {
|
||||
if (!symbol || typeChecker.isUnknownSymbol(symbol)) {
|
||||
// Try getting just type at this position and show
|
||||
switch (node.kind) {
|
||||
case SyntaxKind.Identifier:
|
||||
@@ -6573,6 +6601,9 @@ namespace ts {
|
||||
case ClassificationType.jsxOpenTagName: return ClassificationTypeNames.jsxOpenTagName;
|
||||
case ClassificationType.jsxCloseTagName: return ClassificationTypeNames.jsxCloseTagName;
|
||||
case ClassificationType.jsxSelfClosingTagName: return ClassificationTypeNames.jsxSelfClosingTagName;
|
||||
case ClassificationType.jsxAttribute: return ClassificationTypeNames.jsxAttribute;
|
||||
case ClassificationType.jsxText: return ClassificationTypeNames.jsxText;
|
||||
case ClassificationType.jsxAttributeStringLiteralValue: return ClassificationTypeNames.jsxAttributeStringLiteralValue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6781,12 +6812,12 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
function classifyToken(token: Node): void {
|
||||
function classifyTokenOrJsxText(token: Node): void {
|
||||
if (nodeIsMissing(token)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const tokenStart = classifyLeadingTriviaAndGetTokenStart(token);
|
||||
const tokenStart = token.kind === SyntaxKind.JsxText ? token.pos : classifyLeadingTriviaAndGetTokenStart(token);
|
||||
|
||||
const tokenWidth = token.end - tokenStart;
|
||||
Debug.assert(tokenWidth >= 0);
|
||||
@@ -6822,7 +6853,8 @@ namespace ts {
|
||||
// the '=' in a variable declaration is special cased here.
|
||||
if (token.parent.kind === SyntaxKind.VariableDeclaration ||
|
||||
token.parent.kind === SyntaxKind.PropertyDeclaration ||
|
||||
token.parent.kind === SyntaxKind.Parameter) {
|
||||
token.parent.kind === SyntaxKind.Parameter ||
|
||||
token.parent.kind === SyntaxKind.JsxAttribute) {
|
||||
return ClassificationType.operator;
|
||||
}
|
||||
}
|
||||
@@ -6841,7 +6873,7 @@ namespace ts {
|
||||
return ClassificationType.numericLiteral;
|
||||
}
|
||||
else if (tokenKind === SyntaxKind.StringLiteral || tokenKind === SyntaxKind.StringLiteralType) {
|
||||
return ClassificationType.stringLiteral;
|
||||
return token.parent.kind === SyntaxKind.JsxAttribute ? ClassificationType.jsxAttributeStringLiteralValue : ClassificationType.stringLiteral;
|
||||
}
|
||||
else if (tokenKind === SyntaxKind.RegularExpressionLiteral) {
|
||||
// TODO: we should get another classification type for these literals.
|
||||
@@ -6851,6 +6883,9 @@ namespace ts {
|
||||
// TODO (drosen): we should *also* get another classification type for these literals.
|
||||
return ClassificationType.stringLiteral;
|
||||
}
|
||||
else if (tokenKind === SyntaxKind.JsxText) {
|
||||
return ClassificationType.jsxText;
|
||||
}
|
||||
else if (tokenKind === SyntaxKind.Identifier) {
|
||||
if (token) {
|
||||
switch (token.parent.kind) {
|
||||
@@ -6902,9 +6937,12 @@ namespace ts {
|
||||
return ClassificationType.jsxSelfClosingTagName;
|
||||
}
|
||||
return;
|
||||
case SyntaxKind.JsxAttribute:
|
||||
if ((<JsxAttribute>token.parent).name === token) {
|
||||
return ClassificationType.jsxAttribute;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ClassificationType.identifier;
|
||||
}
|
||||
}
|
||||
@@ -6921,8 +6959,8 @@ namespace ts {
|
||||
const children = element.getChildren(sourceFile);
|
||||
for (let i = 0, n = children.length; i < n; i++) {
|
||||
const child = children[i];
|
||||
if (isToken(child)) {
|
||||
classifyToken(child);
|
||||
if (isToken(child) || child.kind === SyntaxKind.JsxText) {
|
||||
classifyTokenOrJsxText(child);
|
||||
}
|
||||
else {
|
||||
// Recurse into our child nodes.
|
||||
|
||||
+178
-224
@@ -16,7 +16,11 @@
|
||||
/// <reference path='services.ts' />
|
||||
|
||||
/* @internal */
|
||||
var debugObjectHost = (<any>this);
|
||||
let debugObjectHost = (<any>this);
|
||||
|
||||
// We need to use 'null' to interface with the managed side.
|
||||
/* tslint:disable:no-null */
|
||||
/* tslint:disable:no-in-operator */
|
||||
|
||||
/* @internal */
|
||||
namespace ts {
|
||||
@@ -60,8 +64,9 @@ namespace ts {
|
||||
getNewLine?(): string;
|
||||
getProjectVersion?(): string;
|
||||
useCaseSensitiveFileNames?(): boolean;
|
||||
|
||||
|
||||
getModuleResolutionsForFile?(fileName: string): string;
|
||||
directoryExists(directoryName: string): boolean;
|
||||
}
|
||||
|
||||
/** Public interface of the the of a config service shim instance.*/
|
||||
@@ -233,8 +238,6 @@ namespace ts {
|
||||
}
|
||||
|
||||
class ScriptSnapshotShimAdapter implements IScriptSnapshot {
|
||||
private lineStartPositions: number[] = null;
|
||||
|
||||
constructor(private scriptSnapshotShim: ScriptSnapshotShim) {
|
||||
}
|
||||
|
||||
@@ -247,14 +250,14 @@ namespace ts {
|
||||
}
|
||||
|
||||
public getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange {
|
||||
var oldSnapshotShim = <ScriptSnapshotShimAdapter>oldSnapshot;
|
||||
var encoded = this.scriptSnapshotShim.getChangeRange(oldSnapshotShim.scriptSnapshotShim);
|
||||
const oldSnapshotShim = <ScriptSnapshotShimAdapter>oldSnapshot;
|
||||
const encoded = this.scriptSnapshotShim.getChangeRange(oldSnapshotShim.scriptSnapshotShim);
|
||||
// TODO: should this be '==='?
|
||||
if (encoded == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var decoded: { span: { start: number; length: number; }; newLength: number; } = JSON.parse(encoded);
|
||||
const decoded: { span: { start: number; length: number; }; newLength: number; } = JSON.parse(encoded);
|
||||
return createTextChangeRange(
|
||||
createTextSpan(decoded.span.start, decoded.span.length), decoded.newLength);
|
||||
}
|
||||
@@ -272,21 +275,25 @@ namespace ts {
|
||||
private files: string[];
|
||||
private loggingEnabled = false;
|
||||
private tracingEnabled = false;
|
||||
|
||||
|
||||
public resolveModuleNames: (moduleName: string[], containingFile: string) => ResolvedModule[];
|
||||
|
||||
public directoryExists: (directoryName: string) => boolean;
|
||||
|
||||
constructor(private shimHost: LanguageServiceShimHost) {
|
||||
// if shimHost is a COM object then property check will become method call with no arguments.
|
||||
// 'in' does not have this effect.
|
||||
if ("getModuleResolutionsForFile" in this.shimHost) {
|
||||
this.resolveModuleNames = (moduleNames: string[], containingFile: string) => {
|
||||
let resolutionsInFile = <Map<string>>JSON.parse(this.shimHost.getModuleResolutionsForFile(containingFile));
|
||||
const resolutionsInFile = <Map<string>>JSON.parse(this.shimHost.getModuleResolutionsForFile(containingFile));
|
||||
return map(moduleNames, name => {
|
||||
const result = lookUp(resolutionsInFile, name);
|
||||
return result ? { resolvedFileName: result } : undefined;
|
||||
});
|
||||
};
|
||||
}
|
||||
if ("directoryExists" in this.shimHost) {
|
||||
this.directoryExists = directoryName => this.shimHost.directoryExists(directoryName);
|
||||
}
|
||||
}
|
||||
|
||||
public log(s: string): void {
|
||||
@@ -319,7 +326,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
public getCompilationSettings(): CompilerOptions {
|
||||
var settingsJson = this.shimHost.getCompilationSettings();
|
||||
const settingsJson = this.shimHost.getCompilationSettings();
|
||||
// TODO: should this be '==='?
|
||||
if (settingsJson == null || settingsJson == "") {
|
||||
throw Error("LanguageServiceShimHostAdapter.getCompilationSettings: empty compilationSettings");
|
||||
@@ -328,17 +335,12 @@ namespace ts {
|
||||
}
|
||||
|
||||
public getScriptFileNames(): string[] {
|
||||
var encoded = this.shimHost.getScriptFileNames();
|
||||
const encoded = this.shimHost.getScriptFileNames();
|
||||
return this.files = JSON.parse(encoded);
|
||||
}
|
||||
|
||||
public getScriptSnapshot(fileName: string): IScriptSnapshot {
|
||||
// Shim the API changes for 1.5 release. This should be removed once
|
||||
// TypeScript 1.5 has shipped.
|
||||
if (this.files && this.files.indexOf(fileName) < 0) {
|
||||
return undefined;
|
||||
}
|
||||
var scriptSnapshot = this.shimHost.getScriptSnapshot(fileName);
|
||||
const scriptSnapshot = this.shimHost.getScriptSnapshot(fileName);
|
||||
return scriptSnapshot && new ScriptSnapshotShimAdapter(scriptSnapshot);
|
||||
}
|
||||
|
||||
@@ -347,7 +349,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
public getLocalizedDiagnosticMessages(): any {
|
||||
var diagnosticMessagesJson = this.shimHost.getLocalizedDiagnosticMessages();
|
||||
const diagnosticMessagesJson = this.shimHost.getLocalizedDiagnosticMessages();
|
||||
if (diagnosticMessagesJson == null || diagnosticMessagesJson == "") {
|
||||
return null;
|
||||
}
|
||||
@@ -362,7 +364,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
public getCancellationToken(): HostCancellationToken {
|
||||
var hostCancellationToken = this.shimHost.getCancellationToken();
|
||||
const hostCancellationToken = this.shimHost.getCancellationToken();
|
||||
return new ThrottledCancellationToken(hostCancellationToken);
|
||||
}
|
||||
|
||||
@@ -371,14 +373,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
public getDefaultLibFileName(options: CompilerOptions): string {
|
||||
// Wrap the API changes for 1.5 release. This try/catch
|
||||
// should be removed once TypeScript 1.5 has shipped.
|
||||
try {
|
||||
return this.shimHost.getDefaultLibFileName(JSON.stringify(options));
|
||||
}
|
||||
catch (e) {
|
||||
return "";
|
||||
}
|
||||
return this.shimHost.getDefaultLibFileName(JSON.stringify(options));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -393,8 +388,8 @@ namespace ts {
|
||||
}
|
||||
|
||||
public isCancellationRequested(): boolean {
|
||||
var time = Date.now();
|
||||
var duration = Math.abs(time - this.lastCancellationCheckTime);
|
||||
const time = Date.now();
|
||||
const duration = Math.abs(time - this.lastCancellationCheckTime);
|
||||
if (duration > 10) {
|
||||
// Check no more than once every 10 ms.
|
||||
this.lastCancellationCheckTime = time;
|
||||
@@ -405,52 +400,48 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
export class CoreServicesShimHostAdapter implements ParseConfigHost {
|
||||
export class CoreServicesShimHostAdapter implements ParseConfigHost, ModuleResolutionHost {
|
||||
|
||||
public directoryExists: (directoryName: string) => boolean;
|
||||
|
||||
constructor(private shimHost: CoreServicesShimHost) {
|
||||
if ("directoryExists" in this.shimHost) {
|
||||
this.directoryExists = directoryName => this.shimHost.directoryExists(directoryName);
|
||||
}
|
||||
}
|
||||
|
||||
public readDirectory(rootDir: string, extension: string, exclude: string[]): string[] {
|
||||
// Wrap the API changes for 1.5 release. This try/catch
|
||||
// should be removed once TypeScript 1.5 has shipped.
|
||||
// Also consider removing the optional designation for
|
||||
// the exclude param at this time.
|
||||
var encoded: string;
|
||||
try {
|
||||
encoded = this.shimHost.readDirectory(rootDir, extension, JSON.stringify(exclude));
|
||||
}
|
||||
catch (e) {
|
||||
encoded = this.shimHost.readDirectory(rootDir, extension);
|
||||
}
|
||||
const encoded = this.shimHost.readDirectory(rootDir, extension, JSON.stringify(exclude));
|
||||
return JSON.parse(encoded);
|
||||
}
|
||||
|
||||
|
||||
public fileExists(fileName: string): boolean {
|
||||
return this.shimHost.fileExists(fileName);
|
||||
}
|
||||
|
||||
|
||||
public readFile(fileName: string): string {
|
||||
return this.shimHost.readFile(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
function simpleForwardCall(logger: Logger, actionDescription: string, action: () => any, logPerformance: boolean): any {
|
||||
let start: number;
|
||||
if (logPerformance) {
|
||||
logger.log(actionDescription);
|
||||
var start = Date.now();
|
||||
start = Date.now();
|
||||
}
|
||||
|
||||
var result = action();
|
||||
const result = action();
|
||||
|
||||
if (logPerformance) {
|
||||
var end = Date.now();
|
||||
logger.log(actionDescription + " completed in " + (end - start) + " msec");
|
||||
if (typeof (result) === "string") {
|
||||
var str = <string>result;
|
||||
const end = Date.now();
|
||||
logger.log(`${actionDescription} completed in ${end - start} msec`);
|
||||
if (typeof result === "string") {
|
||||
let str = result;
|
||||
if (str.length > 128) {
|
||||
str = str.substring(0, 128) + "...";
|
||||
}
|
||||
logger.log(" result.length=" + str.length + ", result='" + JSON.stringify(str) + "'");
|
||||
logger.log(` result.length=${str.length}, result='${JSON.stringify(str)}'`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -459,8 +450,8 @@ namespace ts {
|
||||
|
||||
function forwardJSONCall(logger: Logger, actionDescription: string, action: () => any, logPerformance: boolean): string {
|
||||
try {
|
||||
var result = simpleForwardCall(logger, actionDescription, action, logPerformance);
|
||||
return JSON.stringify({ result: result });
|
||||
const result = simpleForwardCall(logger, actionDescription, action, logPerformance);
|
||||
return JSON.stringify({ result });
|
||||
}
|
||||
catch (err) {
|
||||
if (err instanceof OperationCanceledException) {
|
||||
@@ -481,7 +472,7 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
export function realizeDiagnostics(diagnostics: Diagnostic[], newLine: string): { message: string; start: number; length: number; category: string; code: number; } []{
|
||||
export function realizeDiagnostics(diagnostics: Diagnostic[], newLine: string): { message: string; start: number; length: number; category: string; code: number; }[] {
|
||||
return diagnostics.map(d => realizeDiagnostic(d, newLine));
|
||||
}
|
||||
|
||||
@@ -540,10 +531,9 @@ namespace ts {
|
||||
*/
|
||||
public refresh(throwOnError: boolean): void {
|
||||
this.forwardJSONCall(
|
||||
"refresh(" + throwOnError + ")",
|
||||
() => {
|
||||
return <any>null;
|
||||
});
|
||||
`refresh(${throwOnError})`,
|
||||
() => <any>null
|
||||
);
|
||||
}
|
||||
|
||||
public cleanupSemanticCache(): void {
|
||||
@@ -555,63 +545,57 @@ namespace ts {
|
||||
});
|
||||
}
|
||||
|
||||
private realizeDiagnostics(diagnostics: Diagnostic[]): { message: string; start: number; length: number; category: string; }[]{
|
||||
var newLine = getNewLineOrDefaultFromHost(this.host);
|
||||
private realizeDiagnostics(diagnostics: Diagnostic[]): { message: string; start: number; length: number; category: string; }[] {
|
||||
const newLine = getNewLineOrDefaultFromHost(this.host);
|
||||
return ts.realizeDiagnostics(diagnostics, newLine);
|
||||
}
|
||||
|
||||
public getSyntacticClassifications(fileName: string, start: number, length: number): string {
|
||||
return this.forwardJSONCall(
|
||||
"getSyntacticClassifications('" + fileName + "', " + start + ", " + length + ")",
|
||||
() => {
|
||||
var classifications = this.languageService.getSyntacticClassifications(fileName, createTextSpan(start, length));
|
||||
return classifications;
|
||||
});
|
||||
`getSyntacticClassifications('${fileName}', ${start}, ${length})`,
|
||||
() => this.languageService.getSyntacticClassifications(fileName, createTextSpan(start, length))
|
||||
);
|
||||
}
|
||||
|
||||
public getSemanticClassifications(fileName: string, start: number, length: number): string {
|
||||
return this.forwardJSONCall(
|
||||
"getSemanticClassifications('" + fileName + "', " + start + ", " + length + ")",
|
||||
() => {
|
||||
var classifications = this.languageService.getSemanticClassifications(fileName, createTextSpan(start, length));
|
||||
return classifications;
|
||||
});
|
||||
`getSemanticClassifications('${fileName}', ${start}, ${length})`,
|
||||
() => this.languageService.getSemanticClassifications(fileName, createTextSpan(start, length))
|
||||
);
|
||||
}
|
||||
|
||||
public getEncodedSyntacticClassifications(fileName: string, start: number, length: number): string {
|
||||
return this.forwardJSONCall(
|
||||
"getEncodedSyntacticClassifications('" + fileName + "', " + start + ", " + length + ")",
|
||||
() => {
|
||||
// directly serialize the spans out to a string. This is much faster to decode
|
||||
// on the managed side versus a full JSON array.
|
||||
return convertClassifications(this.languageService.getEncodedSyntacticClassifications(fileName, createTextSpan(start, length)));
|
||||
});
|
||||
`getEncodedSyntacticClassifications('${fileName}', ${start}, ${length})`,
|
||||
// directly serialize the spans out to a string. This is much faster to decode
|
||||
// on the managed side versus a full JSON array.
|
||||
() => convertClassifications(this.languageService.getEncodedSyntacticClassifications(fileName, createTextSpan(start, length)))
|
||||
);
|
||||
}
|
||||
|
||||
public getEncodedSemanticClassifications(fileName: string, start: number, length: number): string {
|
||||
return this.forwardJSONCall(
|
||||
"getEncodedSemanticClassifications('" + fileName + "', " + start + ", " + length + ")",
|
||||
() => {
|
||||
// directly serialize the spans out to a string. This is much faster to decode
|
||||
// on the managed side versus a full JSON array.
|
||||
return convertClassifications(this.languageService.getEncodedSemanticClassifications(fileName, createTextSpan(start, length)));
|
||||
});
|
||||
`getEncodedSemanticClassifications('${fileName}', ${start}, ${length})`,
|
||||
// directly serialize the spans out to a string. This is much faster to decode
|
||||
// on the managed side versus a full JSON array.
|
||||
() => convertClassifications(this.languageService.getEncodedSemanticClassifications(fileName, createTextSpan(start, length)))
|
||||
);
|
||||
}
|
||||
|
||||
public getSyntacticDiagnostics(fileName: string): string {
|
||||
return this.forwardJSONCall(
|
||||
"getSyntacticDiagnostics('" + fileName + "')",
|
||||
`getSyntacticDiagnostics('${fileName}')`,
|
||||
() => {
|
||||
var diagnostics = this.languageService.getSyntacticDiagnostics(fileName);
|
||||
const diagnostics = this.languageService.getSyntacticDiagnostics(fileName);
|
||||
return this.realizeDiagnostics(diagnostics);
|
||||
});
|
||||
}
|
||||
|
||||
public getSemanticDiagnostics(fileName: string): string {
|
||||
return this.forwardJSONCall(
|
||||
"getSemanticDiagnostics('" + fileName + "')",
|
||||
`getSemanticDiagnostics('${fileName}')`,
|
||||
() => {
|
||||
var diagnostics = this.languageService.getSemanticDiagnostics(fileName);
|
||||
const diagnostics = this.languageService.getSemanticDiagnostics(fileName);
|
||||
return this.realizeDiagnostics(diagnostics);
|
||||
});
|
||||
}
|
||||
@@ -620,7 +604,7 @@ namespace ts {
|
||||
return this.forwardJSONCall(
|
||||
"getCompilerOptionsDiagnostics()",
|
||||
() => {
|
||||
var diagnostics = this.languageService.getCompilerOptionsDiagnostics();
|
||||
const diagnostics = this.languageService.getCompilerOptionsDiagnostics();
|
||||
return this.realizeDiagnostics(diagnostics);
|
||||
});
|
||||
}
|
||||
@@ -633,11 +617,9 @@ namespace ts {
|
||||
*/
|
||||
public getQuickInfoAtPosition(fileName: string, position: number): string {
|
||||
return this.forwardJSONCall(
|
||||
"getQuickInfoAtPosition('" + fileName + "', " + position + ")",
|
||||
() => {
|
||||
var quickInfo = this.languageService.getQuickInfoAtPosition(fileName, position);
|
||||
return quickInfo;
|
||||
});
|
||||
`getQuickInfoAtPosition('${fileName}', ${position})`,
|
||||
() => this.languageService.getQuickInfoAtPosition(fileName, position)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -649,11 +631,9 @@ namespace ts {
|
||||
*/
|
||||
public getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): string {
|
||||
return this.forwardJSONCall(
|
||||
"getNameOrDottedNameSpan('" + fileName + "', " + startPos + ", " + endPos + ")",
|
||||
() => {
|
||||
var spanInfo = this.languageService.getNameOrDottedNameSpan(fileName, startPos, endPos);
|
||||
return spanInfo;
|
||||
});
|
||||
`getNameOrDottedNameSpan('${fileName}', ${startPos}, ${endPos})`,
|
||||
() => this.languageService.getNameOrDottedNameSpan(fileName, startPos, endPos)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -662,22 +642,18 @@ namespace ts {
|
||||
*/
|
||||
public getBreakpointStatementAtPosition(fileName: string, position: number): string {
|
||||
return this.forwardJSONCall(
|
||||
"getBreakpointStatementAtPosition('" + fileName + "', " + position + ")",
|
||||
() => {
|
||||
var spanInfo = this.languageService.getBreakpointStatementAtPosition(fileName, position);
|
||||
return spanInfo;
|
||||
});
|
||||
`getBreakpointStatementAtPosition('${fileName}', ${position})`,
|
||||
() => this.languageService.getBreakpointStatementAtPosition(fileName, position)
|
||||
);
|
||||
}
|
||||
|
||||
/// SIGNATUREHELP
|
||||
|
||||
public getSignatureHelpItems(fileName: string, position: number): string {
|
||||
return this.forwardJSONCall(
|
||||
"getSignatureHelpItems('" + fileName + "', " + position + ")",
|
||||
() => {
|
||||
var signatureInfo = this.languageService.getSignatureHelpItems(fileName, position);
|
||||
return signatureInfo;
|
||||
});
|
||||
`getSignatureHelpItems('${fileName}', ${position})`,
|
||||
() => this.languageService.getSignatureHelpItems(fileName, position)
|
||||
);
|
||||
}
|
||||
|
||||
/// GOTO DEFINITION
|
||||
@@ -688,10 +664,9 @@ namespace ts {
|
||||
*/
|
||||
public getDefinitionAtPosition(fileName: string, position: number): string {
|
||||
return this.forwardJSONCall(
|
||||
"getDefinitionAtPosition('" + fileName + "', " + position + ")",
|
||||
() => {
|
||||
return this.languageService.getDefinitionAtPosition(fileName, position);
|
||||
});
|
||||
`getDefinitionAtPosition('${fileName}', ${position})`,
|
||||
() => this.languageService.getDefinitionAtPosition(fileName, position)
|
||||
);
|
||||
}
|
||||
|
||||
/// GOTO Type
|
||||
@@ -702,44 +677,39 @@ namespace ts {
|
||||
*/
|
||||
public getTypeDefinitionAtPosition(fileName: string, position: number): string {
|
||||
return this.forwardJSONCall(
|
||||
"getTypeDefinitionAtPosition('" + fileName + "', " + position + ")",
|
||||
() => {
|
||||
return this.languageService.getTypeDefinitionAtPosition(fileName, position);
|
||||
});
|
||||
`getTypeDefinitionAtPosition('${fileName}', ${position})`,
|
||||
() => this.languageService.getTypeDefinitionAtPosition(fileName, position)
|
||||
);
|
||||
}
|
||||
|
||||
public getRenameInfo(fileName: string, position: number): string {
|
||||
return this.forwardJSONCall(
|
||||
"getRenameInfo('" + fileName + "', " + position + ")",
|
||||
() => {
|
||||
return this.languageService.getRenameInfo(fileName, position);
|
||||
});
|
||||
`getRenameInfo('${fileName}', ${position})`,
|
||||
() => this.languageService.getRenameInfo(fileName, position)
|
||||
);
|
||||
}
|
||||
|
||||
public findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): string {
|
||||
return this.forwardJSONCall(
|
||||
"findRenameLocations('" + fileName + "', " + position + ", " + findInStrings + ", " + findInComments + ")",
|
||||
() => {
|
||||
return this.languageService.findRenameLocations(fileName, position, findInStrings, findInComments);
|
||||
});
|
||||
`findRenameLocations('${fileName}', ${position}, ${findInStrings}, ${findInComments})`,
|
||||
() => this.languageService.findRenameLocations(fileName, position, findInStrings, findInComments)
|
||||
);
|
||||
}
|
||||
|
||||
/// GET BRACE MATCHING
|
||||
public getBraceMatchingAtPosition(fileName: string, position: number): string {
|
||||
return this.forwardJSONCall(
|
||||
"getBraceMatchingAtPosition('" + fileName + "', " + position + ")",
|
||||
() => {
|
||||
var textRanges = this.languageService.getBraceMatchingAtPosition(fileName, position);
|
||||
return textRanges;
|
||||
});
|
||||
`getBraceMatchingAtPosition('${fileName}', ${position})`,
|
||||
() => this.languageService.getBraceMatchingAtPosition(fileName, position)
|
||||
);
|
||||
}
|
||||
|
||||
/// GET SMART INDENT
|
||||
public getIndentationAtPosition(fileName: string, position: number, options: string /*Services.EditorOptions*/): string {
|
||||
return this.forwardJSONCall(
|
||||
"getIndentationAtPosition('" + fileName + "', " + position + ")",
|
||||
`getIndentationAtPosition('${fileName}', ${position})`,
|
||||
() => {
|
||||
var localOptions: EditorOptions = JSON.parse(options);
|
||||
const localOptions: EditorOptions = JSON.parse(options);
|
||||
return this.languageService.getIndentationAtPosition(fileName, position, localOptions);
|
||||
});
|
||||
}
|
||||
@@ -748,35 +718,32 @@ namespace ts {
|
||||
|
||||
public getReferencesAtPosition(fileName: string, position: number): string {
|
||||
return this.forwardJSONCall(
|
||||
"getReferencesAtPosition('" + fileName + "', " + position + ")",
|
||||
() => {
|
||||
return this.languageService.getReferencesAtPosition(fileName, position);
|
||||
});
|
||||
`getReferencesAtPosition('${fileName}', ${position})`,
|
||||
() => this.languageService.getReferencesAtPosition(fileName, position)
|
||||
);
|
||||
}
|
||||
|
||||
public findReferences(fileName: string, position: number): string {
|
||||
return this.forwardJSONCall(
|
||||
"findReferences('" + fileName + "', " + position + ")",
|
||||
() => {
|
||||
return this.languageService.findReferences(fileName, position);
|
||||
});
|
||||
`findReferences('${fileName}', ${position})`,
|
||||
() => this.languageService.findReferences(fileName, position)
|
||||
);
|
||||
}
|
||||
|
||||
public getOccurrencesAtPosition(fileName: string, position: number): string {
|
||||
return this.forwardJSONCall(
|
||||
"getOccurrencesAtPosition('" + fileName + "', " + position + ")",
|
||||
() => {
|
||||
return this.languageService.getOccurrencesAtPosition(fileName, position);
|
||||
});
|
||||
`getOccurrencesAtPosition('${fileName}', ${position})`,
|
||||
() => this.languageService.getOccurrencesAtPosition(fileName, position)
|
||||
);
|
||||
}
|
||||
|
||||
public getDocumentHighlights(fileName: string, position: number, filesToSearch: string): string {
|
||||
return this.forwardJSONCall(
|
||||
"getDocumentHighlights('" + fileName + "', " + position + ")",
|
||||
`getDocumentHighlights('${fileName}', ${position})`,
|
||||
() => {
|
||||
var results = this.languageService.getDocumentHighlights(fileName, position, JSON.parse(filesToSearch));
|
||||
const results = this.languageService.getDocumentHighlights(fileName, position, JSON.parse(filesToSearch));
|
||||
// workaround for VS document higlighting issue - keep only items from the initial file
|
||||
let normalizedName = normalizeSlashes(fileName).toLowerCase();
|
||||
const normalizedName = normalizeSlashes(fileName).toLowerCase();
|
||||
return filter(results, r => normalizeSlashes(r.fileName).toLowerCase() === normalizedName);
|
||||
});
|
||||
}
|
||||
@@ -790,56 +757,49 @@ namespace ts {
|
||||
*/
|
||||
public getCompletionsAtPosition(fileName: string, position: number) {
|
||||
return this.forwardJSONCall(
|
||||
"getCompletionsAtPosition('" + fileName + "', " + position + ")",
|
||||
() => {
|
||||
var completion = this.languageService.getCompletionsAtPosition(fileName, position);
|
||||
return completion;
|
||||
});
|
||||
`getCompletionsAtPosition('${fileName}', ${position})`,
|
||||
() => this.languageService.getCompletionsAtPosition(fileName, position)
|
||||
);
|
||||
}
|
||||
|
||||
/** Get a string based representation of a completion list entry details */
|
||||
public getCompletionEntryDetails(fileName: string, position: number, entryName: string) {
|
||||
return this.forwardJSONCall(
|
||||
"getCompletionEntryDetails('" + fileName + "', " + position + ", " + entryName + ")",
|
||||
() => {
|
||||
var details = this.languageService.getCompletionEntryDetails(fileName, position, entryName);
|
||||
return details;
|
||||
});
|
||||
`getCompletionEntryDetails('${fileName}', ${position}, '${entryName}')`,
|
||||
() => this.languageService.getCompletionEntryDetails(fileName, position, entryName)
|
||||
);
|
||||
}
|
||||
|
||||
public getFormattingEditsForRange(fileName: string, start: number, end: number, options: string/*Services.FormatCodeOptions*/): string {
|
||||
return this.forwardJSONCall(
|
||||
"getFormattingEditsForRange('" + fileName + "', " + start + ", " + end + ")",
|
||||
`getFormattingEditsForRange('${fileName}', ${start}, ${end})`,
|
||||
() => {
|
||||
var localOptions: ts.FormatCodeOptions = JSON.parse(options);
|
||||
var edits = this.languageService.getFormattingEditsForRange(fileName, start, end, localOptions);
|
||||
return edits;
|
||||
const localOptions: ts.FormatCodeOptions = JSON.parse(options);
|
||||
return this.languageService.getFormattingEditsForRange(fileName, start, end, localOptions);
|
||||
});
|
||||
}
|
||||
|
||||
public getFormattingEditsForDocument(fileName: string, options: string/*Services.FormatCodeOptions*/): string {
|
||||
return this.forwardJSONCall(
|
||||
"getFormattingEditsForDocument('" + fileName + "')",
|
||||
`getFormattingEditsForDocument('${fileName}')`,
|
||||
() => {
|
||||
var localOptions: ts.FormatCodeOptions = JSON.parse(options);
|
||||
var edits = this.languageService.getFormattingEditsForDocument(fileName, localOptions);
|
||||
return edits;
|
||||
const localOptions: ts.FormatCodeOptions = JSON.parse(options);
|
||||
return this.languageService.getFormattingEditsForDocument(fileName, localOptions);
|
||||
});
|
||||
}
|
||||
|
||||
public getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: string/*Services.FormatCodeOptions*/): string {
|
||||
return this.forwardJSONCall(
|
||||
"getFormattingEditsAfterKeystroke('" + fileName + "', " + position + ", '" + key + "')",
|
||||
`getFormattingEditsAfterKeystroke('${fileName}', ${position}, '${key}')`,
|
||||
() => {
|
||||
var localOptions: ts.FormatCodeOptions = JSON.parse(options);
|
||||
var edits = this.languageService.getFormattingEditsAfterKeystroke(fileName, position, key, localOptions);
|
||||
return edits;
|
||||
const localOptions: ts.FormatCodeOptions = JSON.parse(options);
|
||||
return this.languageService.getFormattingEditsAfterKeystroke(fileName, position, key, localOptions);
|
||||
});
|
||||
}
|
||||
|
||||
public getDocCommentTemplateAtPosition(fileName: string, position: number): string {
|
||||
return this.forwardJSONCall(
|
||||
"getDocCommentTemplateAtPosition('" + fileName + "', " + position + ")",
|
||||
`getDocCommentTemplateAtPosition('${fileName}', ${position})`,
|
||||
() => this.languageService.getDocCommentTemplateAtPosition(fileName, position)
|
||||
);
|
||||
}
|
||||
@@ -849,51 +809,38 @@ namespace ts {
|
||||
/** Return a list of symbols that are interesting to navigate to */
|
||||
public getNavigateToItems(searchValue: string, maxResultCount?: number): string {
|
||||
return this.forwardJSONCall(
|
||||
"getNavigateToItems('" + searchValue + "', " + maxResultCount+ ")",
|
||||
() => {
|
||||
var items = this.languageService.getNavigateToItems(searchValue, maxResultCount);
|
||||
return items;
|
||||
});
|
||||
`getNavigateToItems('${searchValue}', ${maxResultCount})`,
|
||||
() => this.languageService.getNavigateToItems(searchValue, maxResultCount)
|
||||
);
|
||||
}
|
||||
|
||||
public getNavigationBarItems(fileName: string): string {
|
||||
return this.forwardJSONCall(
|
||||
"getNavigationBarItems('" + fileName + "')",
|
||||
() => {
|
||||
var items = this.languageService.getNavigationBarItems(fileName);
|
||||
return items;
|
||||
});
|
||||
`getNavigationBarItems('${fileName}')`,
|
||||
() => this.languageService.getNavigationBarItems(fileName)
|
||||
);
|
||||
}
|
||||
|
||||
public getOutliningSpans(fileName: string): string {
|
||||
return this.forwardJSONCall(
|
||||
"getOutliningSpans('" + fileName + "')",
|
||||
() => {
|
||||
var items = this.languageService.getOutliningSpans(fileName);
|
||||
return items;
|
||||
});
|
||||
`getOutliningSpans('${fileName}')`,
|
||||
() => this.languageService.getOutliningSpans(fileName)
|
||||
);
|
||||
}
|
||||
|
||||
public getTodoComments(fileName: string, descriptors: string): string {
|
||||
return this.forwardJSONCall(
|
||||
"getTodoComments('" + fileName + "')",
|
||||
() => {
|
||||
var items = this.languageService.getTodoComments(fileName, JSON.parse(descriptors));
|
||||
return items;
|
||||
});
|
||||
`getTodoComments('${fileName}')`,
|
||||
() => this.languageService.getTodoComments(fileName, JSON.parse(descriptors))
|
||||
);
|
||||
}
|
||||
|
||||
/// Emit
|
||||
public getEmitOutput(fileName: string): string {
|
||||
return this.forwardJSONCall(
|
||||
"getEmitOutput('" + fileName + "')",
|
||||
() => {
|
||||
var output = this.languageService.getEmitOutput(fileName);
|
||||
// Shim the API changes for 1.5 release. This should be removed once
|
||||
// TypeScript 1.5 has shipped.
|
||||
(<any>output).emitOutputStatus = output.emitSkipped ? 1 : 0;
|
||||
return output;
|
||||
});
|
||||
`getEmitOutput('${fileName}')`,
|
||||
() => this.languageService.getEmitOutput(fileName)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -918,12 +865,11 @@ namespace ts {
|
||||
|
||||
/// COLORIZATION
|
||||
public getClassificationsForLine(text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean): string {
|
||||
var classification = this.classifier.getClassificationsForLine(text, lexState, classifyKeywordsInGenerics);
|
||||
var items = classification.entries;
|
||||
var result = "";
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
result += items[i].length + "\n";
|
||||
result += items[i].classification + "\n";
|
||||
const classification = this.classifier.getClassificationsForLine(text, lexState, classifyKeywordsInGenerics);
|
||||
let result = "";
|
||||
for (const item of classification.entries) {
|
||||
result += item.length + "\n";
|
||||
result += item.classification + "\n";
|
||||
}
|
||||
result += classification.finalLexState;
|
||||
return result;
|
||||
@@ -940,16 +886,16 @@ namespace ts {
|
||||
private forwardJSONCall(actionDescription: string, action: () => any): any {
|
||||
return forwardJSONCall(this.logger, actionDescription, action, this.logPerformance);
|
||||
}
|
||||
|
||||
|
||||
public resolveModuleName(fileName: string, moduleName: string, compilerOptionsJson: string): string {
|
||||
return this.forwardJSONCall(`resolveModuleName('${fileName}')`, () => {
|
||||
let compilerOptions = <CompilerOptions>JSON.parse(compilerOptionsJson);
|
||||
const compilerOptions = <CompilerOptions>JSON.parse(compilerOptionsJson);
|
||||
const result = resolveModuleName(moduleName, normalizeSlashes(fileName), compilerOptions, this.host);
|
||||
return {
|
||||
resolvedFileName: result.resolvedModule ? result.resolvedModule.resolvedFileName: undefined,
|
||||
resolvedFileName: result.resolvedModule ? result.resolvedModule.resolvedFileName : undefined,
|
||||
failedLookupLocations: result.failedLookupLocations
|
||||
};
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
public getPreProcessedFileInfo(fileName: string, sourceTextSnapshot: IScriptSnapshot): string {
|
||||
@@ -957,8 +903,8 @@ namespace ts {
|
||||
"getPreProcessedFileInfo('" + fileName + "')",
|
||||
() => {
|
||||
// for now treat files as JavaScript
|
||||
var result = preProcessFile(sourceTextSnapshot.getText(0, sourceTextSnapshot.getLength()), /* readImportFiles */ true, /* detectJavaScriptImports */ true);
|
||||
var convertResult = {
|
||||
const result = preProcessFile(sourceTextSnapshot.getText(0, sourceTextSnapshot.getLength()), /* readImportFiles */ true, /* detectJavaScriptImports */ true);
|
||||
const convertResult = {
|
||||
referencedFiles: <IFileReference[]>[],
|
||||
importedFiles: <IFileReference[]>[],
|
||||
ambientExternalModules: result.ambientExternalModules,
|
||||
@@ -986,26 +932,26 @@ namespace ts {
|
||||
|
||||
public getTSConfigFileInfo(fileName: string, sourceTextSnapshot: IScriptSnapshot): string {
|
||||
return this.forwardJSONCall(
|
||||
"getTSConfigFileInfo('" + fileName + "')",
|
||||
`getTSConfigFileInfo('${fileName}')`,
|
||||
() => {
|
||||
let text = sourceTextSnapshot.getText(0, sourceTextSnapshot.getLength());
|
||||
const text = sourceTextSnapshot.getText(0, sourceTextSnapshot.getLength());
|
||||
|
||||
let result = parseConfigFileTextToJson(fileName, text);
|
||||
const result = parseConfigFileTextToJson(fileName, text);
|
||||
|
||||
if (result.error) {
|
||||
return {
|
||||
options: {},
|
||||
files: [],
|
||||
errors: [realizeDiagnostic(result.error, '\r\n')]
|
||||
errors: [realizeDiagnostic(result.error, "\r\n")]
|
||||
};
|
||||
}
|
||||
|
||||
var configFile = parseJsonConfigFileContent(result.config, this.host, getDirectoryPath(normalizeSlashes(fileName)));
|
||||
const configFile = parseJsonConfigFileContent(result.config, this.host, getDirectoryPath(normalizeSlashes(fileName)));
|
||||
|
||||
return {
|
||||
options: configFile.options,
|
||||
files: configFile.fileNames,
|
||||
errors: realizeDiagnostics(configFile.errors, '\r\n')
|
||||
errors: realizeDiagnostics(configFile.errors, "\r\n")
|
||||
};
|
||||
});
|
||||
}
|
||||
@@ -1013,9 +959,8 @@ namespace ts {
|
||||
public getDefaultCompilationSettings(): string {
|
||||
return this.forwardJSONCall(
|
||||
"getDefaultCompilationSettings()",
|
||||
() => {
|
||||
return getDefaultCompilerOptions();
|
||||
});
|
||||
() => getDefaultCompilerOptions()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1035,8 +980,8 @@ namespace ts {
|
||||
if (this.documentRegistry === undefined) {
|
||||
this.documentRegistry = createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames(), host.getCurrentDirectory());
|
||||
}
|
||||
var hostAdapter = new LanguageServiceShimHostAdapter(host);
|
||||
var languageService = createLanguageService(hostAdapter, this.documentRegistry);
|
||||
const hostAdapter = new LanguageServiceShimHostAdapter(host);
|
||||
const languageService = createLanguageService(hostAdapter, this.documentRegistry);
|
||||
return new LanguageServiceShimObject(this, host, languageService);
|
||||
}
|
||||
catch (err) {
|
||||
@@ -1057,7 +1002,7 @@ namespace ts {
|
||||
|
||||
public createCoreServicesShim(host: CoreServicesShimHost): CoreServicesShim {
|
||||
try {
|
||||
var adapter = new CoreServicesShimHostAdapter(host);
|
||||
const adapter = new CoreServicesShimHostAdapter(host);
|
||||
return new CoreServicesShimObject(this, <Logger>host, adapter);
|
||||
}
|
||||
catch (err) {
|
||||
@@ -1077,7 +1022,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
public unregisterShim(shim: Shim): void {
|
||||
for (var i = 0, n = this._shims.length; i < n; i++) {
|
||||
for (let i = 0, n = this._shims.length; i < n; i++) {
|
||||
if (this._shims[i] === shim) {
|
||||
delete this._shims[i];
|
||||
return;
|
||||
@@ -1096,12 +1041,21 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
/* tslint:enable:no-in-operator */
|
||||
/* tslint:enable:no-null */
|
||||
|
||||
|
||||
/// TODO: this is used by VS, clean this up on both sides of the interface
|
||||
/* @internal */
|
||||
module TypeScript.Services {
|
||||
export var TypeScriptServicesFactory = ts.TypeScriptServicesFactory;
|
||||
namespace TypeScript.Services {
|
||||
export const TypeScriptServicesFactory = ts.TypeScriptServicesFactory;
|
||||
}
|
||||
|
||||
/* tslint:disable:no-unused-variable */
|
||||
// 'toolsVersion' gets consumed by the managed side, so it's not unused.
|
||||
// TODO: it should be moved into a namespace though.
|
||||
|
||||
/* @internal */
|
||||
const toolsVersion = "1.6";
|
||||
const toolsVersion = "1.8";
|
||||
|
||||
/* tslint:enable:no-unused-variable */
|
||||
@@ -608,6 +608,36 @@ namespace ts {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
export function isArrayLiteralOrObjectLiteralDestructuringPattern(node: Node) {
|
||||
if (node.kind === SyntaxKind.ArrayLiteralExpression ||
|
||||
node.kind === SyntaxKind.ObjectLiteralExpression) {
|
||||
// [a,b,c] from:
|
||||
// [a, b, c] = someExpression;
|
||||
if (node.parent.kind === SyntaxKind.BinaryExpression &&
|
||||
(<BinaryExpression>node.parent).left === node &&
|
||||
(<BinaryExpression>node.parent).operatorToken.kind === SyntaxKind.EqualsToken) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// [a, b, c] from:
|
||||
// for([a, b, c] of expression)
|
||||
if (node.parent.kind === SyntaxKind.ForOfStatement &&
|
||||
(<ForOfStatement>node.parent).initializer === node) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// [a, b, c] of
|
||||
// [x, [a, b, c] ] = someExpression
|
||||
// or
|
||||
// {x, a: {a, b, c} } = someExpression
|
||||
if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === SyntaxKind.PropertyAssignment ? node.parent.parent : node.parent)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Display-part writer helpers
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
//// [ES5For-of1.js.map]
|
||||
{"version":3,"file":"ES5For-of1.js","sourceRoot":"","sources":["ES5For-of1.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAU,UAAe,EAAf,MAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAxB,cAAK,EAAL,IAAwB,CAAC;IAAzB,IAAI,CAAC,SAAA;IACN,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAClB"}
|
||||
{"version":3,"file":"ES5For-of1.js","sourceRoot":"","sources":["ES5For-of1.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAU,UAAe,EAAf,MAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAf,cAAe,EAAf,IAAe,CAAC;IAAzB,IAAI,CAAC,SAAA;IACN,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAClB"}
|
||||
@@ -41,9 +41,9 @@ sourceFile:ES5For-of1.ts
|
||||
12> 'c'
|
||||
13> ]
|
||||
14>
|
||||
15> var v
|
||||
15> ['a', 'b', 'c']
|
||||
16>
|
||||
17> var v of ['a', 'b', 'c']
|
||||
17> ['a', 'b', 'c']
|
||||
18> )
|
||||
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
|
||||
2 >Emitted(1, 4) Source(1, 4) + SourceIndex(0)
|
||||
@@ -58,9 +58,9 @@ sourceFile:ES5For-of1.ts
|
||||
11>Emitted(1, 34) Source(1, 26) + SourceIndex(0)
|
||||
12>Emitted(1, 37) Source(1, 29) + SourceIndex(0)
|
||||
13>Emitted(1, 38) Source(1, 30) + SourceIndex(0)
|
||||
14>Emitted(1, 40) Source(1, 6) + SourceIndex(0)
|
||||
15>Emitted(1, 54) Source(1, 11) + SourceIndex(0)
|
||||
16>Emitted(1, 56) Source(1, 6) + SourceIndex(0)
|
||||
14>Emitted(1, 40) Source(1, 15) + SourceIndex(0)
|
||||
15>Emitted(1, 54) Source(1, 30) + SourceIndex(0)
|
||||
16>Emitted(1, 56) Source(1, 15) + SourceIndex(0)
|
||||
17>Emitted(1, 60) Source(1, 30) + SourceIndex(0)
|
||||
18>Emitted(1, 61) Source(1, 31) + SourceIndex(0)
|
||||
---
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
//// [ES5For-of13.js.map]
|
||||
{"version":3,"file":"ES5For-of13.js","sourceRoot":"","sources":["ES5For-of13.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAU,UAAe,EAAf,MAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAxB,cAAK,EAAL,IAAwB,CAAC;IAAzB,IAAI,CAAC,SAAA;IACN,IAAI,CAAC,GAAG,CAAC,CAAC;CACb"}
|
||||
{"version":3,"file":"ES5For-of13.js","sourceRoot":"","sources":["ES5For-of13.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAU,UAAe,EAAf,MAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAf,cAAe,EAAf,IAAe,CAAC;IAAzB,IAAI,CAAC,SAAA;IACN,IAAI,CAAC,GAAG,CAAC,CAAC;CACb"}
|
||||
@@ -41,9 +41,9 @@ sourceFile:ES5For-of13.ts
|
||||
12> 'c'
|
||||
13> ]
|
||||
14>
|
||||
15> let v
|
||||
15> ['a', 'b', 'c']
|
||||
16>
|
||||
17> let v of ['a', 'b', 'c']
|
||||
17> ['a', 'b', 'c']
|
||||
18> )
|
||||
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
|
||||
2 >Emitted(1, 4) Source(1, 4) + SourceIndex(0)
|
||||
@@ -58,9 +58,9 @@ sourceFile:ES5For-of13.ts
|
||||
11>Emitted(1, 34) Source(1, 26) + SourceIndex(0)
|
||||
12>Emitted(1, 37) Source(1, 29) + SourceIndex(0)
|
||||
13>Emitted(1, 38) Source(1, 30) + SourceIndex(0)
|
||||
14>Emitted(1, 40) Source(1, 6) + SourceIndex(0)
|
||||
15>Emitted(1, 54) Source(1, 11) + SourceIndex(0)
|
||||
16>Emitted(1, 56) Source(1, 6) + SourceIndex(0)
|
||||
14>Emitted(1, 40) Source(1, 15) + SourceIndex(0)
|
||||
15>Emitted(1, 54) Source(1, 30) + SourceIndex(0)
|
||||
16>Emitted(1, 56) Source(1, 15) + SourceIndex(0)
|
||||
17>Emitted(1, 60) Source(1, 30) + SourceIndex(0)
|
||||
18>Emitted(1, 61) Source(1, 31) + SourceIndex(0)
|
||||
---
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
//// [ES5For-of25.js.map]
|
||||
{"version":3,"file":"ES5For-of25.js","sourceRoot":"","sources":["ES5For-of25.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAClB,GAAG,CAAC,CAAU,UAAC,EAAD,OAAC,EAAV,eAAK,EAAL,IAAU,CAAC;IAAX,IAAI,CAAC,UAAA;IACN,CAAC,CAAC;IACF,CAAC,CAAC;CACL"}
|
||||
{"version":3,"file":"ES5For-of25.js","sourceRoot":"","sources":["ES5For-of25.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAClB,GAAG,CAAC,CAAU,UAAC,EAAD,OAAC,EAAD,eAAC,EAAD,IAAC,CAAC;IAAX,IAAI,CAAC,UAAA;IACN,CAAC,CAAC;IACF,CAAC,CAAC;CACL"}
|
||||
@@ -69,9 +69,9 @@ sourceFile:ES5For-of25.ts
|
||||
6 >
|
||||
7 > a
|
||||
8 >
|
||||
9 > var v
|
||||
9 > a
|
||||
10>
|
||||
11> var v of a
|
||||
11> a
|
||||
12> )
|
||||
1->Emitted(2, 1) Source(2, 1) + SourceIndex(0)
|
||||
2 >Emitted(2, 4) Source(2, 4) + SourceIndex(0)
|
||||
@@ -80,9 +80,9 @@ sourceFile:ES5For-of25.ts
|
||||
5 >Emitted(2, 16) Source(2, 16) + SourceIndex(0)
|
||||
6 >Emitted(2, 18) Source(2, 15) + SourceIndex(0)
|
||||
7 >Emitted(2, 25) Source(2, 16) + SourceIndex(0)
|
||||
8 >Emitted(2, 27) Source(2, 6) + SourceIndex(0)
|
||||
9 >Emitted(2, 42) Source(2, 11) + SourceIndex(0)
|
||||
10>Emitted(2, 44) Source(2, 6) + SourceIndex(0)
|
||||
8 >Emitted(2, 27) Source(2, 15) + SourceIndex(0)
|
||||
9 >Emitted(2, 42) Source(2, 16) + SourceIndex(0)
|
||||
10>Emitted(2, 44) Source(2, 15) + SourceIndex(0)
|
||||
11>Emitted(2, 48) Source(2, 16) + SourceIndex(0)
|
||||
12>Emitted(2, 49) Source(2, 17) + SourceIndex(0)
|
||||
---
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
//// [ES5For-of26.js.map]
|
||||
{"version":3,"file":"ES5For-of26.js","sourceRoot":"","sources":["ES5For-of26.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAuB,UAAM,EAAN,MAAC,CAAC,EAAE,CAAC,CAAC,EAA5B,cAAkB,EAAlB,IAA4B,CAAC;IAA7B,6BAAK,CAAC,mBAAG,CAAC,mBAAE,CAAC,mBAAG,CAAC,KAAC;IACnB,CAAC,CAAC;IACF,CAAC,CAAC;CACL"}
|
||||
{"version":3,"file":"ES5For-of26.js","sourceRoot":"","sources":["ES5For-of26.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAuB,UAAM,EAAN,MAAC,CAAC,EAAE,CAAC,CAAC,EAAN,cAAM,EAAN,IAAM,CAAC;IAA7B,eAAkB,EAAb,UAAK,EAAL,0BAAK,EAAE,UAAK,EAAL,0BAAK;IAClB,CAAC,CAAC;IACF,CAAC,CAAC;CACL"}
|
||||
@@ -38,9 +38,9 @@ sourceFile:ES5For-of26.ts
|
||||
10> 3
|
||||
11> ]
|
||||
12>
|
||||
13> var [a = 0, b = 1]
|
||||
13> [2, 3]
|
||||
14>
|
||||
15> var [a = 0, b = 1] of [2, 3]
|
||||
15> [2, 3]
|
||||
16> )
|
||||
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
|
||||
2 >Emitted(1, 4) Source(1, 4) + SourceIndex(0)
|
||||
@@ -53,50 +53,50 @@ sourceFile:ES5For-of26.ts
|
||||
9 >Emitted(1, 27) Source(1, 32) + SourceIndex(0)
|
||||
10>Emitted(1, 28) Source(1, 33) + SourceIndex(0)
|
||||
11>Emitted(1, 29) Source(1, 34) + SourceIndex(0)
|
||||
12>Emitted(1, 31) Source(1, 6) + SourceIndex(0)
|
||||
13>Emitted(1, 45) Source(1, 24) + SourceIndex(0)
|
||||
14>Emitted(1, 47) Source(1, 6) + SourceIndex(0)
|
||||
12>Emitted(1, 31) Source(1, 28) + SourceIndex(0)
|
||||
13>Emitted(1, 45) Source(1, 34) + SourceIndex(0)
|
||||
14>Emitted(1, 47) Source(1, 28) + SourceIndex(0)
|
||||
15>Emitted(1, 51) Source(1, 34) + SourceIndex(0)
|
||||
16>Emitted(1, 52) Source(1, 35) + SourceIndex(0)
|
||||
---
|
||||
>>> var _b = _a[_i], _c = _b[0], a = _c === void 0 ? 0 : _c, _d = _b[1], b = _d === void 0 ? 1 : _d;
|
||||
1->^^^^
|
||||
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
3 > ^
|
||||
4 > ^^^^^^^^^^^^^^^^^^^
|
||||
5 > ^
|
||||
6 > ^^^^^^^^^^^^^^^^^^^
|
||||
7 > ^
|
||||
8 > ^^^^^^^^^^^^^^^^^^^
|
||||
9 > ^
|
||||
10> ^^^^^
|
||||
2 > ^^^^^^^^^^^^^^^
|
||||
3 > ^^
|
||||
4 > ^^^^^^^^^^
|
||||
5 > ^^
|
||||
6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
7 > ^^
|
||||
8 > ^^^^^^^^^^
|
||||
9 > ^^
|
||||
10> ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
1->
|
||||
2 > var [
|
||||
3 > a
|
||||
4 > =
|
||||
5 > 0
|
||||
6 > ,
|
||||
7 > b
|
||||
8 > =
|
||||
9 > 1
|
||||
10> ]
|
||||
2 > var [a = 0, b = 1]
|
||||
3 >
|
||||
4 > a = 0
|
||||
5 >
|
||||
6 > a = 0
|
||||
7 > ,
|
||||
8 > b = 1
|
||||
9 >
|
||||
10> b = 1
|
||||
1->Emitted(2, 5) Source(1, 6) + SourceIndex(0)
|
||||
2 >Emitted(2, 34) Source(1, 11) + SourceIndex(0)
|
||||
3 >Emitted(2, 35) Source(1, 12) + SourceIndex(0)
|
||||
4 >Emitted(2, 54) Source(1, 15) + SourceIndex(0)
|
||||
5 >Emitted(2, 55) Source(1, 16) + SourceIndex(0)
|
||||
6 >Emitted(2, 74) Source(1, 18) + SourceIndex(0)
|
||||
7 >Emitted(2, 75) Source(1, 19) + SourceIndex(0)
|
||||
8 >Emitted(2, 94) Source(1, 22) + SourceIndex(0)
|
||||
9 >Emitted(2, 95) Source(1, 23) + SourceIndex(0)
|
||||
10>Emitted(2, 100) Source(1, 24) + SourceIndex(0)
|
||||
2 >Emitted(2, 20) Source(1, 24) + SourceIndex(0)
|
||||
3 >Emitted(2, 22) Source(1, 11) + SourceIndex(0)
|
||||
4 >Emitted(2, 32) Source(1, 16) + SourceIndex(0)
|
||||
5 >Emitted(2, 34) Source(1, 11) + SourceIndex(0)
|
||||
6 >Emitted(2, 60) Source(1, 16) + SourceIndex(0)
|
||||
7 >Emitted(2, 62) Source(1, 18) + SourceIndex(0)
|
||||
8 >Emitted(2, 72) Source(1, 23) + SourceIndex(0)
|
||||
9 >Emitted(2, 74) Source(1, 18) + SourceIndex(0)
|
||||
10>Emitted(2, 100) Source(1, 23) + SourceIndex(0)
|
||||
---
|
||||
>>> a;
|
||||
1 >^^^^
|
||||
2 > ^
|
||||
3 > ^
|
||||
4 > ^->
|
||||
1 > of [2, 3]) {
|
||||
1 >] of [2, 3]) {
|
||||
>
|
||||
2 > a
|
||||
3 > ;
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
//// [ES5For-of3.js.map]
|
||||
{"version":3,"file":"ES5For-of3.js","sourceRoot":"","sources":["ES5For-of3.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAU,UAAe,EAAf,MAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAxB,cAAK,EAAL,IAAwB,CAAC;IAAzB,IAAI,CAAC,SAAA;IACN,IAAI,CAAC,GAAG,CAAC,CAAC;CAAA"}
|
||||
{"version":3,"file":"ES5For-of3.js","sourceRoot":"","sources":["ES5For-of3.ts"],"names":[],"mappings":"AAAA,GAAG,CAAC,CAAU,UAAe,EAAf,MAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAf,cAAe,EAAf,IAAe,CAAC;IAAzB,IAAI,CAAC,SAAA;IACN,IAAI,CAAC,GAAG,CAAC,CAAC;CAAA"}
|
||||
@@ -41,9 +41,9 @@ sourceFile:ES5For-of3.ts
|
||||
12> 'c'
|
||||
13> ]
|
||||
14>
|
||||
15> var v
|
||||
15> ['a', 'b', 'c']
|
||||
16>
|
||||
17> var v of ['a', 'b', 'c']
|
||||
17> ['a', 'b', 'c']
|
||||
18> )
|
||||
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
|
||||
2 >Emitted(1, 4) Source(1, 4) + SourceIndex(0)
|
||||
@@ -58,9 +58,9 @@ sourceFile:ES5For-of3.ts
|
||||
11>Emitted(1, 34) Source(1, 26) + SourceIndex(0)
|
||||
12>Emitted(1, 37) Source(1, 29) + SourceIndex(0)
|
||||
13>Emitted(1, 38) Source(1, 30) + SourceIndex(0)
|
||||
14>Emitted(1, 40) Source(1, 6) + SourceIndex(0)
|
||||
15>Emitted(1, 54) Source(1, 11) + SourceIndex(0)
|
||||
16>Emitted(1, 56) Source(1, 6) + SourceIndex(0)
|
||||
14>Emitted(1, 40) Source(1, 15) + SourceIndex(0)
|
||||
15>Emitted(1, 54) Source(1, 30) + SourceIndex(0)
|
||||
16>Emitted(1, 56) Source(1, 15) + SourceIndex(0)
|
||||
17>Emitted(1, 60) Source(1, 30) + SourceIndex(0)
|
||||
18>Emitted(1, 61) Source(1, 31) + SourceIndex(0)
|
||||
---
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
//// [ES5For-of8.js.map]
|
||||
{"version":3,"file":"ES5For-of8.js","sourceRoot":"","sources":["ES5For-of8.ts"],"names":[],"mappings":"AAAA;IACI,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AACpB,CAAC;AACD,GAAG,CAAC,CAAY,UAAe,EAAf,MAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAA1B,cAAO,EAAP,IAA0B,CAAC;IAA3B,GAAG,EAAE,CAAC,CAAC,SAAA;IACR,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;CACnB"}
|
||||
{"version":3,"file":"ES5For-of8.js","sourceRoot":"","sources":["ES5For-of8.ts"],"names":[],"mappings":"AAAA;IACI,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AACpB,CAAC;AACD,GAAG,CAAC,CAAY,UAAe,EAAf,MAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAf,cAAe,EAAf,IAAe,CAAC;IAA3B,GAAG,EAAE,CAAC,CAAC,SAAA;IACR,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;CACnB"}
|
||||
@@ -88,9 +88,9 @@ sourceFile:ES5For-of8.ts
|
||||
12> 'c'
|
||||
13> ]
|
||||
14>
|
||||
15> foo().x
|
||||
15> ['a', 'b', 'c']
|
||||
16>
|
||||
17> foo().x of ['a', 'b', 'c']
|
||||
17> ['a', 'b', 'c']
|
||||
18> )
|
||||
1->Emitted(4, 1) Source(4, 1) + SourceIndex(0)
|
||||
2 >Emitted(4, 4) Source(4, 4) + SourceIndex(0)
|
||||
@@ -105,9 +105,9 @@ sourceFile:ES5For-of8.ts
|
||||
11>Emitted(4, 34) Source(4, 28) + SourceIndex(0)
|
||||
12>Emitted(4, 37) Source(4, 31) + SourceIndex(0)
|
||||
13>Emitted(4, 38) Source(4, 32) + SourceIndex(0)
|
||||
14>Emitted(4, 40) Source(4, 6) + SourceIndex(0)
|
||||
15>Emitted(4, 54) Source(4, 13) + SourceIndex(0)
|
||||
16>Emitted(4, 56) Source(4, 6) + SourceIndex(0)
|
||||
14>Emitted(4, 40) Source(4, 17) + SourceIndex(0)
|
||||
15>Emitted(4, 54) Source(4, 32) + SourceIndex(0)
|
||||
16>Emitted(4, 56) Source(4, 17) + SourceIndex(0)
|
||||
17>Emitted(4, 60) Source(4, 32) + SourceIndex(0)
|
||||
18>Emitted(4, 61) Source(4, 33) + SourceIndex(0)
|
||||
---
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(5,16): error TS2661: Invalid module name in augmentation, module 'ext' cannot be found.
|
||||
tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(5,16): error TS2662: Invalid module name in augmentation, module 'ext' cannot be found.
|
||||
tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(10,22): error TS2307: Cannot find module 'ext'.
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(10,22): err
|
||||
|
||||
declare module "ext" {
|
||||
~~~~~
|
||||
!!! error TS2661: Invalid module name in augmentation, module 'ext' cannot be found.
|
||||
!!! error TS2662: Invalid module name in augmentation, module 'ext' cannot be found.
|
||||
export class C { }
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbient.ts(2,5): error TS2665: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible.
|
||||
tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbient.ts(2,5): error TS2666: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible.
|
||||
tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbient.ts(2,27): error TS2435: Ambient modules cannot be nested in other modules or namespaces.
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbient.ts(2,27):
|
||||
module M {
|
||||
export declare module "M" { }
|
||||
~~~~~~
|
||||
!!! error TS2665: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible.
|
||||
!!! error TS2666: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible.
|
||||
~~~
|
||||
!!! error TS2435: Ambient modules cannot be nested in other modules or namespaces.
|
||||
}
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts(1,1): error TS2665: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible.
|
||||
tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts(1,23): error TS2661: Invalid module name in augmentation, module 'M' cannot be found.
|
||||
tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts(1,1): error TS2666: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible.
|
||||
tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts(1,23): error TS2662: Invalid module name in augmentation, module 'M' cannot be found.
|
||||
|
||||
|
||||
==== tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts (2 errors) ====
|
||||
export declare module "M" { }
|
||||
~~~~~~
|
||||
!!! error TS2665: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible.
|
||||
!!! error TS2666: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible.
|
||||
~~~
|
||||
!!! error TS2661: Invalid module name in augmentation, module 'M' cannot be found.
|
||||
!!! error TS2662: Invalid module name in augmentation, module 'M' cannot be found.
|
||||
+1005
File diff suppressed because it is too large
Load Diff
+1008
File diff suppressed because it is too large
Load Diff
+1171
File diff suppressed because it is too large
Load Diff
+1483
File diff suppressed because it is too large
Load Diff
+779
@@ -0,0 +1,779 @@
|
||||
|
||||
1 >declare var console: {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined
|
||||
--------------------------------
|
||||
2 > log(msg: any): void;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined
|
||||
--------------------------------
|
||||
3 >}
|
||||
|
||||
~~ => Pos: (48 to 49) SpanInfo: undefined
|
||||
--------------------------------
|
||||
4 >type Robot = [number, string, string];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (50 to 88) SpanInfo: undefined
|
||||
--------------------------------
|
||||
5 >type MultiSkilledRobot = [string, [string, string]];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (89 to 141) SpanInfo: undefined
|
||||
--------------------------------
|
||||
6 >let robotA: Robot = [1, "mower", "mowing"];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (142 to 185) SpanInfo: {"start":142,"length":42}
|
||||
>let robotA: Robot = [1, "mower", "mowing"]
|
||||
>:=> (line 6, col 0) to (line 6, col 42)
|
||||
--------------------------------
|
||||
7 >let robotB: Robot = [2, "trimmer", "trimming"];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (186 to 233) SpanInfo: {"start":186,"length":46}
|
||||
>let robotB: Robot = [2, "trimmer", "trimming"]
|
||||
>:=> (line 7, col 0) to (line 7, col 46)
|
||||
--------------------------------
|
||||
8 >let robots = [robotA, robotB];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (234 to 264) SpanInfo: {"start":234,"length":29}
|
||||
>let robots = [robotA, robotB]
|
||||
>:=> (line 8, col 0) to (line 8, col 29)
|
||||
--------------------------------
|
||||
9 >function getRobots() {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (265 to 287) SpanInfo: {"start":292,"length":13}
|
||||
>return robots
|
||||
>:=> (line 10, col 4) to (line 10, col 17)
|
||||
--------------------------------
|
||||
10 > return robots;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (288 to 306) SpanInfo: {"start":292,"length":13}
|
||||
>return robots
|
||||
>:=> (line 10, col 4) to (line 10, col 17)
|
||||
--------------------------------
|
||||
11 >}
|
||||
|
||||
~~ => Pos: (307 to 308) SpanInfo: {"start":307,"length":1}
|
||||
>}
|
||||
>:=> (line 11, col 0) to (line 11, col 1)
|
||||
--------------------------------
|
||||
12 >let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (309 to 372) SpanInfo: {"start":309,"length":62}
|
||||
>let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]
|
||||
>:=> (line 12, col 0) to (line 12, col 62)
|
||||
--------------------------------
|
||||
13 >let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (373 to 446) SpanInfo: {"start":373,"length":72}
|
||||
>let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]
|
||||
>:=> (line 13, col 0) to (line 13, col 72)
|
||||
--------------------------------
|
||||
14 >let multiRobots = [multiRobotA, multiRobotB];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (447 to 492) SpanInfo: {"start":447,"length":44}
|
||||
>let multiRobots = [multiRobotA, multiRobotB]
|
||||
>:=> (line 14, col 0) to (line 14, col 44)
|
||||
--------------------------------
|
||||
15 >function getMultiRobots() {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (493 to 520) SpanInfo: {"start":525,"length":18}
|
||||
>return multiRobots
|
||||
>:=> (line 16, col 4) to (line 16, col 22)
|
||||
--------------------------------
|
||||
16 > return multiRobots;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (521 to 544) SpanInfo: {"start":525,"length":18}
|
||||
>return multiRobots
|
||||
>:=> (line 16, col 4) to (line 16, col 22)
|
||||
--------------------------------
|
||||
17 >}
|
||||
|
||||
~~ => Pos: (545 to 546) SpanInfo: {"start":545,"length":1}
|
||||
>}
|
||||
>:=> (line 17, col 0) to (line 17, col 1)
|
||||
--------------------------------
|
||||
18 >let nameA: string, primarySkillA: string, secondarySkillA: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (547 to 613) SpanInfo: undefined
|
||||
--------------------------------
|
||||
19 >let numberB: number, nameB: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (614 to 649) SpanInfo: undefined
|
||||
--------------------------------
|
||||
20 >let numberA2: number, nameA2: string, skillA2: string, nameMA: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (650 to 720) SpanInfo: undefined
|
||||
--------------------------------
|
||||
21 >let numberA3: number, robotAInfo: (number | string)[], multiRobotAInfo: (string | [string, string])[];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (721 to 823) SpanInfo: undefined
|
||||
--------------------------------
|
||||
22 >for ([, nameA] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (824 to 837) SpanInfo: {"start":832,"length":5}
|
||||
>nameA
|
||||
>:=> (line 22, col 8) to (line 22, col 13)
|
||||
22 >for ([, nameA] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (838 to 851) SpanInfo: {"start":842,"length":6}
|
||||
>robots
|
||||
>:=> (line 22, col 18) to (line 22, col 24)
|
||||
--------------------------------
|
||||
23 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (852 to 875) SpanInfo: {"start":856,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 23, col 4) to (line 23, col 22)
|
||||
--------------------------------
|
||||
24 >}
|
||||
|
||||
~~ => Pos: (876 to 877) SpanInfo: {"start":856,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 23, col 4) to (line 23, col 22)
|
||||
--------------------------------
|
||||
25 >for ([, nameA] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (878 to 891) SpanInfo: {"start":886,"length":5}
|
||||
>nameA
|
||||
>:=> (line 25, col 8) to (line 25, col 13)
|
||||
25 >for ([, nameA] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (892 to 910) SpanInfo: {"start":896,"length":11}
|
||||
>getRobots()
|
||||
>:=> (line 25, col 18) to (line 25, col 29)
|
||||
--------------------------------
|
||||
26 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (911 to 934) SpanInfo: {"start":915,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 26, col 4) to (line 26, col 22)
|
||||
--------------------------------
|
||||
27 >}
|
||||
|
||||
~~ => Pos: (935 to 936) SpanInfo: {"start":915,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 26, col 4) to (line 26, col 22)
|
||||
--------------------------------
|
||||
28 >for ([, nameA] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (937 to 950) SpanInfo: {"start":945,"length":5}
|
||||
>nameA
|
||||
>:=> (line 28, col 8) to (line 28, col 13)
|
||||
28 >for ([, nameA] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (951 to 974) SpanInfo: {"start":955,"length":16}
|
||||
>[robotA, robotB]
|
||||
>:=> (line 28, col 18) to (line 28, col 34)
|
||||
--------------------------------
|
||||
29 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (975 to 998) SpanInfo: {"start":979,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 29, col 4) to (line 29, col 22)
|
||||
--------------------------------
|
||||
30 >}
|
||||
|
||||
~~ => Pos: (999 to 1000) SpanInfo: {"start":979,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 29, col 4) to (line 29, col 22)
|
||||
--------------------------------
|
||||
31 >for ([, [primarySkillA, secondarySkillA]] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1001 to 1023) SpanInfo: {"start":1010,"length":13}
|
||||
>primarySkillA
|
||||
>:=> (line 31, col 9) to (line 31, col 22)
|
||||
31 >for ([, [primarySkillA, secondarySkillA]] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~ => Pos: (1024 to 1040) SpanInfo: {"start":1025,"length":15}
|
||||
>secondarySkillA
|
||||
>:=> (line 31, col 24) to (line 31, col 39)
|
||||
31 >for ([, [primarySkillA, secondarySkillA]] of multiRobots) {
|
||||
|
||||
~ => Pos: (1041 to 1041) SpanInfo: {"start":1009,"length":32}
|
||||
>[primarySkillA, secondarySkillA]
|
||||
>:=> (line 31, col 8) to (line 31, col 40)
|
||||
31 >for ([, [primarySkillA, secondarySkillA]] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (1042 to 1060) SpanInfo: {"start":1046,"length":11}
|
||||
>multiRobots
|
||||
>:=> (line 31, col 45) to (line 31, col 56)
|
||||
--------------------------------
|
||||
32 > console.log(primarySkillA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1061 to 1092) SpanInfo: {"start":1065,"length":26}
|
||||
>console.log(primarySkillA)
|
||||
>:=> (line 32, col 4) to (line 32, col 30)
|
||||
--------------------------------
|
||||
33 >}
|
||||
|
||||
~~ => Pos: (1093 to 1094) SpanInfo: {"start":1065,"length":26}
|
||||
>console.log(primarySkillA)
|
||||
>:=> (line 32, col 4) to (line 32, col 30)
|
||||
--------------------------------
|
||||
34 >for ([, [primarySkillA, secondarySkillA]] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1095 to 1117) SpanInfo: {"start":1104,"length":13}
|
||||
>primarySkillA
|
||||
>:=> (line 34, col 9) to (line 34, col 22)
|
||||
34 >for ([, [primarySkillA, secondarySkillA]] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~ => Pos: (1118 to 1134) SpanInfo: {"start":1119,"length":15}
|
||||
>secondarySkillA
|
||||
>:=> (line 34, col 24) to (line 34, col 39)
|
||||
34 >for ([, [primarySkillA, secondarySkillA]] of getMultiRobots()) {
|
||||
|
||||
~ => Pos: (1135 to 1135) SpanInfo: {"start":1103,"length":32}
|
||||
>[primarySkillA, secondarySkillA]
|
||||
>:=> (line 34, col 8) to (line 34, col 40)
|
||||
34 >for ([, [primarySkillA, secondarySkillA]] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1136 to 1159) SpanInfo: {"start":1140,"length":16}
|
||||
>getMultiRobots()
|
||||
>:=> (line 34, col 45) to (line 34, col 61)
|
||||
--------------------------------
|
||||
35 > console.log(primarySkillA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1160 to 1191) SpanInfo: {"start":1164,"length":26}
|
||||
>console.log(primarySkillA)
|
||||
>:=> (line 35, col 4) to (line 35, col 30)
|
||||
--------------------------------
|
||||
36 >}
|
||||
|
||||
~~ => Pos: (1192 to 1193) SpanInfo: {"start":1164,"length":26}
|
||||
>console.log(primarySkillA)
|
||||
>:=> (line 35, col 4) to (line 35, col 30)
|
||||
--------------------------------
|
||||
37 >for ([, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1194 to 1216) SpanInfo: {"start":1203,"length":13}
|
||||
>primarySkillA
|
||||
>:=> (line 37, col 9) to (line 37, col 22)
|
||||
37 >for ([, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~ => Pos: (1217 to 1233) SpanInfo: {"start":1218,"length":15}
|
||||
>secondarySkillA
|
||||
>:=> (line 37, col 24) to (line 37, col 39)
|
||||
37 >for ([, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~ => Pos: (1234 to 1234) SpanInfo: {"start":1202,"length":32}
|
||||
>[primarySkillA, secondarySkillA]
|
||||
>:=> (line 37, col 8) to (line 37, col 40)
|
||||
37 >for ([, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1235 to 1268) SpanInfo: {"start":1239,"length":26}
|
||||
>[multiRobotA, multiRobotB]
|
||||
>:=> (line 37, col 45) to (line 37, col 71)
|
||||
--------------------------------
|
||||
38 > console.log(primarySkillA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1269 to 1300) SpanInfo: {"start":1273,"length":26}
|
||||
>console.log(primarySkillA)
|
||||
>:=> (line 38, col 4) to (line 38, col 30)
|
||||
--------------------------------
|
||||
39 >}
|
||||
|
||||
~~ => Pos: (1301 to 1302) SpanInfo: {"start":1273,"length":26}
|
||||
>console.log(primarySkillA)
|
||||
>:=> (line 38, col 4) to (line 38, col 30)
|
||||
--------------------------------
|
||||
40 >for ([numberB] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (1303 to 1316) SpanInfo: {"start":1309,"length":7}
|
||||
>numberB
|
||||
>:=> (line 40, col 6) to (line 40, col 13)
|
||||
40 >for ([numberB] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (1317 to 1330) SpanInfo: {"start":1321,"length":6}
|
||||
>robots
|
||||
>:=> (line 40, col 18) to (line 40, col 24)
|
||||
--------------------------------
|
||||
41 > console.log(numberB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1331 to 1356) SpanInfo: {"start":1335,"length":20}
|
||||
>console.log(numberB)
|
||||
>:=> (line 41, col 4) to (line 41, col 24)
|
||||
--------------------------------
|
||||
42 >}
|
||||
|
||||
~~ => Pos: (1357 to 1358) SpanInfo: {"start":1335,"length":20}
|
||||
>console.log(numberB)
|
||||
>:=> (line 41, col 4) to (line 41, col 24)
|
||||
--------------------------------
|
||||
43 >for ([numberB] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (1359 to 1372) SpanInfo: {"start":1365,"length":7}
|
||||
>numberB
|
||||
>:=> (line 43, col 6) to (line 43, col 13)
|
||||
43 >for ([numberB] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (1373 to 1391) SpanInfo: {"start":1377,"length":11}
|
||||
>getRobots()
|
||||
>:=> (line 43, col 18) to (line 43, col 29)
|
||||
--------------------------------
|
||||
44 > console.log(numberB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1392 to 1417) SpanInfo: {"start":1396,"length":20}
|
||||
>console.log(numberB)
|
||||
>:=> (line 44, col 4) to (line 44, col 24)
|
||||
--------------------------------
|
||||
45 >}
|
||||
|
||||
~~ => Pos: (1418 to 1419) SpanInfo: {"start":1396,"length":20}
|
||||
>console.log(numberB)
|
||||
>:=> (line 44, col 4) to (line 44, col 24)
|
||||
--------------------------------
|
||||
46 >for ([numberB] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (1420 to 1433) SpanInfo: {"start":1426,"length":7}
|
||||
>numberB
|
||||
>:=> (line 46, col 6) to (line 46, col 13)
|
||||
46 >for ([numberB] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1434 to 1457) SpanInfo: {"start":1438,"length":16}
|
||||
>[robotA, robotB]
|
||||
>:=> (line 46, col 18) to (line 46, col 34)
|
||||
--------------------------------
|
||||
47 > console.log(numberB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1458 to 1483) SpanInfo: {"start":1462,"length":20}
|
||||
>console.log(numberB)
|
||||
>:=> (line 47, col 4) to (line 47, col 24)
|
||||
--------------------------------
|
||||
48 >}
|
||||
|
||||
~~ => Pos: (1484 to 1485) SpanInfo: {"start":1462,"length":20}
|
||||
>console.log(numberB)
|
||||
>:=> (line 47, col 4) to (line 47, col 24)
|
||||
--------------------------------
|
||||
49 >for ([nameB] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~ => Pos: (1486 to 1497) SpanInfo: {"start":1492,"length":5}
|
||||
>nameB
|
||||
>:=> (line 49, col 6) to (line 49, col 11)
|
||||
49 >for ([nameB] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (1498 to 1516) SpanInfo: {"start":1502,"length":11}
|
||||
>multiRobots
|
||||
>:=> (line 49, col 16) to (line 49, col 27)
|
||||
--------------------------------
|
||||
50 > console.log(nameB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1517 to 1540) SpanInfo: {"start":1521,"length":18}
|
||||
>console.log(nameB)
|
||||
>:=> (line 50, col 4) to (line 50, col 22)
|
||||
--------------------------------
|
||||
51 >}
|
||||
|
||||
~~ => Pos: (1541 to 1542) SpanInfo: {"start":1521,"length":18}
|
||||
>console.log(nameB)
|
||||
>:=> (line 50, col 4) to (line 50, col 22)
|
||||
--------------------------------
|
||||
52 >for ([nameB] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~ => Pos: (1543 to 1554) SpanInfo: {"start":1549,"length":5}
|
||||
>nameB
|
||||
>:=> (line 52, col 6) to (line 52, col 11)
|
||||
52 >for ([nameB] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1555 to 1578) SpanInfo: {"start":1559,"length":16}
|
||||
>getMultiRobots()
|
||||
>:=> (line 52, col 16) to (line 52, col 32)
|
||||
--------------------------------
|
||||
53 > console.log(nameB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1579 to 1602) SpanInfo: {"start":1583,"length":18}
|
||||
>console.log(nameB)
|
||||
>:=> (line 53, col 4) to (line 53, col 22)
|
||||
--------------------------------
|
||||
54 >}
|
||||
|
||||
~~ => Pos: (1603 to 1604) SpanInfo: {"start":1583,"length":18}
|
||||
>console.log(nameB)
|
||||
>:=> (line 53, col 4) to (line 53, col 22)
|
||||
--------------------------------
|
||||
55 >for ([nameB] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~ => Pos: (1605 to 1616) SpanInfo: {"start":1611,"length":5}
|
||||
>nameB
|
||||
>:=> (line 55, col 6) to (line 55, col 11)
|
||||
55 >for ([nameB] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1617 to 1650) SpanInfo: {"start":1621,"length":26}
|
||||
>[multiRobotA, multiRobotB]
|
||||
>:=> (line 55, col 16) to (line 55, col 42)
|
||||
--------------------------------
|
||||
56 > console.log(nameB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1651 to 1674) SpanInfo: {"start":1655,"length":18}
|
||||
>console.log(nameB)
|
||||
>:=> (line 56, col 4) to (line 56, col 22)
|
||||
--------------------------------
|
||||
57 >}
|
||||
|
||||
~~ => Pos: (1675 to 1676) SpanInfo: {"start":1655,"length":18}
|
||||
>console.log(nameB)
|
||||
>:=> (line 56, col 4) to (line 56, col 22)
|
||||
--------------------------------
|
||||
58 >for ([numberA2, nameA2, skillA2] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~ => Pos: (1677 to 1691) SpanInfo: {"start":1683,"length":8}
|
||||
>numberA2
|
||||
>:=> (line 58, col 6) to (line 58, col 14)
|
||||
58 >for ([numberA2, nameA2, skillA2] of robots) {
|
||||
|
||||
~~~~~~~~ => Pos: (1692 to 1699) SpanInfo: {"start":1693,"length":6}
|
||||
>nameA2
|
||||
>:=> (line 58, col 16) to (line 58, col 22)
|
||||
58 >for ([numberA2, nameA2, skillA2] of robots) {
|
||||
|
||||
~~~~~~~~~ => Pos: (1700 to 1708) SpanInfo: {"start":1701,"length":7}
|
||||
>skillA2
|
||||
>:=> (line 58, col 24) to (line 58, col 31)
|
||||
58 >for ([numberA2, nameA2, skillA2] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~=> Pos: (1709 to 1722) SpanInfo: {"start":1713,"length":6}
|
||||
>robots
|
||||
>:=> (line 58, col 36) to (line 58, col 42)
|
||||
--------------------------------
|
||||
59 > console.log(nameA2);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1723 to 1747) SpanInfo: {"start":1727,"length":19}
|
||||
>console.log(nameA2)
|
||||
>:=> (line 59, col 4) to (line 59, col 23)
|
||||
--------------------------------
|
||||
60 >}
|
||||
|
||||
~~ => Pos: (1748 to 1749) SpanInfo: {"start":1727,"length":19}
|
||||
>console.log(nameA2)
|
||||
>:=> (line 59, col 4) to (line 59, col 23)
|
||||
--------------------------------
|
||||
61 >for ([numberA2, nameA2, skillA2] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~ => Pos: (1750 to 1764) SpanInfo: {"start":1756,"length":8}
|
||||
>numberA2
|
||||
>:=> (line 61, col 6) to (line 61, col 14)
|
||||
61 >for ([numberA2, nameA2, skillA2] of getRobots()) {
|
||||
|
||||
~~~~~~~~ => Pos: (1765 to 1772) SpanInfo: {"start":1766,"length":6}
|
||||
>nameA2
|
||||
>:=> (line 61, col 16) to (line 61, col 22)
|
||||
61 >for ([numberA2, nameA2, skillA2] of getRobots()) {
|
||||
|
||||
~~~~~~~~~ => Pos: (1773 to 1781) SpanInfo: {"start":1774,"length":7}
|
||||
>skillA2
|
||||
>:=> (line 61, col 24) to (line 61, col 31)
|
||||
61 >for ([numberA2, nameA2, skillA2] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (1782 to 1800) SpanInfo: {"start":1786,"length":11}
|
||||
>getRobots()
|
||||
>:=> (line 61, col 36) to (line 61, col 47)
|
||||
--------------------------------
|
||||
62 > console.log(nameA2);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1801 to 1825) SpanInfo: {"start":1805,"length":19}
|
||||
>console.log(nameA2)
|
||||
>:=> (line 62, col 4) to (line 62, col 23)
|
||||
--------------------------------
|
||||
63 >}
|
||||
|
||||
~~ => Pos: (1826 to 1827) SpanInfo: {"start":1805,"length":19}
|
||||
>console.log(nameA2)
|
||||
>:=> (line 62, col 4) to (line 62, col 23)
|
||||
--------------------------------
|
||||
64 >for ([numberA2, nameA2, skillA2] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~ => Pos: (1828 to 1842) SpanInfo: {"start":1834,"length":8}
|
||||
>numberA2
|
||||
>:=> (line 64, col 6) to (line 64, col 14)
|
||||
64 >for ([numberA2, nameA2, skillA2] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~ => Pos: (1843 to 1850) SpanInfo: {"start":1844,"length":6}
|
||||
>nameA2
|
||||
>:=> (line 64, col 16) to (line 64, col 22)
|
||||
64 >for ([numberA2, nameA2, skillA2] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~ => Pos: (1851 to 1859) SpanInfo: {"start":1852,"length":7}
|
||||
>skillA2
|
||||
>:=> (line 64, col 24) to (line 64, col 31)
|
||||
64 >for ([numberA2, nameA2, skillA2] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1860 to 1883) SpanInfo: {"start":1864,"length":16}
|
||||
>[robotA, robotB]
|
||||
>:=> (line 64, col 36) to (line 64, col 52)
|
||||
--------------------------------
|
||||
65 > console.log(nameA2);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1884 to 1908) SpanInfo: {"start":1888,"length":19}
|
||||
>console.log(nameA2)
|
||||
>:=> (line 65, col 4) to (line 65, col 23)
|
||||
--------------------------------
|
||||
66 >}
|
||||
|
||||
~~ => Pos: (1909 to 1910) SpanInfo: {"start":1888,"length":19}
|
||||
>console.log(nameA2)
|
||||
>:=> (line 65, col 4) to (line 65, col 23)
|
||||
--------------------------------
|
||||
67 >for ([nameMA, [primarySkillA, secondarySkillA]] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~ => Pos: (1911 to 1923) SpanInfo: {"start":1917,"length":6}
|
||||
>nameMA
|
||||
>:=> (line 67, col 6) to (line 67, col 12)
|
||||
67 >for ([nameMA, [primarySkillA, secondarySkillA]] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~ => Pos: (1924 to 1939) SpanInfo: {"start":1926,"length":13}
|
||||
>primarySkillA
|
||||
>:=> (line 67, col 15) to (line 67, col 28)
|
||||
67 >for ([nameMA, [primarySkillA, secondarySkillA]] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~=> Pos: (1940 to 1956) SpanInfo: {"start":1941,"length":15}
|
||||
>secondarySkillA
|
||||
>:=> (line 67, col 30) to (line 67, col 45)
|
||||
67 >for ([nameMA, [primarySkillA, secondarySkillA]] of multiRobots) {
|
||||
|
||||
~=> Pos: (1957 to 1957) SpanInfo: {"start":1925,"length":32}
|
||||
>[primarySkillA, secondarySkillA]
|
||||
>:=> (line 67, col 14) to (line 67, col 46)
|
||||
67 >for ([nameMA, [primarySkillA, secondarySkillA]] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (1958 to 1976) SpanInfo: {"start":1962,"length":11}
|
||||
>multiRobots
|
||||
>:=> (line 67, col 51) to (line 67, col 62)
|
||||
--------------------------------
|
||||
68 > console.log(nameMA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1977 to 2001) SpanInfo: {"start":1981,"length":19}
|
||||
>console.log(nameMA)
|
||||
>:=> (line 68, col 4) to (line 68, col 23)
|
||||
--------------------------------
|
||||
69 >}
|
||||
|
||||
~~ => Pos: (2002 to 2003) SpanInfo: {"start":1981,"length":19}
|
||||
>console.log(nameMA)
|
||||
>:=> (line 68, col 4) to (line 68, col 23)
|
||||
--------------------------------
|
||||
70 >for ([nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~ => Pos: (2004 to 2016) SpanInfo: {"start":2010,"length":6}
|
||||
>nameMA
|
||||
>:=> (line 70, col 6) to (line 70, col 12)
|
||||
70 >for ([nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~ => Pos: (2017 to 2032) SpanInfo: {"start":2019,"length":13}
|
||||
>primarySkillA
|
||||
>:=> (line 70, col 15) to (line 70, col 28)
|
||||
70 >for ([nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~=> Pos: (2033 to 2049) SpanInfo: {"start":2034,"length":15}
|
||||
>secondarySkillA
|
||||
>:=> (line 70, col 30) to (line 70, col 45)
|
||||
70 >for ([nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) {
|
||||
|
||||
~=> Pos: (2050 to 2050) SpanInfo: {"start":2018,"length":32}
|
||||
>[primarySkillA, secondarySkillA]
|
||||
>:=> (line 70, col 14) to (line 70, col 46)
|
||||
70 >for ([nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2051 to 2074) SpanInfo: {"start":2055,"length":16}
|
||||
>getMultiRobots()
|
||||
>:=> (line 70, col 51) to (line 70, col 67)
|
||||
--------------------------------
|
||||
71 > console.log(nameMA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2075 to 2099) SpanInfo: {"start":2079,"length":19}
|
||||
>console.log(nameMA)
|
||||
>:=> (line 71, col 4) to (line 71, col 23)
|
||||
--------------------------------
|
||||
72 >}
|
||||
|
||||
~~ => Pos: (2100 to 2101) SpanInfo: {"start":2079,"length":19}
|
||||
>console.log(nameMA)
|
||||
>:=> (line 71, col 4) to (line 71, col 23)
|
||||
--------------------------------
|
||||
73 >for ([nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~ => Pos: (2102 to 2114) SpanInfo: {"start":2108,"length":6}
|
||||
>nameMA
|
||||
>:=> (line 73, col 6) to (line 73, col 12)
|
||||
73 >for ([nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~ => Pos: (2115 to 2130) SpanInfo: {"start":2117,"length":13}
|
||||
>primarySkillA
|
||||
>:=> (line 73, col 15) to (line 73, col 28)
|
||||
73 >for ([nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~=> Pos: (2131 to 2147) SpanInfo: {"start":2132,"length":15}
|
||||
>secondarySkillA
|
||||
>:=> (line 73, col 30) to (line 73, col 45)
|
||||
73 >for ([nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~=> Pos: (2148 to 2148) SpanInfo: {"start":2116,"length":32}
|
||||
>[primarySkillA, secondarySkillA]
|
||||
>:=> (line 73, col 14) to (line 73, col 46)
|
||||
73 >for ([nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2149 to 2182) SpanInfo: {"start":2153,"length":26}
|
||||
>[multiRobotA, multiRobotB]
|
||||
>:=> (line 73, col 51) to (line 73, col 77)
|
||||
--------------------------------
|
||||
74 > console.log(nameMA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2183 to 2207) SpanInfo: {"start":2187,"length":19}
|
||||
>console.log(nameMA)
|
||||
>:=> (line 74, col 4) to (line 74, col 23)
|
||||
--------------------------------
|
||||
75 >}
|
||||
|
||||
~~ => Pos: (2208 to 2209) SpanInfo: {"start":2187,"length":19}
|
||||
>console.log(nameMA)
|
||||
>:=> (line 74, col 4) to (line 74, col 23)
|
||||
--------------------------------
|
||||
76 >for ([numberA3, ...robotAInfo] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~ => Pos: (2210 to 2224) SpanInfo: {"start":2216,"length":8}
|
||||
>numberA3
|
||||
>:=> (line 76, col 6) to (line 76, col 14)
|
||||
76 >for ([numberA3, ...robotAInfo] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~ => Pos: (2225 to 2239) SpanInfo: {"start":2226,"length":13}
|
||||
>...robotAInfo
|
||||
>:=> (line 76, col 16) to (line 76, col 29)
|
||||
76 >for ([numberA3, ...robotAInfo] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (2240 to 2253) SpanInfo: {"start":2244,"length":6}
|
||||
>robots
|
||||
>:=> (line 76, col 34) to (line 76, col 40)
|
||||
--------------------------------
|
||||
77 > console.log(numberA3);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2254 to 2280) SpanInfo: {"start":2258,"length":21}
|
||||
>console.log(numberA3)
|
||||
>:=> (line 77, col 4) to (line 77, col 25)
|
||||
--------------------------------
|
||||
78 >}
|
||||
|
||||
~~ => Pos: (2281 to 2282) SpanInfo: {"start":2258,"length":21}
|
||||
>console.log(numberA3)
|
||||
>:=> (line 77, col 4) to (line 77, col 25)
|
||||
--------------------------------
|
||||
79 >for ([numberA3, ...robotAInfo] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~ => Pos: (2283 to 2297) SpanInfo: {"start":2289,"length":8}
|
||||
>numberA3
|
||||
>:=> (line 79, col 6) to (line 79, col 14)
|
||||
79 >for ([numberA3, ...robotAInfo] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~ => Pos: (2298 to 2312) SpanInfo: {"start":2299,"length":13}
|
||||
>...robotAInfo
|
||||
>:=> (line 79, col 16) to (line 79, col 29)
|
||||
79 >for ([numberA3, ...robotAInfo] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (2313 to 2331) SpanInfo: {"start":2317,"length":11}
|
||||
>getRobots()
|
||||
>:=> (line 79, col 34) to (line 79, col 45)
|
||||
--------------------------------
|
||||
80 > console.log(numberA3);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2332 to 2358) SpanInfo: {"start":2336,"length":21}
|
||||
>console.log(numberA3)
|
||||
>:=> (line 80, col 4) to (line 80, col 25)
|
||||
--------------------------------
|
||||
81 >}
|
||||
|
||||
~~ => Pos: (2359 to 2360) SpanInfo: {"start":2336,"length":21}
|
||||
>console.log(numberA3)
|
||||
>:=> (line 80, col 4) to (line 80, col 25)
|
||||
--------------------------------
|
||||
82 >for ([numberA3, ...robotAInfo] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~ => Pos: (2361 to 2375) SpanInfo: {"start":2367,"length":8}
|
||||
>numberA3
|
||||
>:=> (line 82, col 6) to (line 82, col 14)
|
||||
82 >for ([numberA3, ...robotAInfo] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~ => Pos: (2376 to 2390) SpanInfo: {"start":2377,"length":13}
|
||||
>...robotAInfo
|
||||
>:=> (line 82, col 16) to (line 82, col 29)
|
||||
82 >for ([numberA3, ...robotAInfo] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2391 to 2414) SpanInfo: {"start":2395,"length":16}
|
||||
>[robotA, robotB]
|
||||
>:=> (line 82, col 34) to (line 82, col 50)
|
||||
--------------------------------
|
||||
83 > console.log(numberA3);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2415 to 2441) SpanInfo: {"start":2419,"length":21}
|
||||
>console.log(numberA3)
|
||||
>:=> (line 83, col 4) to (line 83, col 25)
|
||||
--------------------------------
|
||||
84 >}
|
||||
|
||||
~~ => Pos: (2442 to 2443) SpanInfo: {"start":2419,"length":21}
|
||||
>console.log(numberA3)
|
||||
>:=> (line 83, col 4) to (line 83, col 25)
|
||||
--------------------------------
|
||||
85 >for ([...multiRobotAInfo] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2444 to 2468) SpanInfo: {"start":2450,"length":18}
|
||||
>...multiRobotAInfo
|
||||
>:=> (line 85, col 6) to (line 85, col 24)
|
||||
85 >for ([...multiRobotAInfo] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (2469 to 2487) SpanInfo: {"start":2473,"length":11}
|
||||
>multiRobots
|
||||
>:=> (line 85, col 29) to (line 85, col 40)
|
||||
--------------------------------
|
||||
86 > console.log(multiRobotAInfo);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2488 to 2521) SpanInfo: {"start":2492,"length":28}
|
||||
>console.log(multiRobotAInfo)
|
||||
>:=> (line 86, col 4) to (line 86, col 32)
|
||||
--------------------------------
|
||||
87 >}
|
||||
|
||||
~~ => Pos: (2522 to 2523) SpanInfo: {"start":2492,"length":28}
|
||||
>console.log(multiRobotAInfo)
|
||||
>:=> (line 86, col 4) to (line 86, col 32)
|
||||
--------------------------------
|
||||
88 >for ([...multiRobotAInfo] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2524 to 2548) SpanInfo: {"start":2530,"length":18}
|
||||
>...multiRobotAInfo
|
||||
>:=> (line 88, col 6) to (line 88, col 24)
|
||||
88 >for ([...multiRobotAInfo] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2549 to 2572) SpanInfo: {"start":2553,"length":16}
|
||||
>getMultiRobots()
|
||||
>:=> (line 88, col 29) to (line 88, col 45)
|
||||
--------------------------------
|
||||
89 > console.log(multiRobotAInfo);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2573 to 2606) SpanInfo: {"start":2577,"length":28}
|
||||
>console.log(multiRobotAInfo)
|
||||
>:=> (line 89, col 4) to (line 89, col 32)
|
||||
--------------------------------
|
||||
90 >}
|
||||
|
||||
~~ => Pos: (2607 to 2608) SpanInfo: {"start":2577,"length":28}
|
||||
>console.log(multiRobotAInfo)
|
||||
>:=> (line 89, col 4) to (line 89, col 32)
|
||||
--------------------------------
|
||||
91 >for ([...multiRobotAInfo] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2609 to 2633) SpanInfo: {"start":2615,"length":18}
|
||||
>...multiRobotAInfo
|
||||
>:=> (line 91, col 6) to (line 91, col 24)
|
||||
91 >for ([...multiRobotAInfo] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2634 to 2667) SpanInfo: {"start":2638,"length":26}
|
||||
>[multiRobotA, multiRobotB]
|
||||
>:=> (line 91, col 29) to (line 91, col 55)
|
||||
--------------------------------
|
||||
92 > console.log(multiRobotAInfo);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2668 to 2701) SpanInfo: {"start":2672,"length":28}
|
||||
>console.log(multiRobotAInfo)
|
||||
>:=> (line 92, col 4) to (line 92, col 32)
|
||||
--------------------------------
|
||||
93 >}
|
||||
~ => Pos: (2702 to 2702) SpanInfo: {"start":2672,"length":28}
|
||||
>console.log(multiRobotAInfo)
|
||||
>:=> (line 92, col 4) to (line 92, col 32)
|
||||
+806
@@ -0,0 +1,806 @@
|
||||
|
||||
1 >declare var console: {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined
|
||||
--------------------------------
|
||||
2 > log(msg: any): void;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined
|
||||
--------------------------------
|
||||
3 >}
|
||||
|
||||
~~ => Pos: (48 to 49) SpanInfo: undefined
|
||||
--------------------------------
|
||||
4 >type Robot = [number, string, string];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (50 to 88) SpanInfo: undefined
|
||||
--------------------------------
|
||||
5 >type MultiSkilledRobot = [string, [string, string]];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (89 to 141) SpanInfo: undefined
|
||||
--------------------------------
|
||||
6 >let robotA: Robot = [1, "mower", "mowing"];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (142 to 185) SpanInfo: {"start":142,"length":42}
|
||||
>let robotA: Robot = [1, "mower", "mowing"]
|
||||
>:=> (line 6, col 0) to (line 6, col 42)
|
||||
--------------------------------
|
||||
7 >let robotB: Robot = [2, "trimmer", "trimming"];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (186 to 233) SpanInfo: {"start":186,"length":46}
|
||||
>let robotB: Robot = [2, "trimmer", "trimming"]
|
||||
>:=> (line 7, col 0) to (line 7, col 46)
|
||||
--------------------------------
|
||||
8 >let robots = [robotA, robotB];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (234 to 264) SpanInfo: {"start":234,"length":29}
|
||||
>let robots = [robotA, robotB]
|
||||
>:=> (line 8, col 0) to (line 8, col 29)
|
||||
--------------------------------
|
||||
9 >function getRobots() {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (265 to 287) SpanInfo: {"start":292,"length":13}
|
||||
>return robots
|
||||
>:=> (line 10, col 4) to (line 10, col 17)
|
||||
--------------------------------
|
||||
10 > return robots;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (288 to 306) SpanInfo: {"start":292,"length":13}
|
||||
>return robots
|
||||
>:=> (line 10, col 4) to (line 10, col 17)
|
||||
--------------------------------
|
||||
11 >}
|
||||
|
||||
~~ => Pos: (307 to 308) SpanInfo: {"start":307,"length":1}
|
||||
>}
|
||||
>:=> (line 11, col 0) to (line 11, col 1)
|
||||
--------------------------------
|
||||
12 >let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (309 to 372) SpanInfo: {"start":309,"length":62}
|
||||
>let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]
|
||||
>:=> (line 12, col 0) to (line 12, col 62)
|
||||
--------------------------------
|
||||
13 >let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (373 to 446) SpanInfo: {"start":373,"length":72}
|
||||
>let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]
|
||||
>:=> (line 13, col 0) to (line 13, col 72)
|
||||
--------------------------------
|
||||
14 >let multiRobots = [multiRobotA, multiRobotB];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (447 to 492) SpanInfo: {"start":447,"length":44}
|
||||
>let multiRobots = [multiRobotA, multiRobotB]
|
||||
>:=> (line 14, col 0) to (line 14, col 44)
|
||||
--------------------------------
|
||||
15 >function getMultiRobots() {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (493 to 520) SpanInfo: {"start":525,"length":18}
|
||||
>return multiRobots
|
||||
>:=> (line 16, col 4) to (line 16, col 22)
|
||||
--------------------------------
|
||||
16 > return multiRobots;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (521 to 544) SpanInfo: {"start":525,"length":18}
|
||||
>return multiRobots
|
||||
>:=> (line 16, col 4) to (line 16, col 22)
|
||||
--------------------------------
|
||||
17 >}
|
||||
|
||||
~~ => Pos: (545 to 546) SpanInfo: {"start":545,"length":1}
|
||||
>}
|
||||
>:=> (line 17, col 0) to (line 17, col 1)
|
||||
--------------------------------
|
||||
18 >let nameA: string, primarySkillA: string, secondarySkillA: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (547 to 613) SpanInfo: undefined
|
||||
--------------------------------
|
||||
19 >let numberB: number, nameB: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (614 to 649) SpanInfo: undefined
|
||||
--------------------------------
|
||||
20 >let numberA2: number, nameA2: string, skillA2: string, nameMA: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (650 to 720) SpanInfo: undefined
|
||||
--------------------------------
|
||||
21 >let numberA3: number, robotAInfo: (number | string)[], multiRobotAInfo: (string | [string, string])[];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (721 to 823) SpanInfo: undefined
|
||||
--------------------------------
|
||||
22 >for ([, nameA = "noName"] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (824 to 848) SpanInfo: {"start":832,"length":16}
|
||||
>nameA = "noName"
|
||||
>:=> (line 22, col 8) to (line 22, col 24)
|
||||
22 >for ([, nameA = "noName"] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (849 to 862) SpanInfo: {"start":853,"length":6}
|
||||
>robots
|
||||
>:=> (line 22, col 29) to (line 22, col 35)
|
||||
--------------------------------
|
||||
23 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (863 to 886) SpanInfo: {"start":867,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 23, col 4) to (line 23, col 22)
|
||||
--------------------------------
|
||||
24 >}
|
||||
|
||||
~~ => Pos: (887 to 888) SpanInfo: {"start":867,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 23, col 4) to (line 23, col 22)
|
||||
--------------------------------
|
||||
25 >for ([, nameA = "noName"] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (889 to 913) SpanInfo: {"start":897,"length":16}
|
||||
>nameA = "noName"
|
||||
>:=> (line 25, col 8) to (line 25, col 24)
|
||||
25 >for ([, nameA = "noName"] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (914 to 932) SpanInfo: {"start":918,"length":11}
|
||||
>getRobots()
|
||||
>:=> (line 25, col 29) to (line 25, col 40)
|
||||
--------------------------------
|
||||
26 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (933 to 956) SpanInfo: {"start":937,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 26, col 4) to (line 26, col 22)
|
||||
--------------------------------
|
||||
27 >}
|
||||
|
||||
~~ => Pos: (957 to 958) SpanInfo: {"start":937,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 26, col 4) to (line 26, col 22)
|
||||
--------------------------------
|
||||
28 >for ([, nameA = "noName"] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (959 to 983) SpanInfo: {"start":967,"length":16}
|
||||
>nameA = "noName"
|
||||
>:=> (line 28, col 8) to (line 28, col 24)
|
||||
28 >for ([, nameA = "noName"] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (984 to 1007) SpanInfo: {"start":988,"length":16}
|
||||
>[robotA, robotB]
|
||||
>:=> (line 28, col 29) to (line 28, col 45)
|
||||
--------------------------------
|
||||
29 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1008 to 1031) SpanInfo: {"start":1012,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 29, col 4) to (line 29, col 22)
|
||||
--------------------------------
|
||||
30 >}
|
||||
|
||||
~~ => Pos: (1032 to 1033) SpanInfo: {"start":1012,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 29, col 4) to (line 29, col 22)
|
||||
--------------------------------
|
||||
31 >for ([, [
|
||||
|
||||
~~~~~~~~~~ => Pos: (1034 to 1043) SpanInfo: {"start":1048,"length":25}
|
||||
>primarySkillA = "primary"
|
||||
>:=> (line 32, col 4) to (line 32, col 29)
|
||||
--------------------------------
|
||||
32 > primarySkillA = "primary",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1044 to 1074) SpanInfo: {"start":1048,"length":25}
|
||||
>primarySkillA = "primary"
|
||||
>:=> (line 32, col 4) to (line 32, col 29)
|
||||
--------------------------------
|
||||
33 > secondarySkillA = "secondary"
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1075 to 1108) SpanInfo: {"start":1079,"length":29}
|
||||
>secondarySkillA = "secondary"
|
||||
>:=> (line 33, col 4) to (line 33, col 33)
|
||||
--------------------------------
|
||||
34 >] = ["skill1", "skill2"]] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1109 to 1132) SpanInfo: {"start":1079,"length":29}
|
||||
>secondarySkillA = "secondary"
|
||||
>:=> (line 33, col 4) to (line 33, col 33)
|
||||
34 >] = ["skill1", "skill2"]] of multiRobots) {
|
||||
|
||||
~ => Pos: (1133 to 1133) SpanInfo: {"start":1042,"length":91}
|
||||
>[
|
||||
> primarySkillA = "primary",
|
||||
> secondarySkillA = "secondary"
|
||||
>] = ["skill1", "skill2"]
|
||||
>:=> (line 31, col 8) to (line 34, col 24)
|
||||
34 >] = ["skill1", "skill2"]] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (1134 to 1152) SpanInfo: {"start":1138,"length":11}
|
||||
>multiRobots
|
||||
>:=> (line 34, col 29) to (line 34, col 40)
|
||||
--------------------------------
|
||||
35 > console.log(primarySkillA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1153 to 1184) SpanInfo: {"start":1157,"length":26}
|
||||
>console.log(primarySkillA)
|
||||
>:=> (line 35, col 4) to (line 35, col 30)
|
||||
--------------------------------
|
||||
36 >}
|
||||
|
||||
~~ => Pos: (1185 to 1186) SpanInfo: {"start":1157,"length":26}
|
||||
>console.log(primarySkillA)
|
||||
>:=> (line 35, col 4) to (line 35, col 30)
|
||||
--------------------------------
|
||||
37 >for ([, [
|
||||
|
||||
~~~~~~~~~~ => Pos: (1187 to 1196) SpanInfo: {"start":1201,"length":25}
|
||||
>primarySkillA = "primary"
|
||||
>:=> (line 38, col 4) to (line 38, col 29)
|
||||
--------------------------------
|
||||
38 > primarySkillA = "primary",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1197 to 1227) SpanInfo: {"start":1201,"length":25}
|
||||
>primarySkillA = "primary"
|
||||
>:=> (line 38, col 4) to (line 38, col 29)
|
||||
--------------------------------
|
||||
39 > secondarySkillA = "secondary"
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1228 to 1261) SpanInfo: {"start":1232,"length":29}
|
||||
>secondarySkillA = "secondary"
|
||||
>:=> (line 39, col 4) to (line 39, col 33)
|
||||
--------------------------------
|
||||
40 >] = ["skill1", "skill2"]] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1262 to 1285) SpanInfo: {"start":1232,"length":29}
|
||||
>secondarySkillA = "secondary"
|
||||
>:=> (line 39, col 4) to (line 39, col 33)
|
||||
40 >] = ["skill1", "skill2"]] of getMultiRobots()) {
|
||||
|
||||
~ => Pos: (1286 to 1286) SpanInfo: {"start":1195,"length":91}
|
||||
>[
|
||||
> primarySkillA = "primary",
|
||||
> secondarySkillA = "secondary"
|
||||
>] = ["skill1", "skill2"]
|
||||
>:=> (line 37, col 8) to (line 40, col 24)
|
||||
40 >] = ["skill1", "skill2"]] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1287 to 1310) SpanInfo: {"start":1291,"length":16}
|
||||
>getMultiRobots()
|
||||
>:=> (line 40, col 29) to (line 40, col 45)
|
||||
--------------------------------
|
||||
41 > console.log(primarySkillA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1311 to 1342) SpanInfo: {"start":1315,"length":26}
|
||||
>console.log(primarySkillA)
|
||||
>:=> (line 41, col 4) to (line 41, col 30)
|
||||
--------------------------------
|
||||
42 >}
|
||||
|
||||
~~ => Pos: (1343 to 1344) SpanInfo: {"start":1315,"length":26}
|
||||
>console.log(primarySkillA)
|
||||
>:=> (line 41, col 4) to (line 41, col 30)
|
||||
--------------------------------
|
||||
43 >for ([, [
|
||||
|
||||
~~~~~~~~~~ => Pos: (1345 to 1354) SpanInfo: {"start":1359,"length":25}
|
||||
>primarySkillA = "primary"
|
||||
>:=> (line 44, col 4) to (line 44, col 29)
|
||||
--------------------------------
|
||||
44 > primarySkillA = "primary",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1355 to 1385) SpanInfo: {"start":1359,"length":25}
|
||||
>primarySkillA = "primary"
|
||||
>:=> (line 44, col 4) to (line 44, col 29)
|
||||
--------------------------------
|
||||
45 > secondarySkillA = "secondary"
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1386 to 1419) SpanInfo: {"start":1390,"length":29}
|
||||
>secondarySkillA = "secondary"
|
||||
>:=> (line 45, col 4) to (line 45, col 33)
|
||||
--------------------------------
|
||||
46 >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1420 to 1443) SpanInfo: {"start":1390,"length":29}
|
||||
>secondarySkillA = "secondary"
|
||||
>:=> (line 45, col 4) to (line 45, col 33)
|
||||
46 >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~ => Pos: (1444 to 1444) SpanInfo: {"start":1353,"length":91}
|
||||
>[
|
||||
> primarySkillA = "primary",
|
||||
> secondarySkillA = "secondary"
|
||||
>] = ["skill1", "skill2"]
|
||||
>:=> (line 43, col 8) to (line 46, col 24)
|
||||
46 >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1445 to 1478) SpanInfo: {"start":1449,"length":26}
|
||||
>[multiRobotA, multiRobotB]
|
||||
>:=> (line 46, col 29) to (line 46, col 55)
|
||||
--------------------------------
|
||||
47 > console.log(primarySkillA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1479 to 1510) SpanInfo: {"start":1483,"length":26}
|
||||
>console.log(primarySkillA)
|
||||
>:=> (line 47, col 4) to (line 47, col 30)
|
||||
--------------------------------
|
||||
48 >}
|
||||
|
||||
~~ => Pos: (1511 to 1512) SpanInfo: {"start":1483,"length":26}
|
||||
>console.log(primarySkillA)
|
||||
>:=> (line 47, col 4) to (line 47, col 30)
|
||||
--------------------------------
|
||||
49 >for ([numberB = -1] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (1513 to 1531) SpanInfo: {"start":1519,"length":12}
|
||||
>numberB = -1
|
||||
>:=> (line 49, col 6) to (line 49, col 18)
|
||||
49 >for ([numberB = -1] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (1532 to 1545) SpanInfo: {"start":1536,"length":6}
|
||||
>robots
|
||||
>:=> (line 49, col 23) to (line 49, col 29)
|
||||
--------------------------------
|
||||
50 > console.log(numberB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1546 to 1571) SpanInfo: {"start":1550,"length":20}
|
||||
>console.log(numberB)
|
||||
>:=> (line 50, col 4) to (line 50, col 24)
|
||||
--------------------------------
|
||||
51 >}
|
||||
|
||||
~~ => Pos: (1572 to 1573) SpanInfo: {"start":1550,"length":20}
|
||||
>console.log(numberB)
|
||||
>:=> (line 50, col 4) to (line 50, col 24)
|
||||
--------------------------------
|
||||
52 >for ([numberB = -1] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (1574 to 1592) SpanInfo: {"start":1580,"length":12}
|
||||
>numberB = -1
|
||||
>:=> (line 52, col 6) to (line 52, col 18)
|
||||
52 >for ([numberB = -1] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (1593 to 1611) SpanInfo: {"start":1597,"length":11}
|
||||
>getRobots()
|
||||
>:=> (line 52, col 23) to (line 52, col 34)
|
||||
--------------------------------
|
||||
53 > console.log(numberB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1612 to 1637) SpanInfo: {"start":1616,"length":20}
|
||||
>console.log(numberB)
|
||||
>:=> (line 53, col 4) to (line 53, col 24)
|
||||
--------------------------------
|
||||
54 >}
|
||||
|
||||
~~ => Pos: (1638 to 1639) SpanInfo: {"start":1616,"length":20}
|
||||
>console.log(numberB)
|
||||
>:=> (line 53, col 4) to (line 53, col 24)
|
||||
--------------------------------
|
||||
55 >for ([numberB = -1] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (1640 to 1658) SpanInfo: {"start":1646,"length":12}
|
||||
>numberB = -1
|
||||
>:=> (line 55, col 6) to (line 55, col 18)
|
||||
55 >for ([numberB = -1] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1659 to 1682) SpanInfo: {"start":1663,"length":16}
|
||||
>[robotA, robotB]
|
||||
>:=> (line 55, col 23) to (line 55, col 39)
|
||||
--------------------------------
|
||||
56 > console.log(numberB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1683 to 1708) SpanInfo: {"start":1687,"length":20}
|
||||
>console.log(numberB)
|
||||
>:=> (line 56, col 4) to (line 56, col 24)
|
||||
--------------------------------
|
||||
57 >}
|
||||
|
||||
~~ => Pos: (1709 to 1710) SpanInfo: {"start":1687,"length":20}
|
||||
>console.log(numberB)
|
||||
>:=> (line 56, col 4) to (line 56, col 24)
|
||||
--------------------------------
|
||||
58 >for ([nameB = "noName"] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1711 to 1733) SpanInfo: {"start":1717,"length":16}
|
||||
>nameB = "noName"
|
||||
>:=> (line 58, col 6) to (line 58, col 22)
|
||||
58 >for ([nameB = "noName"] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (1734 to 1752) SpanInfo: {"start":1738,"length":11}
|
||||
>multiRobots
|
||||
>:=> (line 58, col 27) to (line 58, col 38)
|
||||
--------------------------------
|
||||
59 > console.log(nameB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1753 to 1776) SpanInfo: {"start":1757,"length":18}
|
||||
>console.log(nameB)
|
||||
>:=> (line 59, col 4) to (line 59, col 22)
|
||||
--------------------------------
|
||||
60 >}
|
||||
|
||||
~~ => Pos: (1777 to 1778) SpanInfo: {"start":1757,"length":18}
|
||||
>console.log(nameB)
|
||||
>:=> (line 59, col 4) to (line 59, col 22)
|
||||
--------------------------------
|
||||
61 >for ([nameB = "noName"] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1779 to 1801) SpanInfo: {"start":1785,"length":16}
|
||||
>nameB = "noName"
|
||||
>:=> (line 61, col 6) to (line 61, col 22)
|
||||
61 >for ([nameB = "noName"] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1802 to 1825) SpanInfo: {"start":1806,"length":16}
|
||||
>getMultiRobots()
|
||||
>:=> (line 61, col 27) to (line 61, col 43)
|
||||
--------------------------------
|
||||
62 > console.log(nameB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1826 to 1849) SpanInfo: {"start":1830,"length":18}
|
||||
>console.log(nameB)
|
||||
>:=> (line 62, col 4) to (line 62, col 22)
|
||||
--------------------------------
|
||||
63 >}
|
||||
|
||||
~~ => Pos: (1850 to 1851) SpanInfo: {"start":1830,"length":18}
|
||||
>console.log(nameB)
|
||||
>:=> (line 62, col 4) to (line 62, col 22)
|
||||
--------------------------------
|
||||
64 >for ([nameB = "noName"] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1852 to 1874) SpanInfo: {"start":1858,"length":16}
|
||||
>nameB = "noName"
|
||||
>:=> (line 64, col 6) to (line 64, col 22)
|
||||
64 >for ([nameB = "noName"] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1875 to 1908) SpanInfo: {"start":1879,"length":26}
|
||||
>[multiRobotA, multiRobotB]
|
||||
>:=> (line 64, col 27) to (line 64, col 53)
|
||||
--------------------------------
|
||||
65 > console.log(nameB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1909 to 1932) SpanInfo: {"start":1913,"length":18}
|
||||
>console.log(nameB)
|
||||
>:=> (line 65, col 4) to (line 65, col 22)
|
||||
--------------------------------
|
||||
66 >}
|
||||
|
||||
~~ => Pos: (1933 to 1934) SpanInfo: {"start":1913,"length":18}
|
||||
>console.log(nameB)
|
||||
>:=> (line 65, col 4) to (line 65, col 22)
|
||||
--------------------------------
|
||||
67 >for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~ => Pos: (1935 to 1954) SpanInfo: {"start":1941,"length":13}
|
||||
>numberA2 = -1
|
||||
>:=> (line 67, col 6) to (line 67, col 19)
|
||||
67 >for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (1955 to 1973) SpanInfo: {"start":1956,"length":17}
|
||||
>nameA2 = "noName"
|
||||
>:=> (line 67, col 21) to (line 67, col 38)
|
||||
67 >for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (1974 to 1992) SpanInfo: {"start":1975,"length":17}
|
||||
>skillA2 = "skill"
|
||||
>:=> (line 67, col 40) to (line 67, col 57)
|
||||
67 >for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~=> Pos: (1993 to 2006) SpanInfo: {"start":1997,"length":6}
|
||||
>robots
|
||||
>:=> (line 67, col 62) to (line 67, col 68)
|
||||
--------------------------------
|
||||
68 > console.log(nameA2);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2007 to 2031) SpanInfo: {"start":2011,"length":19}
|
||||
>console.log(nameA2)
|
||||
>:=> (line 68, col 4) to (line 68, col 23)
|
||||
--------------------------------
|
||||
69 >}
|
||||
|
||||
~~ => Pos: (2032 to 2033) SpanInfo: {"start":2011,"length":19}
|
||||
>console.log(nameA2)
|
||||
>:=> (line 68, col 4) to (line 68, col 23)
|
||||
--------------------------------
|
||||
70 >for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~ => Pos: (2034 to 2053) SpanInfo: {"start":2040,"length":13}
|
||||
>numberA2 = -1
|
||||
>:=> (line 70, col 6) to (line 70, col 19)
|
||||
70 >for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (2054 to 2072) SpanInfo: {"start":2055,"length":17}
|
||||
>nameA2 = "noName"
|
||||
>:=> (line 70, col 21) to (line 70, col 38)
|
||||
70 >for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (2073 to 2091) SpanInfo: {"start":2074,"length":17}
|
||||
>skillA2 = "skill"
|
||||
>:=> (line 70, col 40) to (line 70, col 57)
|
||||
70 >for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (2092 to 2110) SpanInfo: {"start":2096,"length":11}
|
||||
>getRobots()
|
||||
>:=> (line 70, col 62) to (line 70, col 73)
|
||||
--------------------------------
|
||||
71 > console.log(nameA2);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2111 to 2135) SpanInfo: {"start":2115,"length":19}
|
||||
>console.log(nameA2)
|
||||
>:=> (line 71, col 4) to (line 71, col 23)
|
||||
--------------------------------
|
||||
72 >}
|
||||
|
||||
~~ => Pos: (2136 to 2137) SpanInfo: {"start":2115,"length":19}
|
||||
>console.log(nameA2)
|
||||
>:=> (line 71, col 4) to (line 71, col 23)
|
||||
--------------------------------
|
||||
73 >for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~ => Pos: (2138 to 2157) SpanInfo: {"start":2144,"length":13}
|
||||
>numberA2 = -1
|
||||
>:=> (line 73, col 6) to (line 73, col 19)
|
||||
73 >for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (2158 to 2176) SpanInfo: {"start":2159,"length":17}
|
||||
>nameA2 = "noName"
|
||||
>:=> (line 73, col 21) to (line 73, col 38)
|
||||
73 >for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (2177 to 2195) SpanInfo: {"start":2178,"length":17}
|
||||
>skillA2 = "skill"
|
||||
>:=> (line 73, col 40) to (line 73, col 57)
|
||||
73 >for ([numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2196 to 2219) SpanInfo: {"start":2200,"length":16}
|
||||
>[robotA, robotB]
|
||||
>:=> (line 73, col 62) to (line 73, col 78)
|
||||
--------------------------------
|
||||
74 > console.log(nameA2);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2220 to 2244) SpanInfo: {"start":2224,"length":19}
|
||||
>console.log(nameA2)
|
||||
>:=> (line 74, col 4) to (line 74, col 23)
|
||||
--------------------------------
|
||||
75 >}
|
||||
|
||||
~~ => Pos: (2245 to 2246) SpanInfo: {"start":2224,"length":19}
|
||||
>console.log(nameA2)
|
||||
>:=> (line 74, col 4) to (line 74, col 23)
|
||||
--------------------------------
|
||||
76 >for ([nameMA = "noName", [
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2247 to 2270) SpanInfo: {"start":2253,"length":17}
|
||||
>nameMA = "noName"
|
||||
>:=> (line 76, col 6) to (line 76, col 23)
|
||||
76 >for ([nameMA = "noName", [
|
||||
|
||||
~~~ => Pos: (2271 to 2273) SpanInfo: {"start":2278,"length":25}
|
||||
>primarySkillA = "primary"
|
||||
>:=> (line 77, col 4) to (line 77, col 29)
|
||||
--------------------------------
|
||||
77 > primarySkillA = "primary",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2274 to 2304) SpanInfo: {"start":2278,"length":25}
|
||||
>primarySkillA = "primary"
|
||||
>:=> (line 77, col 4) to (line 77, col 29)
|
||||
--------------------------------
|
||||
78 > secondarySkillA = "secondary"
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2305 to 2338) SpanInfo: {"start":2309,"length":29}
|
||||
>secondarySkillA = "secondary"
|
||||
>:=> (line 78, col 4) to (line 78, col 33)
|
||||
--------------------------------
|
||||
79 >] = ["skill1", "skill2"]] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2339 to 2362) SpanInfo: {"start":2309,"length":29}
|
||||
>secondarySkillA = "secondary"
|
||||
>:=> (line 78, col 4) to (line 78, col 33)
|
||||
79 >] = ["skill1", "skill2"]] of multiRobots) {
|
||||
|
||||
~ => Pos: (2363 to 2363) SpanInfo: {"start":2272,"length":91}
|
||||
>[
|
||||
> primarySkillA = "primary",
|
||||
> secondarySkillA = "secondary"
|
||||
>] = ["skill1", "skill2"]
|
||||
>:=> (line 76, col 25) to (line 79, col 24)
|
||||
79 >] = ["skill1", "skill2"]] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (2364 to 2382) SpanInfo: {"start":2368,"length":11}
|
||||
>multiRobots
|
||||
>:=> (line 79, col 29) to (line 79, col 40)
|
||||
--------------------------------
|
||||
80 > console.log(nameMA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2383 to 2407) SpanInfo: {"start":2387,"length":19}
|
||||
>console.log(nameMA)
|
||||
>:=> (line 80, col 4) to (line 80, col 23)
|
||||
--------------------------------
|
||||
81 >}
|
||||
|
||||
~~ => Pos: (2408 to 2409) SpanInfo: {"start":2387,"length":19}
|
||||
>console.log(nameMA)
|
||||
>:=> (line 80, col 4) to (line 80, col 23)
|
||||
--------------------------------
|
||||
82 >for ([nameMA = "noName", [
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2410 to 2433) SpanInfo: {"start":2416,"length":17}
|
||||
>nameMA = "noName"
|
||||
>:=> (line 82, col 6) to (line 82, col 23)
|
||||
82 >for ([nameMA = "noName", [
|
||||
|
||||
~~~ => Pos: (2434 to 2436) SpanInfo: {"start":2441,"length":25}
|
||||
>primarySkillA = "primary"
|
||||
>:=> (line 83, col 4) to (line 83, col 29)
|
||||
--------------------------------
|
||||
83 > primarySkillA = "primary",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2437 to 2467) SpanInfo: {"start":2441,"length":25}
|
||||
>primarySkillA = "primary"
|
||||
>:=> (line 83, col 4) to (line 83, col 29)
|
||||
--------------------------------
|
||||
84 > secondarySkillA = "secondary"
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2468 to 2501) SpanInfo: {"start":2472,"length":29}
|
||||
>secondarySkillA = "secondary"
|
||||
>:=> (line 84, col 4) to (line 84, col 33)
|
||||
--------------------------------
|
||||
85 >] = ["skill1", "skill2"]] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2502 to 2525) SpanInfo: {"start":2472,"length":29}
|
||||
>secondarySkillA = "secondary"
|
||||
>:=> (line 84, col 4) to (line 84, col 33)
|
||||
85 >] = ["skill1", "skill2"]] of getMultiRobots()) {
|
||||
|
||||
~ => Pos: (2526 to 2526) SpanInfo: {"start":2435,"length":91}
|
||||
>[
|
||||
> primarySkillA = "primary",
|
||||
> secondarySkillA = "secondary"
|
||||
>] = ["skill1", "skill2"]
|
||||
>:=> (line 82, col 25) to (line 85, col 24)
|
||||
85 >] = ["skill1", "skill2"]] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2527 to 2550) SpanInfo: {"start":2531,"length":16}
|
||||
>getMultiRobots()
|
||||
>:=> (line 85, col 29) to (line 85, col 45)
|
||||
--------------------------------
|
||||
86 > console.log(nameMA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2551 to 2575) SpanInfo: {"start":2555,"length":19}
|
||||
>console.log(nameMA)
|
||||
>:=> (line 86, col 4) to (line 86, col 23)
|
||||
--------------------------------
|
||||
87 >}
|
||||
|
||||
~~ => Pos: (2576 to 2577) SpanInfo: {"start":2555,"length":19}
|
||||
>console.log(nameMA)
|
||||
>:=> (line 86, col 4) to (line 86, col 23)
|
||||
--------------------------------
|
||||
88 >for ([nameMA = "noName", [
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2578 to 2601) SpanInfo: {"start":2584,"length":17}
|
||||
>nameMA = "noName"
|
||||
>:=> (line 88, col 6) to (line 88, col 23)
|
||||
88 >for ([nameMA = "noName", [
|
||||
|
||||
~~~ => Pos: (2602 to 2604) SpanInfo: {"start":2609,"length":25}
|
||||
>primarySkillA = "primary"
|
||||
>:=> (line 89, col 4) to (line 89, col 29)
|
||||
--------------------------------
|
||||
89 > primarySkillA = "primary",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2605 to 2635) SpanInfo: {"start":2609,"length":25}
|
||||
>primarySkillA = "primary"
|
||||
>:=> (line 89, col 4) to (line 89, col 29)
|
||||
--------------------------------
|
||||
90 > secondarySkillA = "secondary"
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2636 to 2669) SpanInfo: {"start":2640,"length":29}
|
||||
>secondarySkillA = "secondary"
|
||||
>:=> (line 90, col 4) to (line 90, col 33)
|
||||
--------------------------------
|
||||
91 >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2670 to 2693) SpanInfo: {"start":2640,"length":29}
|
||||
>secondarySkillA = "secondary"
|
||||
>:=> (line 90, col 4) to (line 90, col 33)
|
||||
91 >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~ => Pos: (2694 to 2694) SpanInfo: {"start":2603,"length":91}
|
||||
>[
|
||||
> primarySkillA = "primary",
|
||||
> secondarySkillA = "secondary"
|
||||
>] = ["skill1", "skill2"]
|
||||
>:=> (line 88, col 25) to (line 91, col 24)
|
||||
91 >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2695 to 2728) SpanInfo: {"start":2699,"length":26}
|
||||
>[multiRobotA, multiRobotB]
|
||||
>:=> (line 91, col 29) to (line 91, col 55)
|
||||
--------------------------------
|
||||
92 > console.log(nameMA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2729 to 2753) SpanInfo: {"start":2733,"length":19}
|
||||
>console.log(nameMA)
|
||||
>:=> (line 92, col 4) to (line 92, col 23)
|
||||
--------------------------------
|
||||
93 >}
|
||||
|
||||
~~ => Pos: (2754 to 2755) SpanInfo: {"start":2733,"length":19}
|
||||
>console.log(nameMA)
|
||||
>:=> (line 92, col 4) to (line 92, col 23)
|
||||
--------------------------------
|
||||
94 >for ([numberA3 = -1, ...robotAInfo] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~ => Pos: (2756 to 2775) SpanInfo: {"start":2762,"length":13}
|
||||
>numberA3 = -1
|
||||
>:=> (line 94, col 6) to (line 94, col 19)
|
||||
94 >for ([numberA3 = -1, ...robotAInfo] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~ => Pos: (2776 to 2790) SpanInfo: {"start":2777,"length":13}
|
||||
>...robotAInfo
|
||||
>:=> (line 94, col 21) to (line 94, col 34)
|
||||
94 >for ([numberA3 = -1, ...robotAInfo] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~=> Pos: (2791 to 2804) SpanInfo: {"start":2795,"length":6}
|
||||
>robots
|
||||
>:=> (line 94, col 39) to (line 94, col 45)
|
||||
--------------------------------
|
||||
95 > console.log(numberA3);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2805 to 2831) SpanInfo: {"start":2809,"length":21}
|
||||
>console.log(numberA3)
|
||||
>:=> (line 95, col 4) to (line 95, col 25)
|
||||
--------------------------------
|
||||
96 >}
|
||||
|
||||
~~ => Pos: (2832 to 2833) SpanInfo: {"start":2809,"length":21}
|
||||
>console.log(numberA3)
|
||||
>:=> (line 95, col 4) to (line 95, col 25)
|
||||
--------------------------------
|
||||
97 >for ([numberA3 = -1, ...robotAInfo] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~ => Pos: (2834 to 2853) SpanInfo: {"start":2840,"length":13}
|
||||
>numberA3 = -1
|
||||
>:=> (line 97, col 6) to (line 97, col 19)
|
||||
97 >for ([numberA3 = -1, ...robotAInfo] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~ => Pos: (2854 to 2868) SpanInfo: {"start":2855,"length":13}
|
||||
>...robotAInfo
|
||||
>:=> (line 97, col 21) to (line 97, col 34)
|
||||
97 >for ([numberA3 = -1, ...robotAInfo] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (2869 to 2887) SpanInfo: {"start":2873,"length":11}
|
||||
>getRobots()
|
||||
>:=> (line 97, col 39) to (line 97, col 50)
|
||||
--------------------------------
|
||||
98 > console.log(numberA3);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2888 to 2914) SpanInfo: {"start":2892,"length":21}
|
||||
>console.log(numberA3)
|
||||
>:=> (line 98, col 4) to (line 98, col 25)
|
||||
--------------------------------
|
||||
99 >}
|
||||
|
||||
~~ => Pos: (2915 to 2916) SpanInfo: {"start":2892,"length":21}
|
||||
>console.log(numberA3)
|
||||
>:=> (line 98, col 4) to (line 98, col 25)
|
||||
--------------------------------
|
||||
100>for ([numberA3 = -1, ...robotAInfo] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~ => Pos: (2917 to 2936) SpanInfo: {"start":2923,"length":13}
|
||||
>numberA3 = -1
|
||||
>:=> (line 100, col 6) to (line 100, col 19)
|
||||
100>for ([numberA3 = -1, ...robotAInfo] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~ => Pos: (2937 to 2951) SpanInfo: {"start":2938,"length":13}
|
||||
>...robotAInfo
|
||||
>:=> (line 100, col 21) to (line 100, col 34)
|
||||
100>for ([numberA3 = -1, ...robotAInfo] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2952 to 2975) SpanInfo: {"start":2956,"length":16}
|
||||
>[robotA, robotB]
|
||||
>:=> (line 100, col 39) to (line 100, col 55)
|
||||
--------------------------------
|
||||
101> console.log(numberA3);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2976 to 3002) SpanInfo: {"start":2980,"length":21}
|
||||
>console.log(numberA3)
|
||||
>:=> (line 101, col 4) to (line 101, col 25)
|
||||
--------------------------------
|
||||
102>}
|
||||
~ => Pos: (3003 to 3003) SpanInfo: {"start":2980,"length":21}
|
||||
>console.log(numberA3)
|
||||
>:=> (line 101, col 4) to (line 101, col 25)
|
||||
+943
@@ -0,0 +1,943 @@
|
||||
|
||||
1 >declare var console: {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined
|
||||
--------------------------------
|
||||
2 > log(msg: any): void;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined
|
||||
--------------------------------
|
||||
3 >}
|
||||
|
||||
~~ => Pos: (48 to 49) SpanInfo: undefined
|
||||
--------------------------------
|
||||
4 >interface Robot {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (50 to 67) SpanInfo: undefined
|
||||
--------------------------------
|
||||
5 > name: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (68 to 85) SpanInfo: undefined
|
||||
--------------------------------
|
||||
6 > skill: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (86 to 104) SpanInfo: undefined
|
||||
--------------------------------
|
||||
7 >}
|
||||
|
||||
~~ => Pos: (105 to 106) SpanInfo: undefined
|
||||
--------------------------------
|
||||
8 >interface MultiRobot {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (107 to 129) SpanInfo: undefined
|
||||
--------------------------------
|
||||
9 > name: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (130 to 147) SpanInfo: undefined
|
||||
--------------------------------
|
||||
10 > skills: {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (148 to 161) SpanInfo: undefined
|
||||
--------------------------------
|
||||
11 > primary: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (162 to 186) SpanInfo: undefined
|
||||
--------------------------------
|
||||
12 > secondary: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (187 to 213) SpanInfo: undefined
|
||||
--------------------------------
|
||||
13 > };
|
||||
|
||||
~~~~~~~ => Pos: (214 to 220) SpanInfo: undefined
|
||||
--------------------------------
|
||||
14 >}
|
||||
|
||||
~~ => Pos: (221 to 222) SpanInfo: undefined
|
||||
--------------------------------
|
||||
15 >let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (223 to 322) SpanInfo: {"start":223,"length":98}
|
||||
>let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]
|
||||
>:=> (line 15, col 0) to (line 15, col 98)
|
||||
--------------------------------
|
||||
16 >let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (323 to 424) SpanInfo: {"start":323,"length":180}
|
||||
>let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]
|
||||
>:=> (line 16, col 0) to (line 17, col 78)
|
||||
--------------------------------
|
||||
17 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (425 to 504) SpanInfo: {"start":323,"length":180}
|
||||
>let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]
|
||||
>:=> (line 16, col 0) to (line 17, col 78)
|
||||
--------------------------------
|
||||
18 >function getRobots() {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (505 to 527) SpanInfo: {"start":532,"length":13}
|
||||
>return robots
|
||||
>:=> (line 19, col 4) to (line 19, col 17)
|
||||
--------------------------------
|
||||
19 > return robots;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (528 to 546) SpanInfo: {"start":532,"length":13}
|
||||
>return robots
|
||||
>:=> (line 19, col 4) to (line 19, col 17)
|
||||
--------------------------------
|
||||
20 >}
|
||||
|
||||
~~ => Pos: (547 to 548) SpanInfo: {"start":547,"length":1}
|
||||
>}
|
||||
>:=> (line 20, col 0) to (line 20, col 1)
|
||||
--------------------------------
|
||||
21 >function getMultiRobots() {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (549 to 576) SpanInfo: {"start":581,"length":18}
|
||||
>return multiRobots
|
||||
>:=> (line 22, col 4) to (line 22, col 22)
|
||||
--------------------------------
|
||||
22 > return multiRobots;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (577 to 600) SpanInfo: {"start":581,"length":18}
|
||||
>return multiRobots
|
||||
>:=> (line 22, col 4) to (line 22, col 22)
|
||||
--------------------------------
|
||||
23 >}
|
||||
|
||||
~~ => Pos: (601 to 602) SpanInfo: {"start":601,"length":1}
|
||||
>}
|
||||
>:=> (line 23, col 0) to (line 23, col 1)
|
||||
--------------------------------
|
||||
24 >let nameA: string, primaryA: string, secondaryA: string, i: number, skillA: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (603 to 686) SpanInfo: undefined
|
||||
--------------------------------
|
||||
25 >let name: string, primary: string, secondary: string, skill: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (687 to 755) SpanInfo: undefined
|
||||
--------------------------------
|
||||
26 >for ({name: nameA } of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (756 to 774) SpanInfo: {"start":762,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 26, col 6) to (line 26, col 17)
|
||||
26 >for ({name: nameA } of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (775 to 788) SpanInfo: {"start":779,"length":6}
|
||||
>robots
|
||||
>:=> (line 26, col 23) to (line 26, col 29)
|
||||
--------------------------------
|
||||
27 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (789 to 812) SpanInfo: {"start":793,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 27, col 4) to (line 27, col 22)
|
||||
--------------------------------
|
||||
28 >}
|
||||
|
||||
~~ => Pos: (813 to 814) SpanInfo: {"start":793,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 27, col 4) to (line 27, col 22)
|
||||
--------------------------------
|
||||
29 >for ({name: nameA } of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (815 to 833) SpanInfo: {"start":821,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 29, col 6) to (line 29, col 17)
|
||||
29 >for ({name: nameA } of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (834 to 852) SpanInfo: {"start":838,"length":11}
|
||||
>getRobots()
|
||||
>:=> (line 29, col 23) to (line 29, col 34)
|
||||
--------------------------------
|
||||
30 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (853 to 876) SpanInfo: {"start":857,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 30, col 4) to (line 30, col 22)
|
||||
--------------------------------
|
||||
31 >}
|
||||
|
||||
~~ => Pos: (877 to 878) SpanInfo: {"start":857,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 30, col 4) to (line 30, col 22)
|
||||
--------------------------------
|
||||
32 >for ({name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (879 to 897) SpanInfo: {"start":885,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 32, col 6) to (line 32, col 17)
|
||||
32 >for ({name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (898 to 981) SpanInfo: {"start":902,"length":76}
|
||||
>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]
|
||||
>:=> (line 32, col 23) to (line 32, col 99)
|
||||
--------------------------------
|
||||
33 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (982 to 1005) SpanInfo: {"start":986,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 33, col 4) to (line 33, col 22)
|
||||
--------------------------------
|
||||
34 >}
|
||||
|
||||
~~ => Pos: (1006 to 1007) SpanInfo: {"start":986,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 33, col 4) to (line 33, col 22)
|
||||
--------------------------------
|
||||
35 >for ({ skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (1008 to 1021) SpanInfo: {"start":1015,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 35, col 7) to (line 35, col 59)
|
||||
35 >for ({ skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~ => Pos: (1022 to 1042) SpanInfo: {"start":1025,"length":17}
|
||||
>primary: primaryA
|
||||
>:=> (line 35, col 17) to (line 35, col 34)
|
||||
35 >for ({ skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1043 to 1066) SpanInfo: {"start":1044,"length":21}
|
||||
>secondary: secondaryA
|
||||
>:=> (line 35, col 36) to (line 35, col 57)
|
||||
35 >for ({ skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) {
|
||||
|
||||
~~=> Pos: (1067 to 1068) SpanInfo: {"start":1015,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 35, col 7) to (line 35, col 59)
|
||||
35 >for ({ skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (1069 to 1087) SpanInfo: {"start":1073,"length":11}
|
||||
>multiRobots
|
||||
>:=> (line 35, col 65) to (line 35, col 76)
|
||||
--------------------------------
|
||||
36 > console.log(primaryA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1088 to 1114) SpanInfo: {"start":1092,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 36, col 4) to (line 36, col 25)
|
||||
--------------------------------
|
||||
37 >}
|
||||
|
||||
~~ => Pos: (1115 to 1116) SpanInfo: {"start":1092,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 36, col 4) to (line 36, col 25)
|
||||
--------------------------------
|
||||
38 >for ({ skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (1117 to 1130) SpanInfo: {"start":1124,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 38, col 7) to (line 38, col 59)
|
||||
38 >for ({ skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~ => Pos: (1131 to 1151) SpanInfo: {"start":1134,"length":17}
|
||||
>primary: primaryA
|
||||
>:=> (line 38, col 17) to (line 38, col 34)
|
||||
38 >for ({ skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1152 to 1175) SpanInfo: {"start":1153,"length":21}
|
||||
>secondary: secondaryA
|
||||
>:=> (line 38, col 36) to (line 38, col 57)
|
||||
38 >for ({ skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) {
|
||||
|
||||
~~=> Pos: (1176 to 1177) SpanInfo: {"start":1124,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 38, col 7) to (line 38, col 59)
|
||||
38 >for ({ skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1178 to 1201) SpanInfo: {"start":1182,"length":16}
|
||||
>getMultiRobots()
|
||||
>:=> (line 38, col 65) to (line 38, col 81)
|
||||
--------------------------------
|
||||
39 > console.log(primaryA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1202 to 1228) SpanInfo: {"start":1206,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 39, col 4) to (line 39, col 25)
|
||||
--------------------------------
|
||||
40 >}
|
||||
|
||||
~~ => Pos: (1229 to 1230) SpanInfo: {"start":1206,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 39, col 4) to (line 39, col 25)
|
||||
--------------------------------
|
||||
41 >for ({ skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (1231 to 1244) SpanInfo: {"start":1238,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 41, col 7) to (line 41, col 59)
|
||||
41 >for ({ skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~ => Pos: (1245 to 1265) SpanInfo: {"start":1248,"length":17}
|
||||
>primary: primaryA
|
||||
>:=> (line 41, col 17) to (line 41, col 34)
|
||||
41 >for ({ skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1266 to 1289) SpanInfo: {"start":1267,"length":21}
|
||||
>secondary: secondaryA
|
||||
>:=> (line 41, col 36) to (line 41, col 57)
|
||||
41 >for ({ skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~=> Pos: (1290 to 1291) SpanInfo: {"start":1238,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 41, col 7) to (line 41, col 59)
|
||||
41 >for ({ skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1292 to 1365) SpanInfo: {"start":1296,"length":148}
|
||||
>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]
|
||||
>:=> (line 41, col 65) to (line 42, col 78)
|
||||
--------------------------------
|
||||
42 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1366 to 1447) SpanInfo: {"start":1296,"length":148}
|
||||
>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]
|
||||
>:=> (line 41, col 65) to (line 42, col 78)
|
||||
--------------------------------
|
||||
43 > console.log(primaryA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1448 to 1474) SpanInfo: {"start":1452,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 43, col 4) to (line 43, col 25)
|
||||
--------------------------------
|
||||
44 >}
|
||||
|
||||
~~ => Pos: (1475 to 1476) SpanInfo: {"start":1452,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 43, col 4) to (line 43, col 25)
|
||||
--------------------------------
|
||||
45 >for ({name } of robots) {
|
||||
|
||||
~~~~~~~~~~~~ => Pos: (1477 to 1488) SpanInfo: {"start":1483,"length":4}
|
||||
>name
|
||||
>:=> (line 45, col 6) to (line 45, col 10)
|
||||
45 >for ({name } of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (1489 to 1502) SpanInfo: {"start":1493,"length":6}
|
||||
>robots
|
||||
>:=> (line 45, col 16) to (line 45, col 22)
|
||||
--------------------------------
|
||||
46 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1503 to 1526) SpanInfo: {"start":1507,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 46, col 4) to (line 46, col 22)
|
||||
--------------------------------
|
||||
47 >}
|
||||
|
||||
~~ => Pos: (1527 to 1528) SpanInfo: {"start":1507,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 46, col 4) to (line 46, col 22)
|
||||
--------------------------------
|
||||
48 >for ({name } of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~ => Pos: (1529 to 1540) SpanInfo: {"start":1535,"length":4}
|
||||
>name
|
||||
>:=> (line 48, col 6) to (line 48, col 10)
|
||||
48 >for ({name } of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (1541 to 1559) SpanInfo: {"start":1545,"length":11}
|
||||
>getRobots()
|
||||
>:=> (line 48, col 16) to (line 48, col 27)
|
||||
--------------------------------
|
||||
49 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1560 to 1583) SpanInfo: {"start":1564,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 49, col 4) to (line 49, col 22)
|
||||
--------------------------------
|
||||
50 >}
|
||||
|
||||
~~ => Pos: (1584 to 1585) SpanInfo: {"start":1564,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 49, col 4) to (line 49, col 22)
|
||||
--------------------------------
|
||||
51 >for ({name } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) {
|
||||
|
||||
~~~~~~~~~~~~ => Pos: (1586 to 1597) SpanInfo: {"start":1592,"length":4}
|
||||
>name
|
||||
>:=> (line 51, col 6) to (line 51, col 10)
|
||||
51 >for ({name } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1598 to 1681) SpanInfo: {"start":1602,"length":76}
|
||||
>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]
|
||||
>:=> (line 51, col 16) to (line 51, col 92)
|
||||
--------------------------------
|
||||
52 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1682 to 1705) SpanInfo: {"start":1686,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 52, col 4) to (line 52, col 22)
|
||||
--------------------------------
|
||||
53 >}
|
||||
|
||||
~~ => Pos: (1706 to 1707) SpanInfo: {"start":1686,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 52, col 4) to (line 52, col 22)
|
||||
--------------------------------
|
||||
54 >for ({ skills: { primary, secondary } } of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (1708 to 1721) SpanInfo: {"start":1715,"length":30}
|
||||
>skills: { primary, secondary }
|
||||
>:=> (line 54, col 7) to (line 54, col 37)
|
||||
54 >for ({ skills: { primary, secondary } } of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~ => Pos: (1722 to 1732) SpanInfo: {"start":1725,"length":7}
|
||||
>primary
|
||||
>:=> (line 54, col 17) to (line 54, col 24)
|
||||
54 >for ({ skills: { primary, secondary } } of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~ => Pos: (1733 to 1744) SpanInfo: {"start":1734,"length":9}
|
||||
>secondary
|
||||
>:=> (line 54, col 26) to (line 54, col 35)
|
||||
54 >for ({ skills: { primary, secondary } } of multiRobots) {
|
||||
|
||||
~~ => Pos: (1745 to 1746) SpanInfo: {"start":1715,"length":30}
|
||||
>skills: { primary, secondary }
|
||||
>:=> (line 54, col 7) to (line 54, col 37)
|
||||
54 >for ({ skills: { primary, secondary } } of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (1747 to 1765) SpanInfo: {"start":1751,"length":11}
|
||||
>multiRobots
|
||||
>:=> (line 54, col 43) to (line 54, col 54)
|
||||
--------------------------------
|
||||
55 > console.log(primaryA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1766 to 1792) SpanInfo: {"start":1770,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 55, col 4) to (line 55, col 25)
|
||||
--------------------------------
|
||||
56 >}
|
||||
|
||||
~~ => Pos: (1793 to 1794) SpanInfo: {"start":1770,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 55, col 4) to (line 55, col 25)
|
||||
--------------------------------
|
||||
57 >for ({ skills: { primary, secondary } } of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (1795 to 1808) SpanInfo: {"start":1802,"length":30}
|
||||
>skills: { primary, secondary }
|
||||
>:=> (line 57, col 7) to (line 57, col 37)
|
||||
57 >for ({ skills: { primary, secondary } } of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~ => Pos: (1809 to 1819) SpanInfo: {"start":1812,"length":7}
|
||||
>primary
|
||||
>:=> (line 57, col 17) to (line 57, col 24)
|
||||
57 >for ({ skills: { primary, secondary } } of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~ => Pos: (1820 to 1831) SpanInfo: {"start":1821,"length":9}
|
||||
>secondary
|
||||
>:=> (line 57, col 26) to (line 57, col 35)
|
||||
57 >for ({ skills: { primary, secondary } } of getMultiRobots()) {
|
||||
|
||||
~~ => Pos: (1832 to 1833) SpanInfo: {"start":1802,"length":30}
|
||||
>skills: { primary, secondary }
|
||||
>:=> (line 57, col 7) to (line 57, col 37)
|
||||
57 >for ({ skills: { primary, secondary } } of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1834 to 1857) SpanInfo: {"start":1838,"length":16}
|
||||
>getMultiRobots()
|
||||
>:=> (line 57, col 43) to (line 57, col 59)
|
||||
--------------------------------
|
||||
58 > console.log(primaryA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1858 to 1884) SpanInfo: {"start":1862,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 58, col 4) to (line 58, col 25)
|
||||
--------------------------------
|
||||
59 >}
|
||||
|
||||
~~ => Pos: (1885 to 1886) SpanInfo: {"start":1862,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 58, col 4) to (line 58, col 25)
|
||||
--------------------------------
|
||||
60 >for ({ skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (1887 to 1900) SpanInfo: {"start":1894,"length":30}
|
||||
>skills: { primary, secondary }
|
||||
>:=> (line 60, col 7) to (line 60, col 37)
|
||||
60 >for ({ skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~~~~ => Pos: (1901 to 1911) SpanInfo: {"start":1904,"length":7}
|
||||
>primary
|
||||
>:=> (line 60, col 17) to (line 60, col 24)
|
||||
60 >for ({ skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~~~~~ => Pos: (1912 to 1923) SpanInfo: {"start":1913,"length":9}
|
||||
>secondary
|
||||
>:=> (line 60, col 26) to (line 60, col 35)
|
||||
60 >for ({ skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~ => Pos: (1924 to 1925) SpanInfo: {"start":1894,"length":30}
|
||||
>skills: { primary, secondary }
|
||||
>:=> (line 60, col 7) to (line 60, col 37)
|
||||
60 >for ({ skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1926 to 1999) SpanInfo: {"start":1930,"length":148}
|
||||
>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]
|
||||
>:=> (line 60, col 43) to (line 61, col 78)
|
||||
--------------------------------
|
||||
61 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2000 to 2081) SpanInfo: {"start":1930,"length":148}
|
||||
>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]
|
||||
>:=> (line 60, col 43) to (line 61, col 78)
|
||||
--------------------------------
|
||||
62 > console.log(primaryA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2082 to 2108) SpanInfo: {"start":2086,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 62, col 4) to (line 62, col 25)
|
||||
--------------------------------
|
||||
63 >}
|
||||
|
||||
~~ => Pos: (2109 to 2110) SpanInfo: {"start":2086,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 62, col 4) to (line 62, col 25)
|
||||
--------------------------------
|
||||
64 >for ({name: nameA, skill: skillA } of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (2111 to 2128) SpanInfo: {"start":2117,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 64, col 6) to (line 64, col 17)
|
||||
64 >for ({name: nameA, skill: skillA } of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~ => Pos: (2129 to 2144) SpanInfo: {"start":2130,"length":13}
|
||||
>skill: skillA
|
||||
>:=> (line 64, col 19) to (line 64, col 32)
|
||||
64 >for ({name: nameA, skill: skillA } of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~=> Pos: (2145 to 2158) SpanInfo: {"start":2149,"length":6}
|
||||
>robots
|
||||
>:=> (line 64, col 38) to (line 64, col 44)
|
||||
--------------------------------
|
||||
65 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2159 to 2182) SpanInfo: {"start":2163,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 65, col 4) to (line 65, col 22)
|
||||
--------------------------------
|
||||
66 >}
|
||||
|
||||
~~ => Pos: (2183 to 2184) SpanInfo: {"start":2163,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 65, col 4) to (line 65, col 22)
|
||||
--------------------------------
|
||||
67 >for ({name: nameA, skill: skillA } of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (2185 to 2202) SpanInfo: {"start":2191,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 67, col 6) to (line 67, col 17)
|
||||
67 >for ({name: nameA, skill: skillA } of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~ => Pos: (2203 to 2218) SpanInfo: {"start":2204,"length":13}
|
||||
>skill: skillA
|
||||
>:=> (line 67, col 19) to (line 67, col 32)
|
||||
67 >for ({name: nameA, skill: skillA } of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (2219 to 2237) SpanInfo: {"start":2223,"length":11}
|
||||
>getRobots()
|
||||
>:=> (line 67, col 38) to (line 67, col 49)
|
||||
--------------------------------
|
||||
68 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2238 to 2261) SpanInfo: {"start":2242,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 68, col 4) to (line 68, col 22)
|
||||
--------------------------------
|
||||
69 >}
|
||||
|
||||
~~ => Pos: (2262 to 2263) SpanInfo: {"start":2242,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 68, col 4) to (line 68, col 22)
|
||||
--------------------------------
|
||||
70 >for ({name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (2264 to 2281) SpanInfo: {"start":2270,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 70, col 6) to (line 70, col 17)
|
||||
70 >for ({name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~ => Pos: (2282 to 2297) SpanInfo: {"start":2283,"length":13}
|
||||
>skill: skillA
|
||||
>:=> (line 70, col 19) to (line 70, col 32)
|
||||
70 >for ({name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2298 to 2381) SpanInfo: {"start":2302,"length":76}
|
||||
>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]
|
||||
>:=> (line 70, col 38) to (line 70, col 114)
|
||||
--------------------------------
|
||||
71 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2382 to 2405) SpanInfo: {"start":2386,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 71, col 4) to (line 71, col 22)
|
||||
--------------------------------
|
||||
72 >}
|
||||
|
||||
~~ => Pos: (2406 to 2407) SpanInfo: {"start":2386,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 71, col 4) to (line 71, col 22)
|
||||
--------------------------------
|
||||
73 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (2408 to 2425) SpanInfo: {"start":2414,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 73, col 6) to (line 73, col 17)
|
||||
73 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) {
|
||||
|
||||
~~~~~~~~ => Pos: (2426 to 2433) SpanInfo: {"start":2427,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 73, col 19) to (line 73, col 71)
|
||||
73 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~=> Pos: (2434 to 2454) SpanInfo: {"start":2437,"length":17}
|
||||
>primary: primaryA
|
||||
>:=> (line 73, col 29) to (line 73, col 46)
|
||||
73 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2455 to 2478) SpanInfo: {"start":2456,"length":21}
|
||||
>secondary: secondaryA
|
||||
>:=> (line 73, col 48) to (line 73, col 69)
|
||||
73 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) {
|
||||
|
||||
~~=> Pos: (2479 to 2480) SpanInfo: {"start":2427,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 73, col 19) to (line 73, col 71)
|
||||
73 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (2481 to 2499) SpanInfo: {"start":2485,"length":11}
|
||||
>multiRobots
|
||||
>:=> (line 73, col 77) to (line 73, col 88)
|
||||
--------------------------------
|
||||
74 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2500 to 2523) SpanInfo: {"start":2504,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 74, col 4) to (line 74, col 22)
|
||||
--------------------------------
|
||||
75 >}
|
||||
|
||||
~~ => Pos: (2524 to 2525) SpanInfo: {"start":2504,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 74, col 4) to (line 74, col 22)
|
||||
--------------------------------
|
||||
76 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (2526 to 2543) SpanInfo: {"start":2532,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 76, col 6) to (line 76, col 17)
|
||||
76 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~ => Pos: (2544 to 2551) SpanInfo: {"start":2545,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 76, col 19) to (line 76, col 71)
|
||||
76 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~=> Pos: (2552 to 2572) SpanInfo: {"start":2555,"length":17}
|
||||
>primary: primaryA
|
||||
>:=> (line 76, col 29) to (line 76, col 46)
|
||||
76 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2573 to 2596) SpanInfo: {"start":2574,"length":21}
|
||||
>secondary: secondaryA
|
||||
>:=> (line 76, col 48) to (line 76, col 69)
|
||||
76 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) {
|
||||
|
||||
~~=> Pos: (2597 to 2598) SpanInfo: {"start":2545,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 76, col 19) to (line 76, col 71)
|
||||
76 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2599 to 2622) SpanInfo: {"start":2603,"length":16}
|
||||
>getMultiRobots()
|
||||
>:=> (line 76, col 77) to (line 76, col 93)
|
||||
--------------------------------
|
||||
77 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2623 to 2646) SpanInfo: {"start":2627,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 77, col 4) to (line 77, col 22)
|
||||
--------------------------------
|
||||
78 >}
|
||||
|
||||
~~ => Pos: (2647 to 2648) SpanInfo: {"start":2627,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 77, col 4) to (line 77, col 22)
|
||||
--------------------------------
|
||||
79 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (2649 to 2666) SpanInfo: {"start":2655,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 79, col 6) to (line 79, col 17)
|
||||
79 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~ => Pos: (2667 to 2674) SpanInfo: {"start":2668,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 79, col 19) to (line 79, col 71)
|
||||
79 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~=> Pos: (2675 to 2695) SpanInfo: {"start":2678,"length":17}
|
||||
>primary: primaryA
|
||||
>:=> (line 79, col 29) to (line 79, col 46)
|
||||
79 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2696 to 2719) SpanInfo: {"start":2697,"length":21}
|
||||
>secondary: secondaryA
|
||||
>:=> (line 79, col 48) to (line 79, col 69)
|
||||
79 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~=> Pos: (2720 to 2721) SpanInfo: {"start":2668,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 79, col 19) to (line 79, col 71)
|
||||
79 >for ({name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2722 to 2795) SpanInfo: {"start":2726,"length":148}
|
||||
>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]
|
||||
>:=> (line 79, col 77) to (line 80, col 78)
|
||||
--------------------------------
|
||||
80 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2796 to 2877) SpanInfo: {"start":2726,"length":148}
|
||||
>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]
|
||||
>:=> (line 79, col 77) to (line 80, col 78)
|
||||
--------------------------------
|
||||
81 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2878 to 2901) SpanInfo: {"start":2882,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 81, col 4) to (line 81, col 22)
|
||||
--------------------------------
|
||||
82 >}
|
||||
|
||||
~~ => Pos: (2902 to 2903) SpanInfo: {"start":2882,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 81, col 4) to (line 81, col 22)
|
||||
--------------------------------
|
||||
83 >for ({name, skill } of robots) {
|
||||
|
||||
~~~~~~~~~~~ => Pos: (2904 to 2914) SpanInfo: {"start":2910,"length":4}
|
||||
>name
|
||||
>:=> (line 83, col 6) to (line 83, col 10)
|
||||
83 >for ({name, skill } of robots) {
|
||||
|
||||
~~~~~~~~ => Pos: (2915 to 2922) SpanInfo: {"start":2916,"length":5}
|
||||
>skill
|
||||
>:=> (line 83, col 12) to (line 83, col 17)
|
||||
83 >for ({name, skill } of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (2923 to 2936) SpanInfo: {"start":2927,"length":6}
|
||||
>robots
|
||||
>:=> (line 83, col 23) to (line 83, col 29)
|
||||
--------------------------------
|
||||
84 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2937 to 2960) SpanInfo: {"start":2941,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 84, col 4) to (line 84, col 22)
|
||||
--------------------------------
|
||||
85 >}
|
||||
|
||||
~~ => Pos: (2961 to 2962) SpanInfo: {"start":2941,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 84, col 4) to (line 84, col 22)
|
||||
--------------------------------
|
||||
86 >for ({name, skill } of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~ => Pos: (2963 to 2973) SpanInfo: {"start":2969,"length":4}
|
||||
>name
|
||||
>:=> (line 86, col 6) to (line 86, col 10)
|
||||
86 >for ({name, skill } of getRobots()) {
|
||||
|
||||
~~~~~~~~ => Pos: (2974 to 2981) SpanInfo: {"start":2975,"length":5}
|
||||
>skill
|
||||
>:=> (line 86, col 12) to (line 86, col 17)
|
||||
86 >for ({name, skill } of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (2982 to 3000) SpanInfo: {"start":2986,"length":11}
|
||||
>getRobots()
|
||||
>:=> (line 86, col 23) to (line 86, col 34)
|
||||
--------------------------------
|
||||
87 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3001 to 3024) SpanInfo: {"start":3005,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 87, col 4) to (line 87, col 22)
|
||||
--------------------------------
|
||||
88 >}
|
||||
|
||||
~~ => Pos: (3025 to 3026) SpanInfo: {"start":3005,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 87, col 4) to (line 87, col 22)
|
||||
--------------------------------
|
||||
89 >for ({name, skill } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) {
|
||||
|
||||
~~~~~~~~~~~ => Pos: (3027 to 3037) SpanInfo: {"start":3033,"length":4}
|
||||
>name
|
||||
>:=> (line 89, col 6) to (line 89, col 10)
|
||||
89 >for ({name, skill } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) {
|
||||
|
||||
~~~~~~~~ => Pos: (3038 to 3045) SpanInfo: {"start":3039,"length":5}
|
||||
>skill
|
||||
>:=> (line 89, col 12) to (line 89, col 17)
|
||||
89 >for ({name, skill } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (3046 to 3129) SpanInfo: {"start":3050,"length":76}
|
||||
>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]
|
||||
>:=> (line 89, col 23) to (line 89, col 99)
|
||||
--------------------------------
|
||||
90 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3130 to 3153) SpanInfo: {"start":3134,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 90, col 4) to (line 90, col 22)
|
||||
--------------------------------
|
||||
91 >}
|
||||
|
||||
~~ => Pos: (3154 to 3155) SpanInfo: {"start":3134,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 90, col 4) to (line 90, col 22)
|
||||
--------------------------------
|
||||
92 >for ({name, skills: { primary, secondary } } of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~ => Pos: (3156 to 3166) SpanInfo: {"start":3162,"length":4}
|
||||
>name
|
||||
>:=> (line 92, col 6) to (line 92, col 10)
|
||||
92 >for ({name, skills: { primary, secondary } } of multiRobots) {
|
||||
|
||||
~~~~~~~~ => Pos: (3167 to 3174) SpanInfo: {"start":3168,"length":30}
|
||||
>skills: { primary, secondary }
|
||||
>:=> (line 92, col 12) to (line 92, col 42)
|
||||
92 >for ({name, skills: { primary, secondary } } of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~ => Pos: (3175 to 3185) SpanInfo: {"start":3178,"length":7}
|
||||
>primary
|
||||
>:=> (line 92, col 22) to (line 92, col 29)
|
||||
92 >for ({name, skills: { primary, secondary } } of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~ => Pos: (3186 to 3197) SpanInfo: {"start":3187,"length":9}
|
||||
>secondary
|
||||
>:=> (line 92, col 31) to (line 92, col 40)
|
||||
92 >for ({name, skills: { primary, secondary } } of multiRobots) {
|
||||
|
||||
~~ => Pos: (3198 to 3199) SpanInfo: {"start":3168,"length":30}
|
||||
>skills: { primary, secondary }
|
||||
>:=> (line 92, col 12) to (line 92, col 42)
|
||||
92 >for ({name, skills: { primary, secondary } } of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (3200 to 3218) SpanInfo: {"start":3204,"length":11}
|
||||
>multiRobots
|
||||
>:=> (line 92, col 48) to (line 92, col 59)
|
||||
--------------------------------
|
||||
93 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3219 to 3242) SpanInfo: {"start":3223,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 93, col 4) to (line 93, col 22)
|
||||
--------------------------------
|
||||
94 >}
|
||||
|
||||
~~ => Pos: (3243 to 3244) SpanInfo: {"start":3223,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 93, col 4) to (line 93, col 22)
|
||||
--------------------------------
|
||||
95 >for ({name, skills: { primary, secondary } } of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~ => Pos: (3245 to 3255) SpanInfo: {"start":3251,"length":4}
|
||||
>name
|
||||
>:=> (line 95, col 6) to (line 95, col 10)
|
||||
95 >for ({name, skills: { primary, secondary } } of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~ => Pos: (3256 to 3263) SpanInfo: {"start":3257,"length":30}
|
||||
>skills: { primary, secondary }
|
||||
>:=> (line 95, col 12) to (line 95, col 42)
|
||||
95 >for ({name, skills: { primary, secondary } } of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~ => Pos: (3264 to 3274) SpanInfo: {"start":3267,"length":7}
|
||||
>primary
|
||||
>:=> (line 95, col 22) to (line 95, col 29)
|
||||
95 >for ({name, skills: { primary, secondary } } of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~ => Pos: (3275 to 3286) SpanInfo: {"start":3276,"length":9}
|
||||
>secondary
|
||||
>:=> (line 95, col 31) to (line 95, col 40)
|
||||
95 >for ({name, skills: { primary, secondary } } of getMultiRobots()) {
|
||||
|
||||
~~ => Pos: (3287 to 3288) SpanInfo: {"start":3257,"length":30}
|
||||
>skills: { primary, secondary }
|
||||
>:=> (line 95, col 12) to (line 95, col 42)
|
||||
95 >for ({name, skills: { primary, secondary } } of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (3289 to 3312) SpanInfo: {"start":3293,"length":16}
|
||||
>getMultiRobots()
|
||||
>:=> (line 95, col 48) to (line 95, col 64)
|
||||
--------------------------------
|
||||
96 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3313 to 3336) SpanInfo: {"start":3317,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 96, col 4) to (line 96, col 22)
|
||||
--------------------------------
|
||||
97 >}
|
||||
|
||||
~~ => Pos: (3337 to 3338) SpanInfo: {"start":3317,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 96, col 4) to (line 96, col 22)
|
||||
--------------------------------
|
||||
98 >for ({name, skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~~~~ => Pos: (3339 to 3349) SpanInfo: {"start":3345,"length":4}
|
||||
>name
|
||||
>:=> (line 98, col 6) to (line 98, col 10)
|
||||
98 >for ({name, skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~ => Pos: (3350 to 3357) SpanInfo: {"start":3351,"length":30}
|
||||
>skills: { primary, secondary }
|
||||
>:=> (line 98, col 12) to (line 98, col 42)
|
||||
98 >for ({name, skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~~~~ => Pos: (3358 to 3368) SpanInfo: {"start":3361,"length":7}
|
||||
>primary
|
||||
>:=> (line 98, col 22) to (line 98, col 29)
|
||||
98 >for ({name, skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~~~~~ => Pos: (3369 to 3380) SpanInfo: {"start":3370,"length":9}
|
||||
>secondary
|
||||
>:=> (line 98, col 31) to (line 98, col 40)
|
||||
98 >for ({name, skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~ => Pos: (3381 to 3382) SpanInfo: {"start":3351,"length":30}
|
||||
>skills: { primary, secondary }
|
||||
>:=> (line 98, col 12) to (line 98, col 42)
|
||||
98 >for ({name, skills: { primary, secondary } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (3383 to 3456) SpanInfo: {"start":3387,"length":148}
|
||||
>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]
|
||||
>:=> (line 98, col 48) to (line 99, col 78)
|
||||
--------------------------------
|
||||
99 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (3457 to 3538) SpanInfo: {"start":3387,"length":148}
|
||||
>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]
|
||||
>:=> (line 98, col 48) to (line 99, col 78)
|
||||
--------------------------------
|
||||
100> console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (3539 to 3562) SpanInfo: {"start":3543,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 100, col 4) to (line 100, col 22)
|
||||
--------------------------------
|
||||
101>}
|
||||
~ => Pos: (3563 to 3563) SpanInfo: {"start":3543,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 100, col 4) to (line 100, col 22)
|
||||
+1223
File diff suppressed because it is too large
Load Diff
+365
@@ -0,0 +1,365 @@
|
||||
|
||||
1 >declare var console: {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined
|
||||
--------------------------------
|
||||
2 > log(msg: any): void;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined
|
||||
--------------------------------
|
||||
3 >}
|
||||
|
||||
~~ => Pos: (48 to 49) SpanInfo: undefined
|
||||
--------------------------------
|
||||
4 >type Robot = [number, string, string];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (50 to 88) SpanInfo: undefined
|
||||
--------------------------------
|
||||
5 >type MultiSkilledRobot = [string, [string, string]];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (89 to 141) SpanInfo: undefined
|
||||
--------------------------------
|
||||
6 >
|
||||
|
||||
~ => Pos: (142 to 142) SpanInfo: undefined
|
||||
--------------------------------
|
||||
7 >var robotA: Robot = [1, "mower", "mowing"];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (143 to 186) SpanInfo: {"start":143,"length":42}
|
||||
>var robotA: Robot = [1, "mower", "mowing"]
|
||||
>:=> (line 7, col 0) to (line 7, col 42)
|
||||
--------------------------------
|
||||
8 >var robotB: Robot = [2, "trimmer", "trimming"];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (187 to 234) SpanInfo: {"start":187,"length":46}
|
||||
>var robotB: Robot = [2, "trimmer", "trimming"]
|
||||
>:=> (line 8, col 0) to (line 8, col 46)
|
||||
--------------------------------
|
||||
9 >var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (235 to 298) SpanInfo: {"start":235,"length":62}
|
||||
>var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]
|
||||
>:=> (line 9, col 0) to (line 9, col 62)
|
||||
--------------------------------
|
||||
10 >var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (299 to 372) SpanInfo: {"start":299,"length":72}
|
||||
>var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]
|
||||
>:=> (line 10, col 0) to (line 10, col 72)
|
||||
--------------------------------
|
||||
11 >
|
||||
|
||||
~ => Pos: (373 to 373) SpanInfo: undefined
|
||||
--------------------------------
|
||||
12 >let nameA: string, numberB: number, nameB: string, skillB: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (374 to 440) SpanInfo: undefined
|
||||
--------------------------------
|
||||
13 >let robotAInfo: (number | string)[];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (441 to 477) SpanInfo: undefined
|
||||
--------------------------------
|
||||
14 >
|
||||
|
||||
~ => Pos: (478 to 478) SpanInfo: undefined
|
||||
--------------------------------
|
||||
15 >let multiSkillB: [string, string], nameMB: string, primarySkillB: string, secondarySkillB: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (479 to 577) SpanInfo: undefined
|
||||
--------------------------------
|
||||
16 >let multiRobotAInfo: (string | [string, string])[];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (578 to 629) SpanInfo: undefined
|
||||
--------------------------------
|
||||
17 >
|
||||
|
||||
~ => Pos: (630 to 630) SpanInfo: undefined
|
||||
--------------------------------
|
||||
18 >[, nameA] = robotA;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~ => Pos: (631 to 650) SpanInfo: {"start":634,"length":5}
|
||||
>nameA
|
||||
>:=> (line 18, col 3) to (line 18, col 8)
|
||||
--------------------------------
|
||||
19 >[, nameB] = getRobotB();
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (651 to 675) SpanInfo: {"start":654,"length":5}
|
||||
>nameB
|
||||
>:=> (line 19, col 3) to (line 19, col 8)
|
||||
--------------------------------
|
||||
20 >[, nameB] = [2, "trimmer", "trimming"];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (676 to 715) SpanInfo: {"start":679,"length":5}
|
||||
>nameB
|
||||
>:=> (line 20, col 3) to (line 20, col 8)
|
||||
--------------------------------
|
||||
21 >[, multiSkillB] = multiRobotB;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (716 to 746) SpanInfo: {"start":719,"length":11}
|
||||
>multiSkillB
|
||||
>:=> (line 21, col 3) to (line 21, col 14)
|
||||
--------------------------------
|
||||
22 >[, multiSkillB] = getMultiRobotB();
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (747 to 782) SpanInfo: {"start":750,"length":11}
|
||||
>multiSkillB
|
||||
>:=> (line 22, col 3) to (line 22, col 14)
|
||||
--------------------------------
|
||||
23 >[, multiSkillB] = ["roomba", ["vaccum", "mopping"]];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (783 to 835) SpanInfo: {"start":786,"length":11}
|
||||
>multiSkillB
|
||||
>:=> (line 23, col 3) to (line 23, col 14)
|
||||
--------------------------------
|
||||
24 >
|
||||
|
||||
~ => Pos: (836 to 836) SpanInfo: undefined
|
||||
--------------------------------
|
||||
25 >[numberB] = robotB;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~ => Pos: (837 to 856) SpanInfo: {"start":838,"length":7}
|
||||
>numberB
|
||||
>:=> (line 25, col 1) to (line 25, col 8)
|
||||
--------------------------------
|
||||
26 >[numberB] = getRobotB();
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (857 to 881) SpanInfo: {"start":858,"length":7}
|
||||
>numberB
|
||||
>:=> (line 26, col 1) to (line 26, col 8)
|
||||
--------------------------------
|
||||
27 >[numberB] = [2, "trimmer", "trimming"];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (882 to 921) SpanInfo: {"start":883,"length":7}
|
||||
>numberB
|
||||
>:=> (line 27, col 1) to (line 27, col 8)
|
||||
--------------------------------
|
||||
28 >[nameMB] = multiRobotB;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (922 to 945) SpanInfo: {"start":923,"length":6}
|
||||
>nameMB
|
||||
>:=> (line 28, col 1) to (line 28, col 7)
|
||||
--------------------------------
|
||||
29 >[nameMB] = getMultiRobotB();
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (946 to 974) SpanInfo: {"start":947,"length":6}
|
||||
>nameMB
|
||||
>:=> (line 29, col 1) to (line 29, col 7)
|
||||
--------------------------------
|
||||
30 >[nameMB] = ["trimmer", ["trimming", "edging"]];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (975 to 1022) SpanInfo: {"start":976,"length":6}
|
||||
>nameMB
|
||||
>:=> (line 30, col 1) to (line 30, col 7)
|
||||
--------------------------------
|
||||
31 >
|
||||
|
||||
~ => Pos: (1023 to 1023) SpanInfo: undefined
|
||||
--------------------------------
|
||||
32 >[numberB, nameB, skillB] = robotB;
|
||||
|
||||
~~~~~~~~~ => Pos: (1024 to 1032) SpanInfo: {"start":1025,"length":7}
|
||||
>numberB
|
||||
>:=> (line 32, col 1) to (line 32, col 8)
|
||||
32 >[numberB, nameB, skillB] = robotB;
|
||||
|
||||
~~~~~~~ => Pos: (1033 to 1039) SpanInfo: {"start":1034,"length":5}
|
||||
>nameB
|
||||
>:=> (line 32, col 10) to (line 32, col 15)
|
||||
32 >[numberB, nameB, skillB] = robotB;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (1040 to 1058) SpanInfo: {"start":1041,"length":6}
|
||||
>skillB
|
||||
>:=> (line 32, col 17) to (line 32, col 23)
|
||||
--------------------------------
|
||||
33 >[numberB, nameB, skillB] = getRobotB();
|
||||
|
||||
~~~~~~~~~ => Pos: (1059 to 1067) SpanInfo: {"start":1060,"length":7}
|
||||
>numberB
|
||||
>:=> (line 33, col 1) to (line 33, col 8)
|
||||
33 >[numberB, nameB, skillB] = getRobotB();
|
||||
|
||||
~~~~~~~ => Pos: (1068 to 1074) SpanInfo: {"start":1069,"length":5}
|
||||
>nameB
|
||||
>:=> (line 33, col 10) to (line 33, col 15)
|
||||
33 >[numberB, nameB, skillB] = getRobotB();
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1075 to 1098) SpanInfo: {"start":1076,"length":6}
|
||||
>skillB
|
||||
>:=> (line 33, col 17) to (line 33, col 23)
|
||||
--------------------------------
|
||||
34 >[numberB, nameB, skillB] = [2, "trimmer", "trimming"];
|
||||
|
||||
~~~~~~~~~ => Pos: (1099 to 1107) SpanInfo: {"start":1100,"length":7}
|
||||
>numberB
|
||||
>:=> (line 34, col 1) to (line 34, col 8)
|
||||
34 >[numberB, nameB, skillB] = [2, "trimmer", "trimming"];
|
||||
|
||||
~~~~~~~ => Pos: (1108 to 1114) SpanInfo: {"start":1109,"length":5}
|
||||
>nameB
|
||||
>:=> (line 34, col 10) to (line 34, col 15)
|
||||
34 >[numberB, nameB, skillB] = [2, "trimmer", "trimming"];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1115 to 1153) SpanInfo: {"start":1116,"length":6}
|
||||
>skillB
|
||||
>:=> (line 34, col 17) to (line 34, col 23)
|
||||
--------------------------------
|
||||
35 >[nameMB, [primarySkillB, secondarySkillB]] = multiRobotB;
|
||||
|
||||
~~~~~~~~ => Pos: (1154 to 1161) SpanInfo: {"start":1155,"length":6}
|
||||
>nameMB
|
||||
>:=> (line 35, col 1) to (line 35, col 7)
|
||||
35 >[nameMB, [primarySkillB, secondarySkillB]] = multiRobotB;
|
||||
|
||||
~~~~~~~~~~~~~~~~ => Pos: (1162 to 1177) SpanInfo: {"start":1164,"length":13}
|
||||
>primarySkillB
|
||||
>:=> (line 35, col 10) to (line 35, col 23)
|
||||
35 >[nameMB, [primarySkillB, secondarySkillB]] = multiRobotB;
|
||||
|
||||
~~~~~~~~~~~~~~~~~ => Pos: (1178 to 1194) SpanInfo: {"start":1179,"length":15}
|
||||
>secondarySkillB
|
||||
>:=> (line 35, col 25) to (line 35, col 40)
|
||||
35 >[nameMB, [primarySkillB, secondarySkillB]] = multiRobotB;
|
||||
|
||||
~~~~~~~~~~~~~~~~~=> Pos: (1195 to 1211) SpanInfo: {"start":1163,"length":32}
|
||||
>[primarySkillB, secondarySkillB]
|
||||
>:=> (line 35, col 9) to (line 35, col 41)
|
||||
--------------------------------
|
||||
36 >[nameMB, [primarySkillB, secondarySkillB]] = getMultiRobotB();
|
||||
|
||||
~~~~~~~~ => Pos: (1212 to 1219) SpanInfo: {"start":1213,"length":6}
|
||||
>nameMB
|
||||
>:=> (line 36, col 1) to (line 36, col 7)
|
||||
36 >[nameMB, [primarySkillB, secondarySkillB]] = getMultiRobotB();
|
||||
|
||||
~~~~~~~~~~~~~~~~ => Pos: (1220 to 1235) SpanInfo: {"start":1222,"length":13}
|
||||
>primarySkillB
|
||||
>:=> (line 36, col 10) to (line 36, col 23)
|
||||
36 >[nameMB, [primarySkillB, secondarySkillB]] = getMultiRobotB();
|
||||
|
||||
~~~~~~~~~~~~~~~~~ => Pos: (1236 to 1252) SpanInfo: {"start":1237,"length":15}
|
||||
>secondarySkillB
|
||||
>:=> (line 36, col 25) to (line 36, col 40)
|
||||
36 >[nameMB, [primarySkillB, secondarySkillB]] = getMultiRobotB();
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1253 to 1274) SpanInfo: {"start":1221,"length":32}
|
||||
>[primarySkillB, secondarySkillB]
|
||||
>:=> (line 36, col 9) to (line 36, col 41)
|
||||
--------------------------------
|
||||
37 >[nameMB, [primarySkillB, secondarySkillB]] = ["trimmer", ["trimming", "edging"]];
|
||||
|
||||
~~~~~~~~ => Pos: (1275 to 1282) SpanInfo: {"start":1276,"length":6}
|
||||
>nameMB
|
||||
>:=> (line 37, col 1) to (line 37, col 7)
|
||||
37 >[nameMB, [primarySkillB, secondarySkillB]] = ["trimmer", ["trimming", "edging"]];
|
||||
|
||||
~~~~~~~~~~~~~~~~ => Pos: (1283 to 1298) SpanInfo: {"start":1285,"length":13}
|
||||
>primarySkillB
|
||||
>:=> (line 37, col 10) to (line 37, col 23)
|
||||
37 >[nameMB, [primarySkillB, secondarySkillB]] = ["trimmer", ["trimming", "edging"]];
|
||||
|
||||
~~~~~~~~~~~~~~~~~ => Pos: (1299 to 1315) SpanInfo: {"start":1300,"length":15}
|
||||
>secondarySkillB
|
||||
>:=> (line 37, col 25) to (line 37, col 40)
|
||||
37 >[nameMB, [primarySkillB, secondarySkillB]] = ["trimmer", ["trimming", "edging"]];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1316 to 1356) SpanInfo: {"start":1284,"length":32}
|
||||
>[primarySkillB, secondarySkillB]
|
||||
>:=> (line 37, col 9) to (line 37, col 41)
|
||||
--------------------------------
|
||||
38 >
|
||||
|
||||
~ => Pos: (1357 to 1357) SpanInfo: undefined
|
||||
--------------------------------
|
||||
39 >[numberB, ...robotAInfo] = robotB;
|
||||
|
||||
~~~~~~~~~ => Pos: (1358 to 1366) SpanInfo: {"start":1359,"length":7}
|
||||
>numberB
|
||||
>:=> (line 39, col 1) to (line 39, col 8)
|
||||
39 >[numberB, ...robotAInfo] = robotB;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1367 to 1392) SpanInfo: {"start":1368,"length":13}
|
||||
>...robotAInfo
|
||||
>:=> (line 39, col 10) to (line 39, col 23)
|
||||
--------------------------------
|
||||
40 >[numberB, ...robotAInfo] = getRobotB();
|
||||
|
||||
~~~~~~~~~ => Pos: (1393 to 1401) SpanInfo: {"start":1394,"length":7}
|
||||
>numberB
|
||||
>:=> (line 40, col 1) to (line 40, col 8)
|
||||
40 >[numberB, ...robotAInfo] = getRobotB();
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1402 to 1432) SpanInfo: {"start":1403,"length":13}
|
||||
>...robotAInfo
|
||||
>:=> (line 40, col 10) to (line 40, col 23)
|
||||
--------------------------------
|
||||
41 >[numberB, ...robotAInfo] = <Robot>[2, "trimmer", "trimming"];
|
||||
|
||||
~~~~~~~~~ => Pos: (1433 to 1441) SpanInfo: {"start":1434,"length":7}
|
||||
>numberB
|
||||
>:=> (line 41, col 1) to (line 41, col 8)
|
||||
41 >[numberB, ...robotAInfo] = <Robot>[2, "trimmer", "trimming"];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1442 to 1494) SpanInfo: {"start":1443,"length":13}
|
||||
>...robotAInfo
|
||||
>:=> (line 41, col 10) to (line 41, col 23)
|
||||
--------------------------------
|
||||
42 >[...multiRobotAInfo] = multiRobotA;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1495 to 1530) SpanInfo: {"start":1496,"length":18}
|
||||
>...multiRobotAInfo
|
||||
>:=> (line 42, col 1) to (line 42, col 19)
|
||||
--------------------------------
|
||||
43 >[...multiRobotAInfo] = getMultiRobotB();
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1531 to 1571) SpanInfo: {"start":1532,"length":18}
|
||||
>...multiRobotAInfo
|
||||
>:=> (line 43, col 1) to (line 43, col 19)
|
||||
--------------------------------
|
||||
44 >[...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1572 to 1631) SpanInfo: {"start":1573,"length":18}
|
||||
>...multiRobotAInfo
|
||||
>:=> (line 44, col 1) to (line 44, col 19)
|
||||
--------------------------------
|
||||
45 >
|
||||
|
||||
~ => Pos: (1632 to 1632) SpanInfo: undefined
|
||||
--------------------------------
|
||||
46 >function getRobotB() {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1633 to 1655) SpanInfo: {"start":1660,"length":13}
|
||||
>return robotB
|
||||
>:=> (line 47, col 4) to (line 47, col 17)
|
||||
--------------------------------
|
||||
47 > return robotB;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (1656 to 1674) SpanInfo: {"start":1660,"length":13}
|
||||
>return robotB
|
||||
>:=> (line 47, col 4) to (line 47, col 17)
|
||||
--------------------------------
|
||||
48 >}
|
||||
|
||||
~~ => Pos: (1675 to 1676) SpanInfo: {"start":1675,"length":1}
|
||||
>}
|
||||
>:=> (line 48, col 0) to (line 48, col 1)
|
||||
--------------------------------
|
||||
49 >
|
||||
|
||||
~ => Pos: (1677 to 1677) SpanInfo: undefined
|
||||
--------------------------------
|
||||
50 >function getMultiRobotB() {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1678 to 1705) SpanInfo: {"start":1710,"length":18}
|
||||
>return multiRobotB
|
||||
>:=> (line 51, col 4) to (line 51, col 22)
|
||||
--------------------------------
|
||||
51 > return multiRobotB;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1706 to 1729) SpanInfo: {"start":1710,"length":18}
|
||||
>return multiRobotB
|
||||
>:=> (line 51, col 4) to (line 51, col 22)
|
||||
--------------------------------
|
||||
52 >}
|
||||
~ => Pos: (1730 to 1730) SpanInfo: {"start":1730,"length":1}
|
||||
>}
|
||||
>:=> (line 52, col 0) to (line 52, col 1)
|
||||
+353
@@ -0,0 +1,353 @@
|
||||
|
||||
1 >declare var console: {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined
|
||||
--------------------------------
|
||||
2 > log(msg: any): void;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined
|
||||
--------------------------------
|
||||
3 >}
|
||||
|
||||
~~ => Pos: (48 to 49) SpanInfo: undefined
|
||||
--------------------------------
|
||||
4 >type Robot = [number, string, string];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (50 to 88) SpanInfo: undefined
|
||||
--------------------------------
|
||||
5 >type MultiSkilledRobot = [string, string[]];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (89 to 133) SpanInfo: undefined
|
||||
--------------------------------
|
||||
6 >
|
||||
|
||||
~ => Pos: (134 to 134) SpanInfo: undefined
|
||||
--------------------------------
|
||||
7 >var robotA: Robot = [1, "mower", "mowing"];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (135 to 178) SpanInfo: {"start":135,"length":42}
|
||||
>var robotA: Robot = [1, "mower", "mowing"]
|
||||
>:=> (line 7, col 0) to (line 7, col 42)
|
||||
--------------------------------
|
||||
8 >var robotB: Robot = [2, "trimmer", "trimming"];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (179 to 226) SpanInfo: {"start":179,"length":46}
|
||||
>var robotB: Robot = [2, "trimmer", "trimming"]
|
||||
>:=> (line 8, col 0) to (line 8, col 46)
|
||||
--------------------------------
|
||||
9 >var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (227 to 290) SpanInfo: {"start":227,"length":62}
|
||||
>var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]
|
||||
>:=> (line 9, col 0) to (line 9, col 62)
|
||||
--------------------------------
|
||||
10 >var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (291 to 364) SpanInfo: {"start":291,"length":72}
|
||||
>var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]
|
||||
>:=> (line 10, col 0) to (line 10, col 72)
|
||||
--------------------------------
|
||||
11 >
|
||||
|
||||
~ => Pos: (365 to 365) SpanInfo: undefined
|
||||
--------------------------------
|
||||
12 >let nameA: string, numberB: number, nameB: string, skillB: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (366 to 432) SpanInfo: undefined
|
||||
--------------------------------
|
||||
13 >let robotAInfo: (number | string)[];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (433 to 469) SpanInfo: undefined
|
||||
--------------------------------
|
||||
14 >
|
||||
|
||||
~ => Pos: (470 to 470) SpanInfo: undefined
|
||||
--------------------------------
|
||||
15 >let multiSkillB: string[], nameMB: string, primarySkillB: string, secondarySkillB: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (471 to 561) SpanInfo: undefined
|
||||
--------------------------------
|
||||
16 >let multiRobotAInfo: (string | string[])[];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (562 to 605) SpanInfo: undefined
|
||||
--------------------------------
|
||||
17 >
|
||||
|
||||
~ => Pos: (606 to 606) SpanInfo: undefined
|
||||
--------------------------------
|
||||
18 >[, nameA = "helloNoName"] = robotA;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (607 to 642) SpanInfo: {"start":610,"length":21}
|
||||
>nameA = "helloNoName"
|
||||
>:=> (line 18, col 3) to (line 18, col 24)
|
||||
--------------------------------
|
||||
19 >[, nameB = "helloNoName"] = getRobotB();
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (643 to 683) SpanInfo: {"start":646,"length":21}
|
||||
>nameB = "helloNoName"
|
||||
>:=> (line 19, col 3) to (line 19, col 24)
|
||||
--------------------------------
|
||||
20 >[, nameB = "helloNoName"] = [2, "trimmer", "trimming"];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (684 to 739) SpanInfo: {"start":687,"length":21}
|
||||
>nameB = "helloNoName"
|
||||
>:=> (line 20, col 3) to (line 20, col 24)
|
||||
--------------------------------
|
||||
21 >[, multiSkillB = []] = multiRobotB;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (740 to 775) SpanInfo: {"start":743,"length":16}
|
||||
>multiSkillB = []
|
||||
>:=> (line 21, col 3) to (line 21, col 19)
|
||||
--------------------------------
|
||||
22 >[, multiSkillB = []] = getMultiRobotB();
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (776 to 816) SpanInfo: {"start":779,"length":16}
|
||||
>multiSkillB = []
|
||||
>:=> (line 22, col 3) to (line 22, col 19)
|
||||
--------------------------------
|
||||
23 >[, multiSkillB = []] = ["roomba", ["vaccum", "mopping"]];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (817 to 874) SpanInfo: {"start":820,"length":16}
|
||||
>multiSkillB = []
|
||||
>:=> (line 23, col 3) to (line 23, col 19)
|
||||
--------------------------------
|
||||
24 >
|
||||
|
||||
~ => Pos: (875 to 875) SpanInfo: undefined
|
||||
--------------------------------
|
||||
25 >[numberB = -1] = robotB;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (876 to 900) SpanInfo: {"start":877,"length":12}
|
||||
>numberB = -1
|
||||
>:=> (line 25, col 1) to (line 25, col 13)
|
||||
--------------------------------
|
||||
26 >[numberB = -1] = getRobotB();
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (901 to 930) SpanInfo: {"start":902,"length":12}
|
||||
>numberB = -1
|
||||
>:=> (line 26, col 1) to (line 26, col 13)
|
||||
--------------------------------
|
||||
27 >[numberB = -1] = [2, "trimmer", "trimming"];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (931 to 975) SpanInfo: {"start":932,"length":12}
|
||||
>numberB = -1
|
||||
>:=> (line 27, col 1) to (line 27, col 13)
|
||||
--------------------------------
|
||||
28 >[nameMB = "helloNoName"] = multiRobotB;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (976 to 1015) SpanInfo: {"start":977,"length":22}
|
||||
>nameMB = "helloNoName"
|
||||
>:=> (line 28, col 1) to (line 28, col 23)
|
||||
--------------------------------
|
||||
29 >[nameMB = "helloNoName"] = getMultiRobotB();
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1016 to 1060) SpanInfo: {"start":1017,"length":22}
|
||||
>nameMB = "helloNoName"
|
||||
>:=> (line 29, col 1) to (line 29, col 23)
|
||||
--------------------------------
|
||||
30 >[nameMB = "helloNoName"] = ["trimmer", ["trimming", "edging"]];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1061 to 1124) SpanInfo: {"start":1062,"length":22}
|
||||
>nameMB = "helloNoName"
|
||||
>:=> (line 30, col 1) to (line 30, col 23)
|
||||
--------------------------------
|
||||
31 >
|
||||
|
||||
~ => Pos: (1125 to 1125) SpanInfo: undefined
|
||||
--------------------------------
|
||||
32 >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = robotB;
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (1126 to 1139) SpanInfo: {"start":1127,"length":12}
|
||||
>numberB = -1
|
||||
>:=> (line 32, col 1) to (line 32, col 13)
|
||||
32 >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = robotB;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1140 to 1162) SpanInfo: {"start":1141,"length":21}
|
||||
>nameB = "helloNoName"
|
||||
>:=> (line 32, col 15) to (line 32, col 36)
|
||||
32 >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = robotB;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1163 to 1193) SpanInfo: {"start":1164,"length":18}
|
||||
>skillB = "noSkill"
|
||||
>:=> (line 32, col 38) to (line 32, col 56)
|
||||
--------------------------------
|
||||
33 >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = getRobotB();
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (1194 to 1207) SpanInfo: {"start":1195,"length":12}
|
||||
>numberB = -1
|
||||
>:=> (line 33, col 1) to (line 33, col 13)
|
||||
33 >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = getRobotB();
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1208 to 1230) SpanInfo: {"start":1209,"length":21}
|
||||
>nameB = "helloNoName"
|
||||
>:=> (line 33, col 15) to (line 33, col 36)
|
||||
33 >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = getRobotB();
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1231 to 1266) SpanInfo: {"start":1232,"length":18}
|
||||
>skillB = "noSkill"
|
||||
>:=> (line 33, col 38) to (line 33, col 56)
|
||||
--------------------------------
|
||||
34 >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = [2, "trimmer", "trimming"];
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (1267 to 1280) SpanInfo: {"start":1268,"length":12}
|
||||
>numberB = -1
|
||||
>:=> (line 34, col 1) to (line 34, col 13)
|
||||
34 >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = [2, "trimmer", "trimming"];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1281 to 1303) SpanInfo: {"start":1282,"length":21}
|
||||
>nameB = "helloNoName"
|
||||
>:=> (line 34, col 15) to (line 34, col 36)
|
||||
34 >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = [2, "trimmer", "trimming"];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1304 to 1354) SpanInfo: {"start":1305,"length":18}
|
||||
>skillB = "noSkill"
|
||||
>:=> (line 34, col 38) to (line 34, col 56)
|
||||
--------------------------------
|
||||
35 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1355 to 1378) SpanInfo: {"start":1356,"length":22}
|
||||
>nameMB = "helloNoName"
|
||||
>:=> (line 35, col 1) to (line 35, col 23)
|
||||
35 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1379 to 1406) SpanInfo: {"start":1381,"length":25}
|
||||
>primarySkillB = "noSkill"
|
||||
>:=> (line 35, col 26) to (line 35, col 51)
|
||||
35 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1407 to 1440) SpanInfo: {"start":1408,"length":27}
|
||||
>secondarySkillB = "noSkill"
|
||||
>:=> (line 35, col 53) to (line 35, col 80)
|
||||
35 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB;
|
||||
|
||||
~~~~~~~~~~~~~~~~~=> Pos: (1441 to 1457) SpanInfo: {"start":1380,"length":61}
|
||||
>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []
|
||||
>:=> (line 35, col 25) to (line 35, col 86)
|
||||
--------------------------------
|
||||
36 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB();
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1458 to 1481) SpanInfo: {"start":1459,"length":22}
|
||||
>nameMB = "helloNoName"
|
||||
>:=> (line 36, col 1) to (line 36, col 23)
|
||||
36 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB();
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1482 to 1509) SpanInfo: {"start":1484,"length":25}
|
||||
>primarySkillB = "noSkill"
|
||||
>:=> (line 36, col 26) to (line 36, col 51)
|
||||
36 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB();
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1510 to 1543) SpanInfo: {"start":1511,"length":27}
|
||||
>secondarySkillB = "noSkill"
|
||||
>:=> (line 36, col 53) to (line 36, col 80)
|
||||
36 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB();
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1544 to 1565) SpanInfo: {"start":1483,"length":61}
|
||||
>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []
|
||||
>:=> (line 36, col 25) to (line 36, col 86)
|
||||
--------------------------------
|
||||
37 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] =
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1566 to 1589) SpanInfo: {"start":1567,"length":22}
|
||||
>nameMB = "helloNoName"
|
||||
>:=> (line 37, col 1) to (line 37, col 23)
|
||||
37 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] =
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1590 to 1617) SpanInfo: {"start":1592,"length":25}
|
||||
>primarySkillB = "noSkill"
|
||||
>:=> (line 37, col 26) to (line 37, col 51)
|
||||
37 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] =
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1618 to 1651) SpanInfo: {"start":1619,"length":27}
|
||||
>secondarySkillB = "noSkill"
|
||||
>:=> (line 37, col 53) to (line 37, col 80)
|
||||
37 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] =
|
||||
|
||||
~~~~=> Pos: (1652 to 1655) SpanInfo: {"start":1591,"length":61}
|
||||
>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []
|
||||
>:=> (line 37, col 25) to (line 37, col 86)
|
||||
--------------------------------
|
||||
38 > ["trimmer", ["trimming", "edging"]];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1656 to 1696) SpanInfo: {"start":1591,"length":61}
|
||||
>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []
|
||||
>:=> (line 37, col 25) to (line 37, col 86)
|
||||
--------------------------------
|
||||
39 >
|
||||
|
||||
~ => Pos: (1697 to 1697) SpanInfo: undefined
|
||||
--------------------------------
|
||||
40 >[numberB = -1, ...robotAInfo] = robotB;
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (1698 to 1711) SpanInfo: {"start":1699,"length":12}
|
||||
>numberB = -1
|
||||
>:=> (line 40, col 1) to (line 40, col 13)
|
||||
40 >[numberB = -1, ...robotAInfo] = robotB;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1712 to 1737) SpanInfo: {"start":1713,"length":13}
|
||||
>...robotAInfo
|
||||
>:=> (line 40, col 15) to (line 40, col 28)
|
||||
--------------------------------
|
||||
41 >[numberB = -1, ...robotAInfo] = getRobotB();
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (1738 to 1751) SpanInfo: {"start":1739,"length":12}
|
||||
>numberB = -1
|
||||
>:=> (line 41, col 1) to (line 41, col 13)
|
||||
41 >[numberB = -1, ...robotAInfo] = getRobotB();
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1752 to 1782) SpanInfo: {"start":1753,"length":13}
|
||||
>...robotAInfo
|
||||
>:=> (line 41, col 15) to (line 41, col 28)
|
||||
--------------------------------
|
||||
42 >[numberB = -1, ...robotAInfo] = <Robot>[2, "trimmer", "trimming"];
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (1783 to 1796) SpanInfo: {"start":1784,"length":12}
|
||||
>numberB = -1
|
||||
>:=> (line 42, col 1) to (line 42, col 13)
|
||||
42 >[numberB = -1, ...robotAInfo] = <Robot>[2, "trimmer", "trimming"];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1797 to 1849) SpanInfo: {"start":1798,"length":13}
|
||||
>...robotAInfo
|
||||
>:=> (line 42, col 15) to (line 42, col 28)
|
||||
--------------------------------
|
||||
43 >
|
||||
|
||||
~ => Pos: (1850 to 1850) SpanInfo: undefined
|
||||
--------------------------------
|
||||
44 >function getRobotB() {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1851 to 1873) SpanInfo: {"start":1878,"length":13}
|
||||
>return robotB
|
||||
>:=> (line 45, col 4) to (line 45, col 17)
|
||||
--------------------------------
|
||||
45 > return robotB;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (1874 to 1892) SpanInfo: {"start":1878,"length":13}
|
||||
>return robotB
|
||||
>:=> (line 45, col 4) to (line 45, col 17)
|
||||
--------------------------------
|
||||
46 >}
|
||||
|
||||
~~ => Pos: (1893 to 1894) SpanInfo: {"start":1893,"length":1}
|
||||
>}
|
||||
>:=> (line 46, col 0) to (line 46, col 1)
|
||||
--------------------------------
|
||||
47 >
|
||||
|
||||
~ => Pos: (1895 to 1895) SpanInfo: undefined
|
||||
--------------------------------
|
||||
48 >function getMultiRobotB() {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1896 to 1923) SpanInfo: {"start":1928,"length":18}
|
||||
>return multiRobotB
|
||||
>:=> (line 49, col 4) to (line 49, col 22)
|
||||
--------------------------------
|
||||
49 > return multiRobotB;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1924 to 1947) SpanInfo: {"start":1928,"length":18}
|
||||
>return multiRobotB
|
||||
>:=> (line 49, col 4) to (line 49, col 22)
|
||||
--------------------------------
|
||||
50 >}
|
||||
~ => Pos: (1948 to 1948) SpanInfo: {"start":1948,"length":1}
|
||||
>}
|
||||
>:=> (line 50, col 0) to (line 50, col 1)
|
||||
File diff suppressed because it is too large
Load Diff
+1042
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,633 @@
|
||||
|
||||
1 >declare var console: {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined
|
||||
--------------------------------
|
||||
2 > log(msg: any): void;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined
|
||||
--------------------------------
|
||||
3 >}
|
||||
|
||||
~~ => Pos: (48 to 49) SpanInfo: undefined
|
||||
--------------------------------
|
||||
4 >interface Robot {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (50 to 67) SpanInfo: undefined
|
||||
--------------------------------
|
||||
5 > name: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (68 to 85) SpanInfo: undefined
|
||||
--------------------------------
|
||||
6 > skill: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (86 to 104) SpanInfo: undefined
|
||||
--------------------------------
|
||||
7 >}
|
||||
|
||||
~~ => Pos: (105 to 106) SpanInfo: undefined
|
||||
--------------------------------
|
||||
8 >interface MultiRobot {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (107 to 129) SpanInfo: undefined
|
||||
--------------------------------
|
||||
9 > name: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (130 to 147) SpanInfo: undefined
|
||||
--------------------------------
|
||||
10 > skills: {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (148 to 161) SpanInfo: undefined
|
||||
--------------------------------
|
||||
11 > primary: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (162 to 186) SpanInfo: undefined
|
||||
--------------------------------
|
||||
12 > secondary: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (187 to 213) SpanInfo: undefined
|
||||
--------------------------------
|
||||
13 > };
|
||||
|
||||
~~~~~~~ => Pos: (214 to 220) SpanInfo: undefined
|
||||
--------------------------------
|
||||
14 >}
|
||||
|
||||
~~ => Pos: (221 to 222) SpanInfo: undefined
|
||||
--------------------------------
|
||||
15 >let robot: Robot = { name: "mower", skill: "mowing" };
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (223 to 277) SpanInfo: {"start":223,"length":53}
|
||||
>let robot: Robot = { name: "mower", skill: "mowing" }
|
||||
>:=> (line 15, col 0) to (line 15, col 53)
|
||||
--------------------------------
|
||||
16 >let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } };
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (278 to 375) SpanInfo: {"start":278,"length":96}
|
||||
>let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }
|
||||
>:=> (line 16, col 0) to (line 16, col 96)
|
||||
--------------------------------
|
||||
17 >function getRobot() {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~ => Pos: (376 to 397) SpanInfo: {"start":402,"length":12}
|
||||
>return robot
|
||||
>:=> (line 18, col 4) to (line 18, col 16)
|
||||
--------------------------------
|
||||
18 > return robot;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (398 to 415) SpanInfo: {"start":402,"length":12}
|
||||
>return robot
|
||||
>:=> (line 18, col 4) to (line 18, col 16)
|
||||
--------------------------------
|
||||
19 >}
|
||||
|
||||
~~ => Pos: (416 to 417) SpanInfo: {"start":416,"length":1}
|
||||
>}
|
||||
>:=> (line 19, col 0) to (line 19, col 1)
|
||||
--------------------------------
|
||||
20 >function getMultiRobot() {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (418 to 444) SpanInfo: {"start":449,"length":17}
|
||||
>return multiRobot
|
||||
>:=> (line 21, col 4) to (line 21, col 21)
|
||||
--------------------------------
|
||||
21 > return multiRobot;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (445 to 467) SpanInfo: {"start":449,"length":17}
|
||||
>return multiRobot
|
||||
>:=> (line 21, col 4) to (line 21, col 21)
|
||||
--------------------------------
|
||||
22 >}
|
||||
|
||||
~~ => Pos: (468 to 469) SpanInfo: {"start":468,"length":1}
|
||||
>}
|
||||
>:=> (line 22, col 0) to (line 22, col 1)
|
||||
--------------------------------
|
||||
23 >for (let {name: nameA } = robot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (470 to 501) SpanInfo: {"start":480,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 23, col 10) to (line 23, col 21)
|
||||
23 >for (let {name: nameA } = robot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~ => Pos: (502 to 508) SpanInfo: {"start":503,"length":5}
|
||||
>i = 0
|
||||
>:=> (line 23, col 33) to (line 23, col 38)
|
||||
23 >for (let {name: nameA } = robot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~=> Pos: (509 to 515) SpanInfo: {"start":510,"length":5}
|
||||
>i < 1
|
||||
>:=> (line 23, col 40) to (line 23, col 45)
|
||||
23 >for (let {name: nameA } = robot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~=> Pos: (516 to 523) SpanInfo: {"start":517,"length":3}
|
||||
>i++
|
||||
>:=> (line 23, col 47) to (line 23, col 50)
|
||||
--------------------------------
|
||||
24 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (524 to 547) SpanInfo: {"start":528,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 24, col 4) to (line 24, col 22)
|
||||
--------------------------------
|
||||
25 >}
|
||||
|
||||
~~ => Pos: (548 to 549) SpanInfo: {"start":528,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 24, col 4) to (line 24, col 22)
|
||||
--------------------------------
|
||||
26 >for (let {name: nameA } = getRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (550 to 586) SpanInfo: {"start":560,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 26, col 10) to (line 26, col 21)
|
||||
26 >for (let {name: nameA } = getRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~ => Pos: (587 to 593) SpanInfo: {"start":588,"length":5}
|
||||
>i = 0
|
||||
>:=> (line 26, col 38) to (line 26, col 43)
|
||||
26 >for (let {name: nameA } = getRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~=> Pos: (594 to 600) SpanInfo: {"start":595,"length":5}
|
||||
>i < 1
|
||||
>:=> (line 26, col 45) to (line 26, col 50)
|
||||
26 >for (let {name: nameA } = getRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~=> Pos: (601 to 608) SpanInfo: {"start":602,"length":3}
|
||||
>i++
|
||||
>:=> (line 26, col 52) to (line 26, col 55)
|
||||
--------------------------------
|
||||
27 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (609 to 632) SpanInfo: {"start":613,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 27, col 4) to (line 27, col 22)
|
||||
--------------------------------
|
||||
28 >}
|
||||
|
||||
~~ => Pos: (633 to 634) SpanInfo: {"start":613,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 27, col 4) to (line 27, col 22)
|
||||
--------------------------------
|
||||
29 >for (let {name: nameA } = <Robot>{ name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (635 to 706) SpanInfo: {"start":645,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 29, col 10) to (line 29, col 21)
|
||||
29 >for (let {name: nameA } = <Robot>{ name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~=> Pos: (707 to 713) SpanInfo: {"start":708,"length":5}
|
||||
>i = 0
|
||||
>:=> (line 29, col 73) to (line 29, col 78)
|
||||
29 >for (let {name: nameA } = <Robot>{ name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~=> Pos: (714 to 720) SpanInfo: {"start":715,"length":5}
|
||||
>i < 1
|
||||
>:=> (line 29, col 80) to (line 29, col 85)
|
||||
29 >for (let {name: nameA } = <Robot>{ name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~=> Pos: (721 to 728) SpanInfo: {"start":722,"length":3}
|
||||
>i++
|
||||
>:=> (line 29, col 87) to (line 29, col 90)
|
||||
--------------------------------
|
||||
30 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (729 to 752) SpanInfo: {"start":733,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 30, col 4) to (line 30, col 22)
|
||||
--------------------------------
|
||||
31 >}
|
||||
|
||||
~~ => Pos: (753 to 754) SpanInfo: {"start":733,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 30, col 4) to (line 30, col 22)
|
||||
--------------------------------
|
||||
32 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (755 to 772) SpanInfo: {"start":766,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 32, col 11) to (line 32, col 63)
|
||||
32 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~ => Pos: (773 to 793) SpanInfo: {"start":776,"length":17}
|
||||
>primary: primaryA
|
||||
>:=> (line 32, col 21) to (line 32, col 38)
|
||||
32 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (794 to 817) SpanInfo: {"start":795,"length":21}
|
||||
>secondary: secondaryA
|
||||
>:=> (line 32, col 40) to (line 32, col 61)
|
||||
32 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~=> Pos: (818 to 833) SpanInfo: {"start":766,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 32, col 11) to (line 32, col 63)
|
||||
32 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~=> Pos: (834 to 840) SpanInfo: {"start":835,"length":5}
|
||||
>i = 0
|
||||
>:=> (line 32, col 80) to (line 32, col 85)
|
||||
32 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~=> Pos: (841 to 847) SpanInfo: {"start":842,"length":5}
|
||||
>i < 1
|
||||
>:=> (line 32, col 87) to (line 32, col 92)
|
||||
32 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~=> Pos: (848 to 855) SpanInfo: {"start":849,"length":3}
|
||||
>i++
|
||||
>:=> (line 32, col 94) to (line 32, col 97)
|
||||
--------------------------------
|
||||
33 > console.log(primaryA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (856 to 882) SpanInfo: {"start":860,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 33, col 4) to (line 33, col 25)
|
||||
--------------------------------
|
||||
34 >}
|
||||
|
||||
~~ => Pos: (883 to 884) SpanInfo: {"start":860,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 33, col 4) to (line 33, col 25)
|
||||
--------------------------------
|
||||
35 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (885 to 902) SpanInfo: {"start":896,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 35, col 11) to (line 35, col 63)
|
||||
35 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~ => Pos: (903 to 923) SpanInfo: {"start":906,"length":17}
|
||||
>primary: primaryA
|
||||
>:=> (line 35, col 21) to (line 35, col 38)
|
||||
35 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (924 to 947) SpanInfo: {"start":925,"length":21}
|
||||
>secondary: secondaryA
|
||||
>:=> (line 35, col 40) to (line 35, col 61)
|
||||
35 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~=> Pos: (948 to 968) SpanInfo: {"start":896,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 35, col 11) to (line 35, col 63)
|
||||
35 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~=> Pos: (969 to 975) SpanInfo: {"start":970,"length":5}
|
||||
>i = 0
|
||||
>:=> (line 35, col 85) to (line 35, col 90)
|
||||
35 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~=> Pos: (976 to 982) SpanInfo: {"start":977,"length":5}
|
||||
>i < 1
|
||||
>:=> (line 35, col 92) to (line 35, col 97)
|
||||
35 >for (let { skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~=> Pos: (983 to 990) SpanInfo: {"start":984,"length":3}
|
||||
>i++
|
||||
>:=> (line 35, col 99) to (line 35, col 102)
|
||||
--------------------------------
|
||||
36 > console.log(primaryA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (991 to 1017) SpanInfo: {"start":995,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 36, col 4) to (line 36, col 25)
|
||||
--------------------------------
|
||||
37 >}
|
||||
|
||||
~~ => Pos: (1018 to 1019) SpanInfo: {"start":995,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 36, col 4) to (line 36, col 25)
|
||||
--------------------------------
|
||||
38 >for (let { skills: { primary: primaryA, secondary: secondaryA } } =
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (1020 to 1037) SpanInfo: {"start":1031,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 38, col 11) to (line 38, col 63)
|
||||
38 >for (let { skills: { primary: primaryA, secondary: secondaryA } } =
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~ => Pos: (1038 to 1058) SpanInfo: {"start":1041,"length":17}
|
||||
>primary: primaryA
|
||||
>:=> (line 38, col 21) to (line 38, col 38)
|
||||
38 >for (let { skills: { primary: primaryA, secondary: secondaryA } } =
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1059 to 1082) SpanInfo: {"start":1060,"length":21}
|
||||
>secondary: secondaryA
|
||||
>:=> (line 38, col 40) to (line 38, col 61)
|
||||
38 >for (let { skills: { primary: primaryA, secondary: secondaryA } } =
|
||||
|
||||
~~~~~=> Pos: (1083 to 1087) SpanInfo: {"start":1031,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 38, col 11) to (line 38, col 63)
|
||||
--------------------------------
|
||||
39 > <MultiRobot>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } },
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1088 to 1178) SpanInfo: {"start":1031,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 38, col 11) to (line 38, col 63)
|
||||
--------------------------------
|
||||
40 > i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~ => Pos: (1179 to 1188) SpanInfo: {"start":1183,"length":5}
|
||||
>i = 0
|
||||
>:=> (line 40, col 4) to (line 40, col 9)
|
||||
40 > i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~ => Pos: (1189 to 1195) SpanInfo: {"start":1190,"length":5}
|
||||
>i < 1
|
||||
>:=> (line 40, col 11) to (line 40, col 16)
|
||||
40 > i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~ => Pos: (1196 to 1203) SpanInfo: {"start":1197,"length":3}
|
||||
>i++
|
||||
>:=> (line 40, col 18) to (line 40, col 21)
|
||||
--------------------------------
|
||||
41 > console.log(primaryA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1204 to 1230) SpanInfo: {"start":1208,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 41, col 4) to (line 41, col 25)
|
||||
--------------------------------
|
||||
42 >}
|
||||
|
||||
~~ => Pos: (1231 to 1232) SpanInfo: {"start":1208,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 41, col 4) to (line 41, col 25)
|
||||
--------------------------------
|
||||
43 >for (let {name: nameA, skill: skillA } = robot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1233 to 1254) SpanInfo: {"start":1243,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 43, col 10) to (line 43, col 21)
|
||||
43 >for (let {name: nameA, skill: skillA } = robot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1255 to 1279) SpanInfo: {"start":1256,"length":13}
|
||||
>skill: skillA
|
||||
>:=> (line 43, col 23) to (line 43, col 36)
|
||||
43 >for (let {name: nameA, skill: skillA } = robot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~=> Pos: (1280 to 1286) SpanInfo: {"start":1281,"length":5}
|
||||
>i = 0
|
||||
>:=> (line 43, col 48) to (line 43, col 53)
|
||||
43 >for (let {name: nameA, skill: skillA } = robot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~=> Pos: (1287 to 1293) SpanInfo: {"start":1288,"length":5}
|
||||
>i < 1
|
||||
>:=> (line 43, col 55) to (line 43, col 60)
|
||||
43 >for (let {name: nameA, skill: skillA } = robot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~=> Pos: (1294 to 1301) SpanInfo: {"start":1295,"length":3}
|
||||
>i++
|
||||
>:=> (line 43, col 62) to (line 43, col 65)
|
||||
--------------------------------
|
||||
44 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1302 to 1325) SpanInfo: {"start":1306,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 44, col 4) to (line 44, col 22)
|
||||
--------------------------------
|
||||
45 >}
|
||||
|
||||
~~ => Pos: (1326 to 1327) SpanInfo: {"start":1306,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 44, col 4) to (line 44, col 22)
|
||||
--------------------------------
|
||||
46 >for (let {name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1328 to 1349) SpanInfo: {"start":1338,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 46, col 10) to (line 46, col 21)
|
||||
46 >for (let {name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1350 to 1379) SpanInfo: {"start":1351,"length":13}
|
||||
>skill: skillA
|
||||
>:=> (line 46, col 23) to (line 46, col 36)
|
||||
46 >for (let {name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~=> Pos: (1380 to 1386) SpanInfo: {"start":1381,"length":5}
|
||||
>i = 0
|
||||
>:=> (line 46, col 53) to (line 46, col 58)
|
||||
46 >for (let {name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~=> Pos: (1387 to 1393) SpanInfo: {"start":1388,"length":5}
|
||||
>i < 1
|
||||
>:=> (line 46, col 60) to (line 46, col 65)
|
||||
46 >for (let {name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~=> Pos: (1394 to 1401) SpanInfo: {"start":1395,"length":3}
|
||||
>i++
|
||||
>:=> (line 46, col 67) to (line 46, col 70)
|
||||
--------------------------------
|
||||
47 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1402 to 1425) SpanInfo: {"start":1406,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 47, col 4) to (line 47, col 22)
|
||||
--------------------------------
|
||||
48 >}
|
||||
|
||||
~~ => Pos: (1426 to 1427) SpanInfo: {"start":1406,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 47, col 4) to (line 47, col 22)
|
||||
--------------------------------
|
||||
49 >for (let {name: nameA, skill: skillA } = <Robot>{ name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1428 to 1449) SpanInfo: {"start":1438,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 49, col 10) to (line 49, col 21)
|
||||
49 >for (let {name: nameA, skill: skillA } = <Robot>{ name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1450 to 1514) SpanInfo: {"start":1451,"length":13}
|
||||
>skill: skillA
|
||||
>:=> (line 49, col 23) to (line 49, col 36)
|
||||
49 >for (let {name: nameA, skill: skillA } = <Robot>{ name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~=> Pos: (1515 to 1521) SpanInfo: {"start":1516,"length":5}
|
||||
>i = 0
|
||||
>:=> (line 49, col 88) to (line 49, col 93)
|
||||
49 >for (let {name: nameA, skill: skillA } = <Robot>{ name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~=> Pos: (1522 to 1528) SpanInfo: {"start":1523,"length":5}
|
||||
>i < 1
|
||||
>:=> (line 49, col 95) to (line 49, col 100)
|
||||
49 >for (let {name: nameA, skill: skillA } = <Robot>{ name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~=> Pos: (1529 to 1536) SpanInfo: {"start":1530,"length":3}
|
||||
>i++
|
||||
>:=> (line 49, col 102) to (line 49, col 105)
|
||||
--------------------------------
|
||||
50 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1537 to 1560) SpanInfo: {"start":1541,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 50, col 4) to (line 50, col 22)
|
||||
--------------------------------
|
||||
51 >}
|
||||
|
||||
~~ => Pos: (1561 to 1562) SpanInfo: {"start":1541,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 50, col 4) to (line 50, col 22)
|
||||
--------------------------------
|
||||
52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1563 to 1584) SpanInfo: {"start":1573,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 52, col 10) to (line 52, col 21)
|
||||
52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~ => Pos: (1585 to 1592) SpanInfo: {"start":1586,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 52, col 23) to (line 52, col 75)
|
||||
52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~=> Pos: (1593 to 1613) SpanInfo: {"start":1596,"length":17}
|
||||
>primary: primaryA
|
||||
>:=> (line 52, col 33) to (line 52, col 50)
|
||||
52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1614 to 1637) SpanInfo: {"start":1615,"length":21}
|
||||
>secondary: secondaryA
|
||||
>:=> (line 52, col 52) to (line 52, col 73)
|
||||
52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~=> Pos: (1638 to 1653) SpanInfo: {"start":1586,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 52, col 23) to (line 52, col 75)
|
||||
52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~=> Pos: (1654 to 1660) SpanInfo: {"start":1655,"length":5}
|
||||
>i = 0
|
||||
>:=> (line 52, col 92) to (line 52, col 97)
|
||||
52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~=> Pos: (1661 to 1667) SpanInfo: {"start":1662,"length":5}
|
||||
>i < 1
|
||||
>:=> (line 52, col 99) to (line 52, col 104)
|
||||
52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~=> Pos: (1668 to 1675) SpanInfo: {"start":1669,"length":3}
|
||||
>i++
|
||||
>:=> (line 52, col 106) to (line 52, col 109)
|
||||
--------------------------------
|
||||
53 > console.log(primaryA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1676 to 1702) SpanInfo: {"start":1680,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 53, col 4) to (line 53, col 25)
|
||||
--------------------------------
|
||||
54 >}
|
||||
|
||||
~~ => Pos: (1703 to 1704) SpanInfo: {"start":1680,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 53, col 4) to (line 53, col 25)
|
||||
--------------------------------
|
||||
55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1705 to 1726) SpanInfo: {"start":1715,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 55, col 10) to (line 55, col 21)
|
||||
55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~ => Pos: (1727 to 1734) SpanInfo: {"start":1728,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 55, col 23) to (line 55, col 75)
|
||||
55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~=> Pos: (1735 to 1755) SpanInfo: {"start":1738,"length":17}
|
||||
>primary: primaryA
|
||||
>:=> (line 55, col 33) to (line 55, col 50)
|
||||
55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1756 to 1779) SpanInfo: {"start":1757,"length":21}
|
||||
>secondary: secondaryA
|
||||
>:=> (line 55, col 52) to (line 55, col 73)
|
||||
55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~=> Pos: (1780 to 1800) SpanInfo: {"start":1728,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 55, col 23) to (line 55, col 75)
|
||||
55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~=> Pos: (1801 to 1807) SpanInfo: {"start":1802,"length":5}
|
||||
>i = 0
|
||||
>:=> (line 55, col 97) to (line 55, col 102)
|
||||
55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~=> Pos: (1808 to 1814) SpanInfo: {"start":1809,"length":5}
|
||||
>i < 1
|
||||
>:=> (line 55, col 104) to (line 55, col 109)
|
||||
55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~=> Pos: (1815 to 1822) SpanInfo: {"start":1816,"length":3}
|
||||
>i++
|
||||
>:=> (line 55, col 111) to (line 55, col 114)
|
||||
--------------------------------
|
||||
56 > console.log(primaryA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1823 to 1849) SpanInfo: {"start":1827,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 56, col 4) to (line 56, col 25)
|
||||
--------------------------------
|
||||
57 >}
|
||||
|
||||
~~ => Pos: (1850 to 1851) SpanInfo: {"start":1827,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 56, col 4) to (line 56, col 25)
|
||||
--------------------------------
|
||||
58 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } =
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1852 to 1873) SpanInfo: {"start":1862,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 58, col 10) to (line 58, col 21)
|
||||
58 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } =
|
||||
|
||||
~~~~~~~~ => Pos: (1874 to 1881) SpanInfo: {"start":1875,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 58, col 23) to (line 58, col 75)
|
||||
58 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } =
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~=> Pos: (1882 to 1902) SpanInfo: {"start":1885,"length":17}
|
||||
>primary: primaryA
|
||||
>:=> (line 58, col 33) to (line 58, col 50)
|
||||
58 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } =
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1903 to 1926) SpanInfo: {"start":1904,"length":21}
|
||||
>secondary: secondaryA
|
||||
>:=> (line 58, col 52) to (line 58, col 73)
|
||||
58 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } =
|
||||
|
||||
~~~~~=> Pos: (1927 to 1931) SpanInfo: {"start":1875,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 58, col 23) to (line 58, col 75)
|
||||
--------------------------------
|
||||
59 > <MultiRobot>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } },
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1932 to 2022) SpanInfo: {"start":1875,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 58, col 23) to (line 58, col 75)
|
||||
--------------------------------
|
||||
60 > i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~ => Pos: (2023 to 2032) SpanInfo: {"start":2027,"length":5}
|
||||
>i = 0
|
||||
>:=> (line 60, col 4) to (line 60, col 9)
|
||||
60 > i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~ => Pos: (2033 to 2039) SpanInfo: {"start":2034,"length":5}
|
||||
>i < 1
|
||||
>:=> (line 60, col 11) to (line 60, col 16)
|
||||
60 > i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~ => Pos: (2040 to 2047) SpanInfo: {"start":2041,"length":3}
|
||||
>i++
|
||||
>:=> (line 60, col 18) to (line 60, col 21)
|
||||
--------------------------------
|
||||
61 > console.log(primaryA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2048 to 2074) SpanInfo: {"start":2052,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 61, col 4) to (line 61, col 25)
|
||||
--------------------------------
|
||||
62 >}
|
||||
~ => Pos: (2075 to 2075) SpanInfo: {"start":2052,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 61, col 4) to (line 61, col 25)
|
||||
+837
@@ -0,0 +1,837 @@
|
||||
|
||||
1 >declare var console: {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined
|
||||
--------------------------------
|
||||
2 > log(msg: any): void;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined
|
||||
--------------------------------
|
||||
3 >}
|
||||
|
||||
~~ => Pos: (48 to 49) SpanInfo: undefined
|
||||
--------------------------------
|
||||
4 >interface Robot {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (50 to 67) SpanInfo: undefined
|
||||
--------------------------------
|
||||
5 > name: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (68 to 85) SpanInfo: undefined
|
||||
--------------------------------
|
||||
6 > skill: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (86 to 104) SpanInfo: undefined
|
||||
--------------------------------
|
||||
7 >}
|
||||
|
||||
~~ => Pos: (105 to 106) SpanInfo: undefined
|
||||
--------------------------------
|
||||
8 >interface MultiRobot {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (107 to 129) SpanInfo: undefined
|
||||
--------------------------------
|
||||
9 > name: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (130 to 147) SpanInfo: undefined
|
||||
--------------------------------
|
||||
10 > skills: {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (148 to 161) SpanInfo: undefined
|
||||
--------------------------------
|
||||
11 > primary?: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (162 to 187) SpanInfo: undefined
|
||||
--------------------------------
|
||||
12 > secondary?: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (188 to 215) SpanInfo: undefined
|
||||
--------------------------------
|
||||
13 > };
|
||||
|
||||
~~~~~~~ => Pos: (216 to 222) SpanInfo: undefined
|
||||
--------------------------------
|
||||
14 >}
|
||||
|
||||
~~ => Pos: (223 to 224) SpanInfo: undefined
|
||||
--------------------------------
|
||||
15 >let robot: Robot = { name: "mower", skill: "mowing" };
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (225 to 279) SpanInfo: {"start":225,"length":53}
|
||||
>let robot: Robot = { name: "mower", skill: "mowing" }
|
||||
>:=> (line 15, col 0) to (line 15, col 53)
|
||||
--------------------------------
|
||||
16 >let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } };
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (280 to 377) SpanInfo: {"start":280,"length":96}
|
||||
>let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }
|
||||
>:=> (line 16, col 0) to (line 16, col 96)
|
||||
--------------------------------
|
||||
17 >function getRobot() {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~ => Pos: (378 to 399) SpanInfo: {"start":404,"length":12}
|
||||
>return robot
|
||||
>:=> (line 18, col 4) to (line 18, col 16)
|
||||
--------------------------------
|
||||
18 > return robot;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (400 to 417) SpanInfo: {"start":404,"length":12}
|
||||
>return robot
|
||||
>:=> (line 18, col 4) to (line 18, col 16)
|
||||
--------------------------------
|
||||
19 >}
|
||||
|
||||
~~ => Pos: (418 to 419) SpanInfo: {"start":418,"length":1}
|
||||
>}
|
||||
>:=> (line 19, col 0) to (line 19, col 1)
|
||||
--------------------------------
|
||||
20 >function getMultiRobot() {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (420 to 446) SpanInfo: {"start":451,"length":17}
|
||||
>return multiRobot
|
||||
>:=> (line 21, col 4) to (line 21, col 21)
|
||||
--------------------------------
|
||||
21 > return multiRobot;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (447 to 469) SpanInfo: {"start":451,"length":17}
|
||||
>return multiRobot
|
||||
>:=> (line 21, col 4) to (line 21, col 21)
|
||||
--------------------------------
|
||||
22 >}
|
||||
|
||||
~~ => Pos: (470 to 471) SpanInfo: {"start":470,"length":1}
|
||||
>}
|
||||
>:=> (line 22, col 0) to (line 22, col 1)
|
||||
--------------------------------
|
||||
23 >for (let {name: nameA= "noName" } = robot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (472 to 513) SpanInfo: {"start":482,"length":21}
|
||||
>name: nameA= "noName"
|
||||
>:=> (line 23, col 10) to (line 23, col 31)
|
||||
23 >for (let {name: nameA= "noName" } = robot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~=> Pos: (514 to 520) SpanInfo: {"start":515,"length":5}
|
||||
>i = 0
|
||||
>:=> (line 23, col 43) to (line 23, col 48)
|
||||
23 >for (let {name: nameA= "noName" } = robot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~=> Pos: (521 to 527) SpanInfo: {"start":522,"length":5}
|
||||
>i < 1
|
||||
>:=> (line 23, col 50) to (line 23, col 55)
|
||||
23 >for (let {name: nameA= "noName" } = robot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~=> Pos: (528 to 535) SpanInfo: {"start":529,"length":3}
|
||||
>i++
|
||||
>:=> (line 23, col 57) to (line 23, col 60)
|
||||
--------------------------------
|
||||
24 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (536 to 559) SpanInfo: {"start":540,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 24, col 4) to (line 24, col 22)
|
||||
--------------------------------
|
||||
25 >}
|
||||
|
||||
~~ => Pos: (560 to 561) SpanInfo: {"start":540,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 24, col 4) to (line 24, col 22)
|
||||
--------------------------------
|
||||
26 >for (let {name: nameA = "noName" } = getRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (562 to 609) SpanInfo: {"start":572,"length":22}
|
||||
>name: nameA = "noName"
|
||||
>:=> (line 26, col 10) to (line 26, col 32)
|
||||
26 >for (let {name: nameA = "noName" } = getRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~=> Pos: (610 to 616) SpanInfo: {"start":611,"length":5}
|
||||
>i = 0
|
||||
>:=> (line 26, col 49) to (line 26, col 54)
|
||||
26 >for (let {name: nameA = "noName" } = getRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~=> Pos: (617 to 623) SpanInfo: {"start":618,"length":5}
|
||||
>i < 1
|
||||
>:=> (line 26, col 56) to (line 26, col 61)
|
||||
26 >for (let {name: nameA = "noName" } = getRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~=> Pos: (624 to 631) SpanInfo: {"start":625,"length":3}
|
||||
>i++
|
||||
>:=> (line 26, col 63) to (line 26, col 66)
|
||||
--------------------------------
|
||||
27 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (632 to 655) SpanInfo: {"start":636,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 27, col 4) to (line 27, col 22)
|
||||
--------------------------------
|
||||
28 >}
|
||||
|
||||
~~ => Pos: (656 to 657) SpanInfo: {"start":636,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 27, col 4) to (line 27, col 22)
|
||||
--------------------------------
|
||||
29 >for (let {name: nameA = "noName" } = <Robot>{ name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (658 to 740) SpanInfo: {"start":668,"length":22}
|
||||
>name: nameA = "noName"
|
||||
>:=> (line 29, col 10) to (line 29, col 32)
|
||||
29 >for (let {name: nameA = "noName" } = <Robot>{ name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~=> Pos: (741 to 747) SpanInfo: {"start":742,"length":5}
|
||||
>i = 0
|
||||
>:=> (line 29, col 84) to (line 29, col 89)
|
||||
29 >for (let {name: nameA = "noName" } = <Robot>{ name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~=> Pos: (748 to 754) SpanInfo: {"start":749,"length":5}
|
||||
>i < 1
|
||||
>:=> (line 29, col 91) to (line 29, col 96)
|
||||
29 >for (let {name: nameA = "noName" } = <Robot>{ name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~=> Pos: (755 to 762) SpanInfo: {"start":756,"length":3}
|
||||
>i++
|
||||
>:=> (line 29, col 98) to (line 29, col 101)
|
||||
--------------------------------
|
||||
30 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (763 to 786) SpanInfo: {"start":767,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 30, col 4) to (line 30, col 22)
|
||||
--------------------------------
|
||||
31 >}
|
||||
|
||||
~~ => Pos: (787 to 788) SpanInfo: {"start":767,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 30, col 4) to (line 30, col 22)
|
||||
--------------------------------
|
||||
32 >for (let {
|
||||
|
||||
~~~~~~~~~~~ => Pos: (789 to 799) SpanInfo: {"start":804,"length":139}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "none", secondary: "none" }
|
||||
>:=> (line 33, col 4) to (line 36, col 46)
|
||||
--------------------------------
|
||||
33 > skills: {
|
||||
|
||||
~~~~~~~~~~~ => Pos: (800 to 810) SpanInfo: {"start":804,"length":139}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "none", secondary: "none" }
|
||||
>:=> (line 33, col 4) to (line 36, col 46)
|
||||
33 > skills: {
|
||||
|
||||
~~~ => Pos: (811 to 813) SpanInfo: {"start":822,"length":29}
|
||||
>primary: primaryA = "primary"
|
||||
>:=> (line 34, col 8) to (line 34, col 37)
|
||||
--------------------------------
|
||||
34 > primary: primaryA = "primary",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (814 to 852) SpanInfo: {"start":822,"length":29}
|
||||
>primary: primaryA = "primary"
|
||||
>:=> (line 34, col 8) to (line 34, col 37)
|
||||
--------------------------------
|
||||
35 > secondary: secondaryA = "secondary"
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (853 to 896) SpanInfo: {"start":861,"length":35}
|
||||
>secondary: secondaryA = "secondary"
|
||||
>:=> (line 35, col 8) to (line 35, col 43)
|
||||
--------------------------------
|
||||
36 > } = { primary: "none", secondary: "none" }
|
||||
|
||||
~~~~~ => Pos: (897 to 901) SpanInfo: {"start":861,"length":35}
|
||||
>secondary: secondaryA = "secondary"
|
||||
>:=> (line 35, col 8) to (line 35, col 43)
|
||||
36 > } = { primary: "none", secondary: "none" }
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (902 to 943) SpanInfo: {"start":804,"length":139}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "none", secondary: "none" }
|
||||
>:=> (line 33, col 4) to (line 36, col 46)
|
||||
--------------------------------
|
||||
37 >} = multiRobot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~ => Pos: (944 to 958) SpanInfo: {"start":804,"length":139}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "none", secondary: "none" }
|
||||
>:=> (line 33, col 4) to (line 36, col 46)
|
||||
37 >} = multiRobot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~ => Pos: (959 to 965) SpanInfo: {"start":960,"length":5}
|
||||
>i = 0
|
||||
>:=> (line 37, col 16) to (line 37, col 21)
|
||||
37 >} = multiRobot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~ => Pos: (966 to 972) SpanInfo: {"start":967,"length":5}
|
||||
>i < 1
|
||||
>:=> (line 37, col 23) to (line 37, col 28)
|
||||
37 >} = multiRobot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~ => Pos: (973 to 980) SpanInfo: {"start":974,"length":3}
|
||||
>i++
|
||||
>:=> (line 37, col 30) to (line 37, col 33)
|
||||
--------------------------------
|
||||
38 > console.log(primaryA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (981 to 1007) SpanInfo: {"start":985,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 38, col 4) to (line 38, col 25)
|
||||
--------------------------------
|
||||
39 >}
|
||||
|
||||
~~ => Pos: (1008 to 1009) SpanInfo: {"start":985,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 38, col 4) to (line 38, col 25)
|
||||
--------------------------------
|
||||
40 >for (let {
|
||||
|
||||
~~~~~~~~~~~ => Pos: (1010 to 1020) SpanInfo: {"start":1025,"length":139}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "none", secondary: "none" }
|
||||
>:=> (line 41, col 4) to (line 44, col 46)
|
||||
--------------------------------
|
||||
41 > skills: {
|
||||
|
||||
~~~~~~~~~~~ => Pos: (1021 to 1031) SpanInfo: {"start":1025,"length":139}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "none", secondary: "none" }
|
||||
>:=> (line 41, col 4) to (line 44, col 46)
|
||||
41 > skills: {
|
||||
|
||||
~~~ => Pos: (1032 to 1034) SpanInfo: {"start":1043,"length":29}
|
||||
>primary: primaryA = "primary"
|
||||
>:=> (line 42, col 8) to (line 42, col 37)
|
||||
--------------------------------
|
||||
42 > primary: primaryA = "primary",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1035 to 1073) SpanInfo: {"start":1043,"length":29}
|
||||
>primary: primaryA = "primary"
|
||||
>:=> (line 42, col 8) to (line 42, col 37)
|
||||
--------------------------------
|
||||
43 > secondary: secondaryA = "secondary"
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1074 to 1117) SpanInfo: {"start":1082,"length":35}
|
||||
>secondary: secondaryA = "secondary"
|
||||
>:=> (line 43, col 8) to (line 43, col 43)
|
||||
--------------------------------
|
||||
44 > } = { primary: "none", secondary: "none" }
|
||||
|
||||
~~~~~ => Pos: (1118 to 1122) SpanInfo: {"start":1082,"length":35}
|
||||
>secondary: secondaryA = "secondary"
|
||||
>:=> (line 43, col 8) to (line 43, col 43)
|
||||
44 > } = { primary: "none", secondary: "none" }
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1123 to 1164) SpanInfo: {"start":1025,"length":139}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "none", secondary: "none" }
|
||||
>:=> (line 41, col 4) to (line 44, col 46)
|
||||
--------------------------------
|
||||
45 >} = getMultiRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~ => Pos: (1165 to 1184) SpanInfo: {"start":1025,"length":139}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "none", secondary: "none" }
|
||||
>:=> (line 41, col 4) to (line 44, col 46)
|
||||
45 >} = getMultiRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~ => Pos: (1185 to 1191) SpanInfo: {"start":1186,"length":5}
|
||||
>i = 0
|
||||
>:=> (line 45, col 21) to (line 45, col 26)
|
||||
45 >} = getMultiRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~ => Pos: (1192 to 1198) SpanInfo: {"start":1193,"length":5}
|
||||
>i < 1
|
||||
>:=> (line 45, col 28) to (line 45, col 33)
|
||||
45 >} = getMultiRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~ => Pos: (1199 to 1206) SpanInfo: {"start":1200,"length":3}
|
||||
>i++
|
||||
>:=> (line 45, col 35) to (line 45, col 38)
|
||||
--------------------------------
|
||||
46 > console.log(primaryA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1207 to 1233) SpanInfo: {"start":1211,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 46, col 4) to (line 46, col 25)
|
||||
--------------------------------
|
||||
47 >}
|
||||
|
||||
~~ => Pos: (1234 to 1235) SpanInfo: {"start":1211,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 46, col 4) to (line 46, col 25)
|
||||
--------------------------------
|
||||
48 >for (let {
|
||||
|
||||
~~~~~~~~~~~ => Pos: (1236 to 1246) SpanInfo: {"start":1251,"length":139}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "none", secondary: "none" }
|
||||
>:=> (line 49, col 4) to (line 52, col 46)
|
||||
--------------------------------
|
||||
49 > skills: {
|
||||
|
||||
~~~~~~~~~~~ => Pos: (1247 to 1257) SpanInfo: {"start":1251,"length":139}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "none", secondary: "none" }
|
||||
>:=> (line 49, col 4) to (line 52, col 46)
|
||||
49 > skills: {
|
||||
|
||||
~~~ => Pos: (1258 to 1260) SpanInfo: {"start":1269,"length":29}
|
||||
>primary: primaryA = "primary"
|
||||
>:=> (line 50, col 8) to (line 50, col 37)
|
||||
--------------------------------
|
||||
50 > primary: primaryA = "primary",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1261 to 1299) SpanInfo: {"start":1269,"length":29}
|
||||
>primary: primaryA = "primary"
|
||||
>:=> (line 50, col 8) to (line 50, col 37)
|
||||
--------------------------------
|
||||
51 > secondary: secondaryA = "secondary"
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1300 to 1343) SpanInfo: {"start":1308,"length":35}
|
||||
>secondary: secondaryA = "secondary"
|
||||
>:=> (line 51, col 8) to (line 51, col 43)
|
||||
--------------------------------
|
||||
52 > } = { primary: "none", secondary: "none" }
|
||||
|
||||
~~~~~ => Pos: (1344 to 1348) SpanInfo: {"start":1308,"length":35}
|
||||
>secondary: secondaryA = "secondary"
|
||||
>:=> (line 51, col 8) to (line 51, col 43)
|
||||
52 > } = { primary: "none", secondary: "none" }
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1349 to 1390) SpanInfo: {"start":1251,"length":139}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "none", secondary: "none" }
|
||||
>:=> (line 49, col 4) to (line 52, col 46)
|
||||
--------------------------------
|
||||
53 >} = <MultiRobot>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } },
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1391 to 1481) SpanInfo: {"start":1251,"length":139}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "none", secondary: "none" }
|
||||
>:=> (line 49, col 4) to (line 52, col 46)
|
||||
--------------------------------
|
||||
54 > i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~ => Pos: (1482 to 1491) SpanInfo: {"start":1486,"length":5}
|
||||
>i = 0
|
||||
>:=> (line 54, col 4) to (line 54, col 9)
|
||||
54 > i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~ => Pos: (1492 to 1498) SpanInfo: {"start":1493,"length":5}
|
||||
>i < 1
|
||||
>:=> (line 54, col 11) to (line 54, col 16)
|
||||
54 > i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~ => Pos: (1499 to 1506) SpanInfo: {"start":1500,"length":3}
|
||||
>i++
|
||||
>:=> (line 54, col 18) to (line 54, col 21)
|
||||
--------------------------------
|
||||
55 > console.log(primaryA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1507 to 1533) SpanInfo: {"start":1511,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 55, col 4) to (line 55, col 25)
|
||||
--------------------------------
|
||||
56 >}
|
||||
|
||||
~~ => Pos: (1534 to 1535) SpanInfo: {"start":1511,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 55, col 4) to (line 55, col 25)
|
||||
--------------------------------
|
||||
57 >for (let {name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1536 to 1568) SpanInfo: {"start":1546,"length":22}
|
||||
>name: nameA = "noName"
|
||||
>:=> (line 57, col 10) to (line 57, col 32)
|
||||
57 >for (let {name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1569 to 1603) SpanInfo: {"start":1570,"length":23}
|
||||
>skill: skillA = "skill"
|
||||
>:=> (line 57, col 34) to (line 57, col 57)
|
||||
57 >for (let {name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~=> Pos: (1604 to 1610) SpanInfo: {"start":1605,"length":5}
|
||||
>i = 0
|
||||
>:=> (line 57, col 69) to (line 57, col 74)
|
||||
57 >for (let {name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~=> Pos: (1611 to 1617) SpanInfo: {"start":1612,"length":5}
|
||||
>i < 1
|
||||
>:=> (line 57, col 76) to (line 57, col 81)
|
||||
57 >for (let {name: nameA = "noName", skill: skillA = "skill" } = robot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~=> Pos: (1618 to 1625) SpanInfo: {"start":1619,"length":3}
|
||||
>i++
|
||||
>:=> (line 57, col 83) to (line 57, col 86)
|
||||
--------------------------------
|
||||
58 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1626 to 1649) SpanInfo: {"start":1630,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 58, col 4) to (line 58, col 22)
|
||||
--------------------------------
|
||||
59 >}
|
||||
|
||||
~~ => Pos: (1650 to 1651) SpanInfo: {"start":1630,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 58, col 4) to (line 58, col 22)
|
||||
--------------------------------
|
||||
60 >for (let {name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1652 to 1684) SpanInfo: {"start":1662,"length":22}
|
||||
>name: nameA = "noName"
|
||||
>:=> (line 60, col 10) to (line 60, col 32)
|
||||
60 >for (let {name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1685 to 1724) SpanInfo: {"start":1686,"length":23}
|
||||
>skill: skillA = "skill"
|
||||
>:=> (line 60, col 34) to (line 60, col 57)
|
||||
60 >for (let {name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~=> Pos: (1725 to 1731) SpanInfo: {"start":1726,"length":5}
|
||||
>i = 0
|
||||
>:=> (line 60, col 74) to (line 60, col 79)
|
||||
60 >for (let {name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~=> Pos: (1732 to 1738) SpanInfo: {"start":1733,"length":5}
|
||||
>i < 1
|
||||
>:=> (line 60, col 81) to (line 60, col 86)
|
||||
60 >for (let {name: nameA = "noName", skill: skillA = "skill" } = getRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~=> Pos: (1739 to 1746) SpanInfo: {"start":1740,"length":3}
|
||||
>i++
|
||||
>:=> (line 60, col 88) to (line 60, col 91)
|
||||
--------------------------------
|
||||
61 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1747 to 1770) SpanInfo: {"start":1751,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 61, col 4) to (line 61, col 22)
|
||||
--------------------------------
|
||||
62 >}
|
||||
|
||||
~~ => Pos: (1771 to 1772) SpanInfo: {"start":1751,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 61, col 4) to (line 61, col 22)
|
||||
--------------------------------
|
||||
63 >for (let {name: nameA = "noName", skill: skillA = "skill" } = <Robot>{ name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1773 to 1805) SpanInfo: {"start":1783,"length":22}
|
||||
>name: nameA = "noName"
|
||||
>:=> (line 63, col 10) to (line 63, col 32)
|
||||
63 >for (let {name: nameA = "noName", skill: skillA = "skill" } = <Robot>{ name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1806 to 1880) SpanInfo: {"start":1807,"length":23}
|
||||
>skill: skillA = "skill"
|
||||
>:=> (line 63, col 34) to (line 63, col 57)
|
||||
63 >for (let {name: nameA = "noName", skill: skillA = "skill" } = <Robot>{ name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~=> Pos: (1881 to 1887) SpanInfo: {"start":1882,"length":5}
|
||||
>i = 0
|
||||
>:=> (line 63, col 109) to (line 63, col 114)
|
||||
63 >for (let {name: nameA = "noName", skill: skillA = "skill" } = <Robot>{ name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~=> Pos: (1888 to 1894) SpanInfo: {"start":1889,"length":5}
|
||||
>i < 1
|
||||
>:=> (line 63, col 116) to (line 63, col 121)
|
||||
63 >for (let {name: nameA = "noName", skill: skillA = "skill" } = <Robot>{ name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~=> Pos: (1895 to 1902) SpanInfo: {"start":1896,"length":3}
|
||||
>i++
|
||||
>:=> (line 63, col 123) to (line 63, col 126)
|
||||
--------------------------------
|
||||
64 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1903 to 1926) SpanInfo: {"start":1907,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 64, col 4) to (line 64, col 22)
|
||||
--------------------------------
|
||||
65 >}
|
||||
|
||||
~~ => Pos: (1927 to 1928) SpanInfo: {"start":1907,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 64, col 4) to (line 64, col 22)
|
||||
--------------------------------
|
||||
66 >for (let {
|
||||
|
||||
~~~~~~~~~~~ => Pos: (1929 to 1939) SpanInfo: {"start":1944,"length":22}
|
||||
>name: nameA = "noName"
|
||||
>:=> (line 67, col 4) to (line 67, col 26)
|
||||
--------------------------------
|
||||
67 > name: nameA = "noName",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1940 to 1967) SpanInfo: {"start":1944,"length":22}
|
||||
>name: nameA = "noName"
|
||||
>:=> (line 67, col 4) to (line 67, col 26)
|
||||
--------------------------------
|
||||
68 > skills: {
|
||||
|
||||
~~~~~~~~~~~ => Pos: (1968 to 1978) SpanInfo: {"start":1972,"length":139}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "none", secondary: "none" }
|
||||
>:=> (line 68, col 4) to (line 71, col 46)
|
||||
68 > skills: {
|
||||
|
||||
~~~ => Pos: (1979 to 1981) SpanInfo: {"start":1990,"length":29}
|
||||
>primary: primaryA = "primary"
|
||||
>:=> (line 69, col 8) to (line 69, col 37)
|
||||
--------------------------------
|
||||
69 > primary: primaryA = "primary",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1982 to 2020) SpanInfo: {"start":1990,"length":29}
|
||||
>primary: primaryA = "primary"
|
||||
>:=> (line 69, col 8) to (line 69, col 37)
|
||||
--------------------------------
|
||||
70 > secondary: secondaryA = "secondary"
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2021 to 2064) SpanInfo: {"start":2029,"length":35}
|
||||
>secondary: secondaryA = "secondary"
|
||||
>:=> (line 70, col 8) to (line 70, col 43)
|
||||
--------------------------------
|
||||
71 > } = { primary: "none", secondary: "none" }
|
||||
|
||||
~~~~~ => Pos: (2065 to 2069) SpanInfo: {"start":2029,"length":35}
|
||||
>secondary: secondaryA = "secondary"
|
||||
>:=> (line 70, col 8) to (line 70, col 43)
|
||||
71 > } = { primary: "none", secondary: "none" }
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2070 to 2111) SpanInfo: {"start":1972,"length":139}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "none", secondary: "none" }
|
||||
>:=> (line 68, col 4) to (line 71, col 46)
|
||||
--------------------------------
|
||||
72 >} = multiRobot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~ => Pos: (2112 to 2126) SpanInfo: {"start":1972,"length":139}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "none", secondary: "none" }
|
||||
>:=> (line 68, col 4) to (line 71, col 46)
|
||||
72 >} = multiRobot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~ => Pos: (2127 to 2133) SpanInfo: {"start":2128,"length":5}
|
||||
>i = 0
|
||||
>:=> (line 72, col 16) to (line 72, col 21)
|
||||
72 >} = multiRobot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~ => Pos: (2134 to 2140) SpanInfo: {"start":2135,"length":5}
|
||||
>i < 1
|
||||
>:=> (line 72, col 23) to (line 72, col 28)
|
||||
72 >} = multiRobot, i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~ => Pos: (2141 to 2148) SpanInfo: {"start":2142,"length":3}
|
||||
>i++
|
||||
>:=> (line 72, col 30) to (line 72, col 33)
|
||||
--------------------------------
|
||||
73 > console.log(primaryA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2149 to 2175) SpanInfo: {"start":2153,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 73, col 4) to (line 73, col 25)
|
||||
--------------------------------
|
||||
74 >}
|
||||
|
||||
~~ => Pos: (2176 to 2177) SpanInfo: {"start":2153,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 73, col 4) to (line 73, col 25)
|
||||
--------------------------------
|
||||
75 >for (let {
|
||||
|
||||
~~~~~~~~~~~ => Pos: (2178 to 2188) SpanInfo: {"start":2193,"length":22}
|
||||
>name: nameA = "noName"
|
||||
>:=> (line 76, col 4) to (line 76, col 26)
|
||||
--------------------------------
|
||||
76 > name: nameA = "noName",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2189 to 2216) SpanInfo: {"start":2193,"length":22}
|
||||
>name: nameA = "noName"
|
||||
>:=> (line 76, col 4) to (line 76, col 26)
|
||||
--------------------------------
|
||||
77 > skills: {
|
||||
|
||||
~~~~~~~~~~~ => Pos: (2217 to 2227) SpanInfo: {"start":2221,"length":139}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "none", secondary: "none" }
|
||||
>:=> (line 77, col 4) to (line 80, col 46)
|
||||
77 > skills: {
|
||||
|
||||
~~~ => Pos: (2228 to 2230) SpanInfo: {"start":2239,"length":29}
|
||||
>primary: primaryA = "primary"
|
||||
>:=> (line 78, col 8) to (line 78, col 37)
|
||||
--------------------------------
|
||||
78 > primary: primaryA = "primary",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2231 to 2269) SpanInfo: {"start":2239,"length":29}
|
||||
>primary: primaryA = "primary"
|
||||
>:=> (line 78, col 8) to (line 78, col 37)
|
||||
--------------------------------
|
||||
79 > secondary: secondaryA = "secondary"
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2270 to 2313) SpanInfo: {"start":2278,"length":35}
|
||||
>secondary: secondaryA = "secondary"
|
||||
>:=> (line 79, col 8) to (line 79, col 43)
|
||||
--------------------------------
|
||||
80 > } = { primary: "none", secondary: "none" }
|
||||
|
||||
~~~~~ => Pos: (2314 to 2318) SpanInfo: {"start":2278,"length":35}
|
||||
>secondary: secondaryA = "secondary"
|
||||
>:=> (line 79, col 8) to (line 79, col 43)
|
||||
80 > } = { primary: "none", secondary: "none" }
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2319 to 2360) SpanInfo: {"start":2221,"length":139}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "none", secondary: "none" }
|
||||
>:=> (line 77, col 4) to (line 80, col 46)
|
||||
--------------------------------
|
||||
81 >} = getMultiRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~ => Pos: (2361 to 2380) SpanInfo: {"start":2221,"length":139}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "none", secondary: "none" }
|
||||
>:=> (line 77, col 4) to (line 80, col 46)
|
||||
81 >} = getMultiRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~ => Pos: (2381 to 2387) SpanInfo: {"start":2382,"length":5}
|
||||
>i = 0
|
||||
>:=> (line 81, col 21) to (line 81, col 26)
|
||||
81 >} = getMultiRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~ => Pos: (2388 to 2394) SpanInfo: {"start":2389,"length":5}
|
||||
>i < 1
|
||||
>:=> (line 81, col 28) to (line 81, col 33)
|
||||
81 >} = getMultiRobot(), i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~ => Pos: (2395 to 2402) SpanInfo: {"start":2396,"length":3}
|
||||
>i++
|
||||
>:=> (line 81, col 35) to (line 81, col 38)
|
||||
--------------------------------
|
||||
82 > console.log(primaryA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2403 to 2429) SpanInfo: {"start":2407,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 82, col 4) to (line 82, col 25)
|
||||
--------------------------------
|
||||
83 >}
|
||||
|
||||
~~ => Pos: (2430 to 2431) SpanInfo: {"start":2407,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 82, col 4) to (line 82, col 25)
|
||||
--------------------------------
|
||||
84 >for (let {
|
||||
|
||||
~~~~~~~~~~~ => Pos: (2432 to 2442) SpanInfo: {"start":2447,"length":22}
|
||||
>name: nameA = "noName"
|
||||
>:=> (line 85, col 4) to (line 85, col 26)
|
||||
--------------------------------
|
||||
85 > name: nameA = "noName",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2443 to 2470) SpanInfo: {"start":2447,"length":22}
|
||||
>name: nameA = "noName"
|
||||
>:=> (line 85, col 4) to (line 85, col 26)
|
||||
--------------------------------
|
||||
86 > skills: {
|
||||
|
||||
~~~~~~~~~~~ => Pos: (2471 to 2481) SpanInfo: {"start":2475,"length":139}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "none", secondary: "none" }
|
||||
>:=> (line 86, col 4) to (line 89, col 46)
|
||||
86 > skills: {
|
||||
|
||||
~~~ => Pos: (2482 to 2484) SpanInfo: {"start":2493,"length":29}
|
||||
>primary: primaryA = "primary"
|
||||
>:=> (line 87, col 8) to (line 87, col 37)
|
||||
--------------------------------
|
||||
87 > primary: primaryA = "primary",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2485 to 2523) SpanInfo: {"start":2493,"length":29}
|
||||
>primary: primaryA = "primary"
|
||||
>:=> (line 87, col 8) to (line 87, col 37)
|
||||
--------------------------------
|
||||
88 > secondary: secondaryA = "secondary"
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2524 to 2567) SpanInfo: {"start":2532,"length":35}
|
||||
>secondary: secondaryA = "secondary"
|
||||
>:=> (line 88, col 8) to (line 88, col 43)
|
||||
--------------------------------
|
||||
89 > } = { primary: "none", secondary: "none" }
|
||||
|
||||
~~~~~ => Pos: (2568 to 2572) SpanInfo: {"start":2532,"length":35}
|
||||
>secondary: secondaryA = "secondary"
|
||||
>:=> (line 88, col 8) to (line 88, col 43)
|
||||
89 > } = { primary: "none", secondary: "none" }
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2573 to 2614) SpanInfo: {"start":2475,"length":139}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "none", secondary: "none" }
|
||||
>:=> (line 86, col 4) to (line 89, col 46)
|
||||
--------------------------------
|
||||
90 >} = <MultiRobot>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } },
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2615 to 2705) SpanInfo: {"start":2475,"length":139}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "none", secondary: "none" }
|
||||
>:=> (line 86, col 4) to (line 89, col 46)
|
||||
--------------------------------
|
||||
91 > i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~~~ => Pos: (2706 to 2715) SpanInfo: {"start":2710,"length":5}
|
||||
>i = 0
|
||||
>:=> (line 91, col 4) to (line 91, col 9)
|
||||
91 > i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~ => Pos: (2716 to 2722) SpanInfo: {"start":2717,"length":5}
|
||||
>i < 1
|
||||
>:=> (line 91, col 11) to (line 91, col 16)
|
||||
91 > i = 0; i < 1; i++) {
|
||||
|
||||
~~~~~~~~ => Pos: (2723 to 2730) SpanInfo: {"start":2724,"length":3}
|
||||
>i++
|
||||
>:=> (line 91, col 18) to (line 91, col 21)
|
||||
--------------------------------
|
||||
92 > console.log(primaryA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2731 to 2757) SpanInfo: {"start":2735,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 92, col 4) to (line 92, col 25)
|
||||
--------------------------------
|
||||
93 >}
|
||||
~ => Pos: (2758 to 2758) SpanInfo: {"start":2735,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 92, col 4) to (line 92, col 25)
|
||||
@@ -0,0 +1,778 @@
|
||||
|
||||
1 >declare var console: {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined
|
||||
--------------------------------
|
||||
2 > log(msg: any): void;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined
|
||||
--------------------------------
|
||||
3 >}
|
||||
|
||||
~~ => Pos: (48 to 49) SpanInfo: undefined
|
||||
--------------------------------
|
||||
4 >type Robot = [number, string, string];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (50 to 88) SpanInfo: undefined
|
||||
--------------------------------
|
||||
5 >type MultiSkilledRobot = [string, [string, string]];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (89 to 141) SpanInfo: undefined
|
||||
--------------------------------
|
||||
6 >let robotA: Robot = [1, "mower", "mowing"];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (142 to 185) SpanInfo: {"start":142,"length":42}
|
||||
>let robotA: Robot = [1, "mower", "mowing"]
|
||||
>:=> (line 6, col 0) to (line 6, col 42)
|
||||
--------------------------------
|
||||
7 >let robotB: Robot = [2, "trimmer", "trimming"];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (186 to 233) SpanInfo: {"start":186,"length":46}
|
||||
>let robotB: Robot = [2, "trimmer", "trimming"]
|
||||
>:=> (line 7, col 0) to (line 7, col 46)
|
||||
--------------------------------
|
||||
8 >let robots = [robotA, robotB];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (234 to 264) SpanInfo: {"start":234,"length":29}
|
||||
>let robots = [robotA, robotB]
|
||||
>:=> (line 8, col 0) to (line 8, col 29)
|
||||
--------------------------------
|
||||
9 >function getRobots() {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (265 to 287) SpanInfo: {"start":292,"length":13}
|
||||
>return robots
|
||||
>:=> (line 10, col 4) to (line 10, col 17)
|
||||
--------------------------------
|
||||
10 > return robots;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (288 to 306) SpanInfo: {"start":292,"length":13}
|
||||
>return robots
|
||||
>:=> (line 10, col 4) to (line 10, col 17)
|
||||
--------------------------------
|
||||
11 >}
|
||||
|
||||
~~ => Pos: (307 to 308) SpanInfo: {"start":307,"length":1}
|
||||
>}
|
||||
>:=> (line 11, col 0) to (line 11, col 1)
|
||||
--------------------------------
|
||||
12 >let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (309 to 372) SpanInfo: {"start":309,"length":62}
|
||||
>let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]
|
||||
>:=> (line 12, col 0) to (line 12, col 62)
|
||||
--------------------------------
|
||||
13 >let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (373 to 446) SpanInfo: {"start":373,"length":72}
|
||||
>let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]
|
||||
>:=> (line 13, col 0) to (line 13, col 72)
|
||||
--------------------------------
|
||||
14 >let multiRobots = [multiRobotA, multiRobotB];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (447 to 492) SpanInfo: {"start":447,"length":44}
|
||||
>let multiRobots = [multiRobotA, multiRobotB]
|
||||
>:=> (line 14, col 0) to (line 14, col 44)
|
||||
--------------------------------
|
||||
15 >function getMultiRobots() {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (493 to 520) SpanInfo: {"start":525,"length":18}
|
||||
>return multiRobots
|
||||
>:=> (line 16, col 4) to (line 16, col 22)
|
||||
--------------------------------
|
||||
16 > return multiRobots;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (521 to 544) SpanInfo: {"start":525,"length":18}
|
||||
>return multiRobots
|
||||
>:=> (line 16, col 4) to (line 16, col 22)
|
||||
--------------------------------
|
||||
17 >}
|
||||
|
||||
~~ => Pos: (545 to 546) SpanInfo: {"start":545,"length":1}
|
||||
>}
|
||||
>:=> (line 17, col 0) to (line 17, col 1)
|
||||
--------------------------------
|
||||
18 >for (let [, nameA] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (547 to 564) SpanInfo: {"start":559,"length":5}
|
||||
>nameA
|
||||
>:=> (line 18, col 12) to (line 18, col 17)
|
||||
18 >for (let [, nameA] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (565 to 578) SpanInfo: {"start":569,"length":6}
|
||||
>robots
|
||||
>:=> (line 18, col 22) to (line 18, col 28)
|
||||
--------------------------------
|
||||
19 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (579 to 602) SpanInfo: {"start":583,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 19, col 4) to (line 19, col 22)
|
||||
--------------------------------
|
||||
20 >}
|
||||
|
||||
~~ => Pos: (603 to 604) SpanInfo: {"start":583,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 19, col 4) to (line 19, col 22)
|
||||
--------------------------------
|
||||
21 >for (let [, nameA] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (605 to 622) SpanInfo: {"start":617,"length":5}
|
||||
>nameA
|
||||
>:=> (line 21, col 12) to (line 21, col 17)
|
||||
21 >for (let [, nameA] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (623 to 641) SpanInfo: {"start":627,"length":11}
|
||||
>getRobots()
|
||||
>:=> (line 21, col 22) to (line 21, col 33)
|
||||
--------------------------------
|
||||
22 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (642 to 665) SpanInfo: {"start":646,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 22, col 4) to (line 22, col 22)
|
||||
--------------------------------
|
||||
23 >}
|
||||
|
||||
~~ => Pos: (666 to 667) SpanInfo: {"start":646,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 22, col 4) to (line 22, col 22)
|
||||
--------------------------------
|
||||
24 >for (let [, nameA] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (668 to 685) SpanInfo: {"start":680,"length":5}
|
||||
>nameA
|
||||
>:=> (line 24, col 12) to (line 24, col 17)
|
||||
24 >for (let [, nameA] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (686 to 709) SpanInfo: {"start":690,"length":16}
|
||||
>[robotA, robotB]
|
||||
>:=> (line 24, col 22) to (line 24, col 38)
|
||||
--------------------------------
|
||||
25 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (710 to 733) SpanInfo: {"start":714,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 25, col 4) to (line 25, col 22)
|
||||
--------------------------------
|
||||
26 >}
|
||||
|
||||
~~ => Pos: (734 to 735) SpanInfo: {"start":714,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 25, col 4) to (line 25, col 22)
|
||||
--------------------------------
|
||||
27 >for (let [, [primarySkillA, secondarySkillA]] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~ => Pos: (736 to 746) SpanInfo: {"start":748,"length":32}
|
||||
>[primarySkillA, secondarySkillA]
|
||||
>:=> (line 27, col 12) to (line 27, col 44)
|
||||
27 >for (let [, [primarySkillA, secondarySkillA]] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~ => Pos: (747 to 762) SpanInfo: {"start":749,"length":13}
|
||||
>primarySkillA
|
||||
>:=> (line 27, col 13) to (line 27, col 26)
|
||||
27 >for (let [, [primarySkillA, secondarySkillA]] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~ => Pos: (763 to 779) SpanInfo: {"start":764,"length":15}
|
||||
>secondarySkillA
|
||||
>:=> (line 27, col 28) to (line 27, col 43)
|
||||
27 >for (let [, [primarySkillA, secondarySkillA]] of multiRobots) {
|
||||
|
||||
~ => Pos: (780 to 780) SpanInfo: {"start":748,"length":32}
|
||||
>[primarySkillA, secondarySkillA]
|
||||
>:=> (line 27, col 12) to (line 27, col 44)
|
||||
27 >for (let [, [primarySkillA, secondarySkillA]] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (781 to 799) SpanInfo: {"start":785,"length":11}
|
||||
>multiRobots
|
||||
>:=> (line 27, col 49) to (line 27, col 60)
|
||||
--------------------------------
|
||||
28 > console.log(primarySkillA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (800 to 831) SpanInfo: {"start":804,"length":26}
|
||||
>console.log(primarySkillA)
|
||||
>:=> (line 28, col 4) to (line 28, col 30)
|
||||
--------------------------------
|
||||
29 >}
|
||||
|
||||
~~ => Pos: (832 to 833) SpanInfo: {"start":804,"length":26}
|
||||
>console.log(primarySkillA)
|
||||
>:=> (line 28, col 4) to (line 28, col 30)
|
||||
--------------------------------
|
||||
30 >for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~ => Pos: (834 to 844) SpanInfo: {"start":846,"length":32}
|
||||
>[primarySkillA, secondarySkillA]
|
||||
>:=> (line 30, col 12) to (line 30, col 44)
|
||||
30 >for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~ => Pos: (845 to 860) SpanInfo: {"start":847,"length":13}
|
||||
>primarySkillA
|
||||
>:=> (line 30, col 13) to (line 30, col 26)
|
||||
30 >for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~ => Pos: (861 to 877) SpanInfo: {"start":862,"length":15}
|
||||
>secondarySkillA
|
||||
>:=> (line 30, col 28) to (line 30, col 43)
|
||||
30 >for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) {
|
||||
|
||||
~ => Pos: (878 to 878) SpanInfo: {"start":846,"length":32}
|
||||
>[primarySkillA, secondarySkillA]
|
||||
>:=> (line 30, col 12) to (line 30, col 44)
|
||||
30 >for (let [, [primarySkillA, secondarySkillA]] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (879 to 902) SpanInfo: {"start":883,"length":16}
|
||||
>getMultiRobots()
|
||||
>:=> (line 30, col 49) to (line 30, col 65)
|
||||
--------------------------------
|
||||
31 > console.log(primarySkillA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (903 to 934) SpanInfo: {"start":907,"length":26}
|
||||
>console.log(primarySkillA)
|
||||
>:=> (line 31, col 4) to (line 31, col 30)
|
||||
--------------------------------
|
||||
32 >}
|
||||
|
||||
~~ => Pos: (935 to 936) SpanInfo: {"start":907,"length":26}
|
||||
>console.log(primarySkillA)
|
||||
>:=> (line 31, col 4) to (line 31, col 30)
|
||||
--------------------------------
|
||||
33 >for (let [, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~ => Pos: (937 to 947) SpanInfo: {"start":949,"length":32}
|
||||
>[primarySkillA, secondarySkillA]
|
||||
>:=> (line 33, col 12) to (line 33, col 44)
|
||||
33 >for (let [, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~ => Pos: (948 to 963) SpanInfo: {"start":950,"length":13}
|
||||
>primarySkillA
|
||||
>:=> (line 33, col 13) to (line 33, col 26)
|
||||
33 >for (let [, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~ => Pos: (964 to 980) SpanInfo: {"start":965,"length":15}
|
||||
>secondarySkillA
|
||||
>:=> (line 33, col 28) to (line 33, col 43)
|
||||
33 >for (let [, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~ => Pos: (981 to 981) SpanInfo: {"start":949,"length":32}
|
||||
>[primarySkillA, secondarySkillA]
|
||||
>:=> (line 33, col 12) to (line 33, col 44)
|
||||
33 >for (let [, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (982 to 1015) SpanInfo: {"start":986,"length":26}
|
||||
>[multiRobotA, multiRobotB]
|
||||
>:=> (line 33, col 49) to (line 33, col 75)
|
||||
--------------------------------
|
||||
34 > console.log(primarySkillA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1016 to 1047) SpanInfo: {"start":1020,"length":26}
|
||||
>console.log(primarySkillA)
|
||||
>:=> (line 34, col 4) to (line 34, col 30)
|
||||
--------------------------------
|
||||
35 >}
|
||||
|
||||
~~ => Pos: (1048 to 1049) SpanInfo: {"start":1020,"length":26}
|
||||
>console.log(primarySkillA)
|
||||
>:=> (line 34, col 4) to (line 34, col 30)
|
||||
--------------------------------
|
||||
36 >for (let [numberB] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (1050 to 1067) SpanInfo: {"start":1060,"length":7}
|
||||
>numberB
|
||||
>:=> (line 36, col 10) to (line 36, col 17)
|
||||
36 >for (let [numberB] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (1068 to 1081) SpanInfo: {"start":1072,"length":6}
|
||||
>robots
|
||||
>:=> (line 36, col 22) to (line 36, col 28)
|
||||
--------------------------------
|
||||
37 > console.log(numberB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1082 to 1107) SpanInfo: {"start":1086,"length":20}
|
||||
>console.log(numberB)
|
||||
>:=> (line 37, col 4) to (line 37, col 24)
|
||||
--------------------------------
|
||||
38 >}
|
||||
|
||||
~~ => Pos: (1108 to 1109) SpanInfo: {"start":1086,"length":20}
|
||||
>console.log(numberB)
|
||||
>:=> (line 37, col 4) to (line 37, col 24)
|
||||
--------------------------------
|
||||
39 >for (let [numberB] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (1110 to 1127) SpanInfo: {"start":1120,"length":7}
|
||||
>numberB
|
||||
>:=> (line 39, col 10) to (line 39, col 17)
|
||||
39 >for (let [numberB] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (1128 to 1146) SpanInfo: {"start":1132,"length":11}
|
||||
>getRobots()
|
||||
>:=> (line 39, col 22) to (line 39, col 33)
|
||||
--------------------------------
|
||||
40 > console.log(numberB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1147 to 1172) SpanInfo: {"start":1151,"length":20}
|
||||
>console.log(numberB)
|
||||
>:=> (line 40, col 4) to (line 40, col 24)
|
||||
--------------------------------
|
||||
41 >}
|
||||
|
||||
~~ => Pos: (1173 to 1174) SpanInfo: {"start":1151,"length":20}
|
||||
>console.log(numberB)
|
||||
>:=> (line 40, col 4) to (line 40, col 24)
|
||||
--------------------------------
|
||||
42 >for (let [numberB] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (1175 to 1192) SpanInfo: {"start":1185,"length":7}
|
||||
>numberB
|
||||
>:=> (line 42, col 10) to (line 42, col 17)
|
||||
42 >for (let [numberB] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1193 to 1216) SpanInfo: {"start":1197,"length":16}
|
||||
>[robotA, robotB]
|
||||
>:=> (line 42, col 22) to (line 42, col 38)
|
||||
--------------------------------
|
||||
43 > console.log(numberB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1217 to 1242) SpanInfo: {"start":1221,"length":20}
|
||||
>console.log(numberB)
|
||||
>:=> (line 43, col 4) to (line 43, col 24)
|
||||
--------------------------------
|
||||
44 >}
|
||||
|
||||
~~ => Pos: (1243 to 1244) SpanInfo: {"start":1221,"length":20}
|
||||
>console.log(numberB)
|
||||
>:=> (line 43, col 4) to (line 43, col 24)
|
||||
--------------------------------
|
||||
45 >for (let [nameB] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~ => Pos: (1245 to 1260) SpanInfo: {"start":1255,"length":5}
|
||||
>nameB
|
||||
>:=> (line 45, col 10) to (line 45, col 15)
|
||||
45 >for (let [nameB] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (1261 to 1279) SpanInfo: {"start":1265,"length":11}
|
||||
>multiRobots
|
||||
>:=> (line 45, col 20) to (line 45, col 31)
|
||||
--------------------------------
|
||||
46 > console.log(nameB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1280 to 1303) SpanInfo: {"start":1284,"length":18}
|
||||
>console.log(nameB)
|
||||
>:=> (line 46, col 4) to (line 46, col 22)
|
||||
--------------------------------
|
||||
47 >}
|
||||
|
||||
~~ => Pos: (1304 to 1305) SpanInfo: {"start":1284,"length":18}
|
||||
>console.log(nameB)
|
||||
>:=> (line 46, col 4) to (line 46, col 22)
|
||||
--------------------------------
|
||||
48 >for (let [nameB] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~ => Pos: (1306 to 1321) SpanInfo: {"start":1316,"length":5}
|
||||
>nameB
|
||||
>:=> (line 48, col 10) to (line 48, col 15)
|
||||
48 >for (let [nameB] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1322 to 1345) SpanInfo: {"start":1326,"length":16}
|
||||
>getMultiRobots()
|
||||
>:=> (line 48, col 20) to (line 48, col 36)
|
||||
--------------------------------
|
||||
49 > console.log(nameB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1346 to 1369) SpanInfo: {"start":1350,"length":18}
|
||||
>console.log(nameB)
|
||||
>:=> (line 49, col 4) to (line 49, col 22)
|
||||
--------------------------------
|
||||
50 >}
|
||||
|
||||
~~ => Pos: (1370 to 1371) SpanInfo: {"start":1350,"length":18}
|
||||
>console.log(nameB)
|
||||
>:=> (line 49, col 4) to (line 49, col 22)
|
||||
--------------------------------
|
||||
51 >for (let [nameB] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~ => Pos: (1372 to 1387) SpanInfo: {"start":1382,"length":5}
|
||||
>nameB
|
||||
>:=> (line 51, col 10) to (line 51, col 15)
|
||||
51 >for (let [nameB] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1388 to 1421) SpanInfo: {"start":1392,"length":26}
|
||||
>[multiRobotA, multiRobotB]
|
||||
>:=> (line 51, col 20) to (line 51, col 46)
|
||||
--------------------------------
|
||||
52 > console.log(nameB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1422 to 1445) SpanInfo: {"start":1426,"length":18}
|
||||
>console.log(nameB)
|
||||
>:=> (line 52, col 4) to (line 52, col 22)
|
||||
--------------------------------
|
||||
53 >}
|
||||
|
||||
~~ => Pos: (1446 to 1447) SpanInfo: {"start":1426,"length":18}
|
||||
>console.log(nameB)
|
||||
>:=> (line 52, col 4) to (line 52, col 22)
|
||||
--------------------------------
|
||||
54 >for (let [numberA2, nameA2, skillA2] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (1448 to 1466) SpanInfo: {"start":1458,"length":8}
|
||||
>numberA2
|
||||
>:=> (line 54, col 10) to (line 54, col 18)
|
||||
54 >for (let [numberA2, nameA2, skillA2] of robots) {
|
||||
|
||||
~~~~~~~~ => Pos: (1467 to 1474) SpanInfo: {"start":1468,"length":6}
|
||||
>nameA2
|
||||
>:=> (line 54, col 20) to (line 54, col 26)
|
||||
54 >for (let [numberA2, nameA2, skillA2] of robots) {
|
||||
|
||||
~~~~~~~~~ => Pos: (1475 to 1483) SpanInfo: {"start":1476,"length":7}
|
||||
>skillA2
|
||||
>:=> (line 54, col 28) to (line 54, col 35)
|
||||
54 >for (let [numberA2, nameA2, skillA2] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~=> Pos: (1484 to 1497) SpanInfo: {"start":1488,"length":6}
|
||||
>robots
|
||||
>:=> (line 54, col 40) to (line 54, col 46)
|
||||
--------------------------------
|
||||
55 > console.log(nameA2);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1498 to 1522) SpanInfo: {"start":1502,"length":19}
|
||||
>console.log(nameA2)
|
||||
>:=> (line 55, col 4) to (line 55, col 23)
|
||||
--------------------------------
|
||||
56 >}
|
||||
|
||||
~~ => Pos: (1523 to 1524) SpanInfo: {"start":1502,"length":19}
|
||||
>console.log(nameA2)
|
||||
>:=> (line 55, col 4) to (line 55, col 23)
|
||||
--------------------------------
|
||||
57 >for (let [numberA2, nameA2, skillA2] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (1525 to 1543) SpanInfo: {"start":1535,"length":8}
|
||||
>numberA2
|
||||
>:=> (line 57, col 10) to (line 57, col 18)
|
||||
57 >for (let [numberA2, nameA2, skillA2] of getRobots()) {
|
||||
|
||||
~~~~~~~~ => Pos: (1544 to 1551) SpanInfo: {"start":1545,"length":6}
|
||||
>nameA2
|
||||
>:=> (line 57, col 20) to (line 57, col 26)
|
||||
57 >for (let [numberA2, nameA2, skillA2] of getRobots()) {
|
||||
|
||||
~~~~~~~~~ => Pos: (1552 to 1560) SpanInfo: {"start":1553,"length":7}
|
||||
>skillA2
|
||||
>:=> (line 57, col 28) to (line 57, col 35)
|
||||
57 >for (let [numberA2, nameA2, skillA2] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (1561 to 1579) SpanInfo: {"start":1565,"length":11}
|
||||
>getRobots()
|
||||
>:=> (line 57, col 40) to (line 57, col 51)
|
||||
--------------------------------
|
||||
58 > console.log(nameA2);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1580 to 1604) SpanInfo: {"start":1584,"length":19}
|
||||
>console.log(nameA2)
|
||||
>:=> (line 58, col 4) to (line 58, col 23)
|
||||
--------------------------------
|
||||
59 >}
|
||||
|
||||
~~ => Pos: (1605 to 1606) SpanInfo: {"start":1584,"length":19}
|
||||
>console.log(nameA2)
|
||||
>:=> (line 58, col 4) to (line 58, col 23)
|
||||
--------------------------------
|
||||
60 >for (let [numberA2, nameA2, skillA2] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (1607 to 1625) SpanInfo: {"start":1617,"length":8}
|
||||
>numberA2
|
||||
>:=> (line 60, col 10) to (line 60, col 18)
|
||||
60 >for (let [numberA2, nameA2, skillA2] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~ => Pos: (1626 to 1633) SpanInfo: {"start":1627,"length":6}
|
||||
>nameA2
|
||||
>:=> (line 60, col 20) to (line 60, col 26)
|
||||
60 >for (let [numberA2, nameA2, skillA2] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~ => Pos: (1634 to 1642) SpanInfo: {"start":1635,"length":7}
|
||||
>skillA2
|
||||
>:=> (line 60, col 28) to (line 60, col 35)
|
||||
60 >for (let [numberA2, nameA2, skillA2] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1643 to 1666) SpanInfo: {"start":1647,"length":16}
|
||||
>[robotA, robotB]
|
||||
>:=> (line 60, col 40) to (line 60, col 56)
|
||||
--------------------------------
|
||||
61 > console.log(nameA2);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1667 to 1691) SpanInfo: {"start":1671,"length":19}
|
||||
>console.log(nameA2)
|
||||
>:=> (line 61, col 4) to (line 61, col 23)
|
||||
--------------------------------
|
||||
62 >}
|
||||
|
||||
~~ => Pos: (1692 to 1693) SpanInfo: {"start":1671,"length":19}
|
||||
>console.log(nameA2)
|
||||
>:=> (line 61, col 4) to (line 61, col 23)
|
||||
--------------------------------
|
||||
63 >for (let [nameMA, [primarySkillA, secondarySkillA]] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~ => Pos: (1694 to 1710) SpanInfo: {"start":1704,"length":6}
|
||||
>nameMA
|
||||
>:=> (line 63, col 10) to (line 63, col 16)
|
||||
63 >for (let [nameMA, [primarySkillA, secondarySkillA]] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~ => Pos: (1711 to 1726) SpanInfo: {"start":1713,"length":13}
|
||||
>primarySkillA
|
||||
>:=> (line 63, col 19) to (line 63, col 32)
|
||||
63 >for (let [nameMA, [primarySkillA, secondarySkillA]] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~=> Pos: (1727 to 1743) SpanInfo: {"start":1728,"length":15}
|
||||
>secondarySkillA
|
||||
>:=> (line 63, col 34) to (line 63, col 49)
|
||||
63 >for (let [nameMA, [primarySkillA, secondarySkillA]] of multiRobots) {
|
||||
|
||||
~=> Pos: (1744 to 1744) SpanInfo: {"start":1712,"length":32}
|
||||
>[primarySkillA, secondarySkillA]
|
||||
>:=> (line 63, col 18) to (line 63, col 50)
|
||||
63 >for (let [nameMA, [primarySkillA, secondarySkillA]] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (1745 to 1763) SpanInfo: {"start":1749,"length":11}
|
||||
>multiRobots
|
||||
>:=> (line 63, col 55) to (line 63, col 66)
|
||||
--------------------------------
|
||||
64 > console.log(nameMA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1764 to 1788) SpanInfo: {"start":1768,"length":19}
|
||||
>console.log(nameMA)
|
||||
>:=> (line 64, col 4) to (line 64, col 23)
|
||||
--------------------------------
|
||||
65 >}
|
||||
|
||||
~~ => Pos: (1789 to 1790) SpanInfo: {"start":1768,"length":19}
|
||||
>console.log(nameMA)
|
||||
>:=> (line 64, col 4) to (line 64, col 23)
|
||||
--------------------------------
|
||||
66 >for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~ => Pos: (1791 to 1807) SpanInfo: {"start":1801,"length":6}
|
||||
>nameMA
|
||||
>:=> (line 66, col 10) to (line 66, col 16)
|
||||
66 >for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~ => Pos: (1808 to 1823) SpanInfo: {"start":1810,"length":13}
|
||||
>primarySkillA
|
||||
>:=> (line 66, col 19) to (line 66, col 32)
|
||||
66 >for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~=> Pos: (1824 to 1840) SpanInfo: {"start":1825,"length":15}
|
||||
>secondarySkillA
|
||||
>:=> (line 66, col 34) to (line 66, col 49)
|
||||
66 >for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) {
|
||||
|
||||
~=> Pos: (1841 to 1841) SpanInfo: {"start":1809,"length":32}
|
||||
>[primarySkillA, secondarySkillA]
|
||||
>:=> (line 66, col 18) to (line 66, col 50)
|
||||
66 >for (let [nameMA, [primarySkillA, secondarySkillA]] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1842 to 1865) SpanInfo: {"start":1846,"length":16}
|
||||
>getMultiRobots()
|
||||
>:=> (line 66, col 55) to (line 66, col 71)
|
||||
--------------------------------
|
||||
67 > console.log(nameMA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1866 to 1890) SpanInfo: {"start":1870,"length":19}
|
||||
>console.log(nameMA)
|
||||
>:=> (line 67, col 4) to (line 67, col 23)
|
||||
--------------------------------
|
||||
68 >}
|
||||
|
||||
~~ => Pos: (1891 to 1892) SpanInfo: {"start":1870,"length":19}
|
||||
>console.log(nameMA)
|
||||
>:=> (line 67, col 4) to (line 67, col 23)
|
||||
--------------------------------
|
||||
69 >for (let [nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~ => Pos: (1893 to 1909) SpanInfo: {"start":1903,"length":6}
|
||||
>nameMA
|
||||
>:=> (line 69, col 10) to (line 69, col 16)
|
||||
69 >for (let [nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~ => Pos: (1910 to 1925) SpanInfo: {"start":1912,"length":13}
|
||||
>primarySkillA
|
||||
>:=> (line 69, col 19) to (line 69, col 32)
|
||||
69 >for (let [nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~=> Pos: (1926 to 1942) SpanInfo: {"start":1927,"length":15}
|
||||
>secondarySkillA
|
||||
>:=> (line 69, col 34) to (line 69, col 49)
|
||||
69 >for (let [nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~=> Pos: (1943 to 1943) SpanInfo: {"start":1911,"length":32}
|
||||
>[primarySkillA, secondarySkillA]
|
||||
>:=> (line 69, col 18) to (line 69, col 50)
|
||||
69 >for (let [nameMA, [primarySkillA, secondarySkillA]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1944 to 1977) SpanInfo: {"start":1948,"length":26}
|
||||
>[multiRobotA, multiRobotB]
|
||||
>:=> (line 69, col 55) to (line 69, col 81)
|
||||
--------------------------------
|
||||
70 > console.log(nameMA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1978 to 2002) SpanInfo: {"start":1982,"length":19}
|
||||
>console.log(nameMA)
|
||||
>:=> (line 70, col 4) to (line 70, col 23)
|
||||
--------------------------------
|
||||
71 >}
|
||||
|
||||
~~ => Pos: (2003 to 2004) SpanInfo: {"start":1982,"length":19}
|
||||
>console.log(nameMA)
|
||||
>:=> (line 70, col 4) to (line 70, col 23)
|
||||
--------------------------------
|
||||
72 >for (let [numberA3, ...robotAInfo] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (2005 to 2023) SpanInfo: {"start":2015,"length":8}
|
||||
>numberA3
|
||||
>:=> (line 72, col 10) to (line 72, col 18)
|
||||
72 >for (let [numberA3, ...robotAInfo] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~ => Pos: (2024 to 2038) SpanInfo: {"start":2025,"length":13}
|
||||
>...robotAInfo
|
||||
>:=> (line 72, col 20) to (line 72, col 33)
|
||||
72 >for (let [numberA3, ...robotAInfo] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~=> Pos: (2039 to 2052) SpanInfo: {"start":2043,"length":6}
|
||||
>robots
|
||||
>:=> (line 72, col 38) to (line 72, col 44)
|
||||
--------------------------------
|
||||
73 > console.log(numberA3);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2053 to 2079) SpanInfo: {"start":2057,"length":21}
|
||||
>console.log(numberA3)
|
||||
>:=> (line 73, col 4) to (line 73, col 25)
|
||||
--------------------------------
|
||||
74 >}
|
||||
|
||||
~~ => Pos: (2080 to 2081) SpanInfo: {"start":2057,"length":21}
|
||||
>console.log(numberA3)
|
||||
>:=> (line 73, col 4) to (line 73, col 25)
|
||||
--------------------------------
|
||||
75 >for (let [numberA3, ...robotAInfo] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (2082 to 2100) SpanInfo: {"start":2092,"length":8}
|
||||
>numberA3
|
||||
>:=> (line 75, col 10) to (line 75, col 18)
|
||||
75 >for (let [numberA3, ...robotAInfo] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~ => Pos: (2101 to 2115) SpanInfo: {"start":2102,"length":13}
|
||||
>...robotAInfo
|
||||
>:=> (line 75, col 20) to (line 75, col 33)
|
||||
75 >for (let [numberA3, ...robotAInfo] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (2116 to 2134) SpanInfo: {"start":2120,"length":11}
|
||||
>getRobots()
|
||||
>:=> (line 75, col 38) to (line 75, col 49)
|
||||
--------------------------------
|
||||
76 > console.log(numberA3);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2135 to 2161) SpanInfo: {"start":2139,"length":21}
|
||||
>console.log(numberA3)
|
||||
>:=> (line 76, col 4) to (line 76, col 25)
|
||||
--------------------------------
|
||||
77 >}
|
||||
|
||||
~~ => Pos: (2162 to 2163) SpanInfo: {"start":2139,"length":21}
|
||||
>console.log(numberA3)
|
||||
>:=> (line 76, col 4) to (line 76, col 25)
|
||||
--------------------------------
|
||||
78 >for (let [numberA3, ...robotAInfo] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (2164 to 2182) SpanInfo: {"start":2174,"length":8}
|
||||
>numberA3
|
||||
>:=> (line 78, col 10) to (line 78, col 18)
|
||||
78 >for (let [numberA3, ...robotAInfo] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~ => Pos: (2183 to 2197) SpanInfo: {"start":2184,"length":13}
|
||||
>...robotAInfo
|
||||
>:=> (line 78, col 20) to (line 78, col 33)
|
||||
78 >for (let [numberA3, ...robotAInfo] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2198 to 2221) SpanInfo: {"start":2202,"length":16}
|
||||
>[robotA, robotB]
|
||||
>:=> (line 78, col 38) to (line 78, col 54)
|
||||
--------------------------------
|
||||
79 > console.log(numberA3);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2222 to 2248) SpanInfo: {"start":2226,"length":21}
|
||||
>console.log(numberA3)
|
||||
>:=> (line 79, col 4) to (line 79, col 25)
|
||||
--------------------------------
|
||||
80 >}
|
||||
|
||||
~~ => Pos: (2249 to 2250) SpanInfo: {"start":2226,"length":21}
|
||||
>console.log(numberA3)
|
||||
>:=> (line 79, col 4) to (line 79, col 25)
|
||||
--------------------------------
|
||||
81 >for (let [...multiRobotAInfo] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2251 to 2279) SpanInfo: {"start":2261,"length":18}
|
||||
>...multiRobotAInfo
|
||||
>:=> (line 81, col 10) to (line 81, col 28)
|
||||
81 >for (let [...multiRobotAInfo] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (2280 to 2298) SpanInfo: {"start":2284,"length":11}
|
||||
>multiRobots
|
||||
>:=> (line 81, col 33) to (line 81, col 44)
|
||||
--------------------------------
|
||||
82 > console.log(multiRobotAInfo);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2299 to 2332) SpanInfo: {"start":2303,"length":28}
|
||||
>console.log(multiRobotAInfo)
|
||||
>:=> (line 82, col 4) to (line 82, col 32)
|
||||
--------------------------------
|
||||
83 >}
|
||||
|
||||
~~ => Pos: (2333 to 2334) SpanInfo: {"start":2303,"length":28}
|
||||
>console.log(multiRobotAInfo)
|
||||
>:=> (line 82, col 4) to (line 82, col 32)
|
||||
--------------------------------
|
||||
84 >for (let [...multiRobotAInfo] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2335 to 2363) SpanInfo: {"start":2345,"length":18}
|
||||
>...multiRobotAInfo
|
||||
>:=> (line 84, col 10) to (line 84, col 28)
|
||||
84 >for (let [...multiRobotAInfo] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2364 to 2387) SpanInfo: {"start":2368,"length":16}
|
||||
>getMultiRobots()
|
||||
>:=> (line 84, col 33) to (line 84, col 49)
|
||||
--------------------------------
|
||||
85 > console.log(multiRobotAInfo);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2388 to 2421) SpanInfo: {"start":2392,"length":28}
|
||||
>console.log(multiRobotAInfo)
|
||||
>:=> (line 85, col 4) to (line 85, col 32)
|
||||
--------------------------------
|
||||
86 >}
|
||||
|
||||
~~ => Pos: (2422 to 2423) SpanInfo: {"start":2392,"length":28}
|
||||
>console.log(multiRobotAInfo)
|
||||
>:=> (line 85, col 4) to (line 85, col 32)
|
||||
--------------------------------
|
||||
87 >for (let [...multiRobotAInfo] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2424 to 2452) SpanInfo: {"start":2434,"length":18}
|
||||
>...multiRobotAInfo
|
||||
>:=> (line 87, col 10) to (line 87, col 28)
|
||||
87 >for (let [...multiRobotAInfo] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2453 to 2486) SpanInfo: {"start":2457,"length":26}
|
||||
>[multiRobotA, multiRobotB]
|
||||
>:=> (line 87, col 33) to (line 87, col 59)
|
||||
--------------------------------
|
||||
88 > console.log(multiRobotAInfo);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2487 to 2520) SpanInfo: {"start":2491,"length":28}
|
||||
>console.log(multiRobotAInfo)
|
||||
>:=> (line 88, col 4) to (line 88, col 32)
|
||||
--------------------------------
|
||||
89 >}
|
||||
~ => Pos: (2521 to 2521) SpanInfo: {"start":2491,"length":28}
|
||||
>console.log(multiRobotAInfo)
|
||||
>:=> (line 88, col 4) to (line 88, col 32)
|
||||
+814
@@ -0,0 +1,814 @@
|
||||
|
||||
1 >declare var console: {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined
|
||||
--------------------------------
|
||||
2 > log(msg: any): void;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined
|
||||
--------------------------------
|
||||
3 >}
|
||||
|
||||
~~ => Pos: (48 to 49) SpanInfo: undefined
|
||||
--------------------------------
|
||||
4 >type Robot = [number, string, string];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (50 to 88) SpanInfo: undefined
|
||||
--------------------------------
|
||||
5 >type MultiSkilledRobot = [string, [string, string]];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (89 to 141) SpanInfo: undefined
|
||||
--------------------------------
|
||||
6 >let robotA: Robot = [1, "mower", "mowing"];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (142 to 185) SpanInfo: {"start":142,"length":42}
|
||||
>let robotA: Robot = [1, "mower", "mowing"]
|
||||
>:=> (line 6, col 0) to (line 6, col 42)
|
||||
--------------------------------
|
||||
7 >let robotB: Robot = [2, "trimmer", "trimming"];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (186 to 233) SpanInfo: {"start":186,"length":46}
|
||||
>let robotB: Robot = [2, "trimmer", "trimming"]
|
||||
>:=> (line 7, col 0) to (line 7, col 46)
|
||||
--------------------------------
|
||||
8 >let robots = [robotA, robotB];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (234 to 264) SpanInfo: {"start":234,"length":29}
|
||||
>let robots = [robotA, robotB]
|
||||
>:=> (line 8, col 0) to (line 8, col 29)
|
||||
--------------------------------
|
||||
9 >function getRobots() {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (265 to 287) SpanInfo: {"start":292,"length":13}
|
||||
>return robots
|
||||
>:=> (line 10, col 4) to (line 10, col 17)
|
||||
--------------------------------
|
||||
10 > return robots;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (288 to 306) SpanInfo: {"start":292,"length":13}
|
||||
>return robots
|
||||
>:=> (line 10, col 4) to (line 10, col 17)
|
||||
--------------------------------
|
||||
11 >}
|
||||
|
||||
~~ => Pos: (307 to 308) SpanInfo: {"start":307,"length":1}
|
||||
>}
|
||||
>:=> (line 11, col 0) to (line 11, col 1)
|
||||
--------------------------------
|
||||
12 >let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (309 to 372) SpanInfo: {"start":309,"length":62}
|
||||
>let multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]
|
||||
>:=> (line 12, col 0) to (line 12, col 62)
|
||||
--------------------------------
|
||||
13 >let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (373 to 446) SpanInfo: {"start":373,"length":72}
|
||||
>let multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]
|
||||
>:=> (line 13, col 0) to (line 13, col 72)
|
||||
--------------------------------
|
||||
14 >let multiRobots = [multiRobotA, multiRobotB];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (447 to 492) SpanInfo: {"start":447,"length":44}
|
||||
>let multiRobots = [multiRobotA, multiRobotB]
|
||||
>:=> (line 14, col 0) to (line 14, col 44)
|
||||
--------------------------------
|
||||
15 >function getMultiRobots() {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (493 to 520) SpanInfo: {"start":525,"length":18}
|
||||
>return multiRobots
|
||||
>:=> (line 16, col 4) to (line 16, col 22)
|
||||
--------------------------------
|
||||
16 > return multiRobots;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (521 to 544) SpanInfo: {"start":525,"length":18}
|
||||
>return multiRobots
|
||||
>:=> (line 16, col 4) to (line 16, col 22)
|
||||
--------------------------------
|
||||
17 >}
|
||||
|
||||
~~ => Pos: (545 to 546) SpanInfo: {"start":545,"length":1}
|
||||
>}
|
||||
>:=> (line 17, col 0) to (line 17, col 1)
|
||||
--------------------------------
|
||||
18 >for (let [, nameA = "noName"] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (547 to 575) SpanInfo: {"start":559,"length":16}
|
||||
>nameA = "noName"
|
||||
>:=> (line 18, col 12) to (line 18, col 28)
|
||||
18 >for (let [, nameA = "noName"] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (576 to 589) SpanInfo: {"start":580,"length":6}
|
||||
>robots
|
||||
>:=> (line 18, col 33) to (line 18, col 39)
|
||||
--------------------------------
|
||||
19 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (590 to 613) SpanInfo: {"start":594,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 19, col 4) to (line 19, col 22)
|
||||
--------------------------------
|
||||
20 >}
|
||||
|
||||
~~ => Pos: (614 to 615) SpanInfo: {"start":594,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 19, col 4) to (line 19, col 22)
|
||||
--------------------------------
|
||||
21 >for (let [, nameA = "noName"] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (616 to 644) SpanInfo: {"start":628,"length":16}
|
||||
>nameA = "noName"
|
||||
>:=> (line 21, col 12) to (line 21, col 28)
|
||||
21 >for (let [, nameA = "noName"] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (645 to 663) SpanInfo: {"start":649,"length":11}
|
||||
>getRobots()
|
||||
>:=> (line 21, col 33) to (line 21, col 44)
|
||||
--------------------------------
|
||||
22 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (664 to 687) SpanInfo: {"start":668,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 22, col 4) to (line 22, col 22)
|
||||
--------------------------------
|
||||
23 >}
|
||||
|
||||
~~ => Pos: (688 to 689) SpanInfo: {"start":668,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 22, col 4) to (line 22, col 22)
|
||||
--------------------------------
|
||||
24 >for (let [, nameA = "noName"] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (690 to 718) SpanInfo: {"start":702,"length":16}
|
||||
>nameA = "noName"
|
||||
>:=> (line 24, col 12) to (line 24, col 28)
|
||||
24 >for (let [, nameA = "noName"] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (719 to 742) SpanInfo: {"start":723,"length":16}
|
||||
>[robotA, robotB]
|
||||
>:=> (line 24, col 33) to (line 24, col 49)
|
||||
--------------------------------
|
||||
25 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (743 to 766) SpanInfo: {"start":747,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 25, col 4) to (line 25, col 22)
|
||||
--------------------------------
|
||||
26 >}
|
||||
|
||||
~~ => Pos: (767 to 768) SpanInfo: {"start":747,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 25, col 4) to (line 25, col 22)
|
||||
--------------------------------
|
||||
27 >for (let [, [
|
||||
|
||||
~~~~~~~~~~~ => Pos: (769 to 779) SpanInfo: {"start":781,"length":91}
|
||||
>[
|
||||
> primarySkillA = "primary",
|
||||
> secondarySkillA = "secondary"
|
||||
>] = ["skill1", "skill2"]
|
||||
>:=> (line 27, col 12) to (line 30, col 24)
|
||||
27 >for (let [, [
|
||||
|
||||
~~~ => Pos: (780 to 782) SpanInfo: {"start":787,"length":25}
|
||||
>primarySkillA = "primary"
|
||||
>:=> (line 28, col 4) to (line 28, col 29)
|
||||
--------------------------------
|
||||
28 > primarySkillA = "primary",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (783 to 813) SpanInfo: {"start":787,"length":25}
|
||||
>primarySkillA = "primary"
|
||||
>:=> (line 28, col 4) to (line 28, col 29)
|
||||
--------------------------------
|
||||
29 > secondarySkillA = "secondary"
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (814 to 847) SpanInfo: {"start":818,"length":29}
|
||||
>secondarySkillA = "secondary"
|
||||
>:=> (line 29, col 4) to (line 29, col 33)
|
||||
--------------------------------
|
||||
30 >] = ["skill1", "skill2"]] of multiRobots) {
|
||||
|
||||
~ => Pos: (848 to 848) SpanInfo: {"start":818,"length":29}
|
||||
>secondarySkillA = "secondary"
|
||||
>:=> (line 29, col 4) to (line 29, col 33)
|
||||
30 >] = ["skill1", "skill2"]] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (849 to 872) SpanInfo: {"start":781,"length":91}
|
||||
>[
|
||||
> primarySkillA = "primary",
|
||||
> secondarySkillA = "secondary"
|
||||
>] = ["skill1", "skill2"]
|
||||
>:=> (line 27, col 12) to (line 30, col 24)
|
||||
30 >] = ["skill1", "skill2"]] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (873 to 891) SpanInfo: {"start":877,"length":11}
|
||||
>multiRobots
|
||||
>:=> (line 30, col 29) to (line 30, col 40)
|
||||
--------------------------------
|
||||
31 > console.log(primarySkillA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (892 to 923) SpanInfo: {"start":896,"length":26}
|
||||
>console.log(primarySkillA)
|
||||
>:=> (line 31, col 4) to (line 31, col 30)
|
||||
--------------------------------
|
||||
32 >}
|
||||
|
||||
~~ => Pos: (924 to 925) SpanInfo: {"start":896,"length":26}
|
||||
>console.log(primarySkillA)
|
||||
>:=> (line 31, col 4) to (line 31, col 30)
|
||||
--------------------------------
|
||||
33 >for (let [, [
|
||||
|
||||
~~~~~~~~~~~ => Pos: (926 to 936) SpanInfo: {"start":938,"length":91}
|
||||
>[
|
||||
> primarySkillA = "primary",
|
||||
> secondarySkillA = "secondary"
|
||||
>] = ["skill1", "skill2"]
|
||||
>:=> (line 33, col 12) to (line 36, col 24)
|
||||
33 >for (let [, [
|
||||
|
||||
~~~ => Pos: (937 to 939) SpanInfo: {"start":944,"length":25}
|
||||
>primarySkillA = "primary"
|
||||
>:=> (line 34, col 4) to (line 34, col 29)
|
||||
--------------------------------
|
||||
34 > primarySkillA = "primary",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (940 to 970) SpanInfo: {"start":944,"length":25}
|
||||
>primarySkillA = "primary"
|
||||
>:=> (line 34, col 4) to (line 34, col 29)
|
||||
--------------------------------
|
||||
35 > secondarySkillA = "secondary"
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (971 to 1004) SpanInfo: {"start":975,"length":29}
|
||||
>secondarySkillA = "secondary"
|
||||
>:=> (line 35, col 4) to (line 35, col 33)
|
||||
--------------------------------
|
||||
36 >] = ["skill1", "skill2"]] of getMultiRobots()) {
|
||||
|
||||
~ => Pos: (1005 to 1005) SpanInfo: {"start":975,"length":29}
|
||||
>secondarySkillA = "secondary"
|
||||
>:=> (line 35, col 4) to (line 35, col 33)
|
||||
36 >] = ["skill1", "skill2"]] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1006 to 1029) SpanInfo: {"start":938,"length":91}
|
||||
>[
|
||||
> primarySkillA = "primary",
|
||||
> secondarySkillA = "secondary"
|
||||
>] = ["skill1", "skill2"]
|
||||
>:=> (line 33, col 12) to (line 36, col 24)
|
||||
36 >] = ["skill1", "skill2"]] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1030 to 1053) SpanInfo: {"start":1034,"length":16}
|
||||
>getMultiRobots()
|
||||
>:=> (line 36, col 29) to (line 36, col 45)
|
||||
--------------------------------
|
||||
37 > console.log(primarySkillA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1054 to 1085) SpanInfo: {"start":1058,"length":26}
|
||||
>console.log(primarySkillA)
|
||||
>:=> (line 37, col 4) to (line 37, col 30)
|
||||
--------------------------------
|
||||
38 >}
|
||||
|
||||
~~ => Pos: (1086 to 1087) SpanInfo: {"start":1058,"length":26}
|
||||
>console.log(primarySkillA)
|
||||
>:=> (line 37, col 4) to (line 37, col 30)
|
||||
--------------------------------
|
||||
39 >for (let [, [
|
||||
|
||||
~~~~~~~~~~~ => Pos: (1088 to 1098) SpanInfo: {"start":1100,"length":91}
|
||||
>[
|
||||
> primarySkillA = "primary",
|
||||
> secondarySkillA = "secondary"
|
||||
>] = ["skill1", "skill2"]
|
||||
>:=> (line 39, col 12) to (line 42, col 24)
|
||||
39 >for (let [, [
|
||||
|
||||
~~~ => Pos: (1099 to 1101) SpanInfo: {"start":1106,"length":25}
|
||||
>primarySkillA = "primary"
|
||||
>:=> (line 40, col 4) to (line 40, col 29)
|
||||
--------------------------------
|
||||
40 > primarySkillA = "primary",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1102 to 1132) SpanInfo: {"start":1106,"length":25}
|
||||
>primarySkillA = "primary"
|
||||
>:=> (line 40, col 4) to (line 40, col 29)
|
||||
--------------------------------
|
||||
41 > secondarySkillA = "secondary"
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1133 to 1166) SpanInfo: {"start":1137,"length":29}
|
||||
>secondarySkillA = "secondary"
|
||||
>:=> (line 41, col 4) to (line 41, col 33)
|
||||
--------------------------------
|
||||
42 >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~ => Pos: (1167 to 1167) SpanInfo: {"start":1137,"length":29}
|
||||
>secondarySkillA = "secondary"
|
||||
>:=> (line 41, col 4) to (line 41, col 33)
|
||||
42 >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1168 to 1191) SpanInfo: {"start":1100,"length":91}
|
||||
>[
|
||||
> primarySkillA = "primary",
|
||||
> secondarySkillA = "secondary"
|
||||
>] = ["skill1", "skill2"]
|
||||
>:=> (line 39, col 12) to (line 42, col 24)
|
||||
42 >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1192 to 1225) SpanInfo: {"start":1196,"length":26}
|
||||
>[multiRobotA, multiRobotB]
|
||||
>:=> (line 42, col 29) to (line 42, col 55)
|
||||
--------------------------------
|
||||
43 > console.log(primarySkillA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1226 to 1257) SpanInfo: {"start":1230,"length":26}
|
||||
>console.log(primarySkillA)
|
||||
>:=> (line 43, col 4) to (line 43, col 30)
|
||||
--------------------------------
|
||||
44 >}
|
||||
|
||||
~~ => Pos: (1258 to 1259) SpanInfo: {"start":1230,"length":26}
|
||||
>console.log(primarySkillA)
|
||||
>:=> (line 43, col 4) to (line 43, col 30)
|
||||
--------------------------------
|
||||
45 >for (let [numberB = -1] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1260 to 1282) SpanInfo: {"start":1270,"length":12}
|
||||
>numberB = -1
|
||||
>:=> (line 45, col 10) to (line 45, col 22)
|
||||
45 >for (let [numberB = -1] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (1283 to 1296) SpanInfo: {"start":1287,"length":6}
|
||||
>robots
|
||||
>:=> (line 45, col 27) to (line 45, col 33)
|
||||
--------------------------------
|
||||
46 > console.log(numberB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1297 to 1322) SpanInfo: {"start":1301,"length":20}
|
||||
>console.log(numberB)
|
||||
>:=> (line 46, col 4) to (line 46, col 24)
|
||||
--------------------------------
|
||||
47 >}
|
||||
|
||||
~~ => Pos: (1323 to 1324) SpanInfo: {"start":1301,"length":20}
|
||||
>console.log(numberB)
|
||||
>:=> (line 46, col 4) to (line 46, col 24)
|
||||
--------------------------------
|
||||
48 >for (let [numberB = -1] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1325 to 1347) SpanInfo: {"start":1335,"length":12}
|
||||
>numberB = -1
|
||||
>:=> (line 48, col 10) to (line 48, col 22)
|
||||
48 >for (let [numberB = -1] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (1348 to 1366) SpanInfo: {"start":1352,"length":11}
|
||||
>getRobots()
|
||||
>:=> (line 48, col 27) to (line 48, col 38)
|
||||
--------------------------------
|
||||
49 > console.log(numberB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1367 to 1392) SpanInfo: {"start":1371,"length":20}
|
||||
>console.log(numberB)
|
||||
>:=> (line 49, col 4) to (line 49, col 24)
|
||||
--------------------------------
|
||||
50 >}
|
||||
|
||||
~~ => Pos: (1393 to 1394) SpanInfo: {"start":1371,"length":20}
|
||||
>console.log(numberB)
|
||||
>:=> (line 49, col 4) to (line 49, col 24)
|
||||
--------------------------------
|
||||
51 >for (let [numberB = -1] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1395 to 1417) SpanInfo: {"start":1405,"length":12}
|
||||
>numberB = -1
|
||||
>:=> (line 51, col 10) to (line 51, col 22)
|
||||
51 >for (let [numberB = -1] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1418 to 1441) SpanInfo: {"start":1422,"length":16}
|
||||
>[robotA, robotB]
|
||||
>:=> (line 51, col 27) to (line 51, col 43)
|
||||
--------------------------------
|
||||
52 > console.log(numberB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1442 to 1467) SpanInfo: {"start":1446,"length":20}
|
||||
>console.log(numberB)
|
||||
>:=> (line 52, col 4) to (line 52, col 24)
|
||||
--------------------------------
|
||||
53 >}
|
||||
|
||||
~~ => Pos: (1468 to 1469) SpanInfo: {"start":1446,"length":20}
|
||||
>console.log(numberB)
|
||||
>:=> (line 52, col 4) to (line 52, col 24)
|
||||
--------------------------------
|
||||
54 >for (let [nameB = "noName"] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1470 to 1496) SpanInfo: {"start":1480,"length":16}
|
||||
>nameB = "noName"
|
||||
>:=> (line 54, col 10) to (line 54, col 26)
|
||||
54 >for (let [nameB = "noName"] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (1497 to 1515) SpanInfo: {"start":1501,"length":11}
|
||||
>multiRobots
|
||||
>:=> (line 54, col 31) to (line 54, col 42)
|
||||
--------------------------------
|
||||
55 > console.log(nameB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1516 to 1539) SpanInfo: {"start":1520,"length":18}
|
||||
>console.log(nameB)
|
||||
>:=> (line 55, col 4) to (line 55, col 22)
|
||||
--------------------------------
|
||||
56 >}
|
||||
|
||||
~~ => Pos: (1540 to 1541) SpanInfo: {"start":1520,"length":18}
|
||||
>console.log(nameB)
|
||||
>:=> (line 55, col 4) to (line 55, col 22)
|
||||
--------------------------------
|
||||
57 >for (let [nameB = "noName"] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1542 to 1568) SpanInfo: {"start":1552,"length":16}
|
||||
>nameB = "noName"
|
||||
>:=> (line 57, col 10) to (line 57, col 26)
|
||||
57 >for (let [nameB = "noName"] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1569 to 1592) SpanInfo: {"start":1573,"length":16}
|
||||
>getMultiRobots()
|
||||
>:=> (line 57, col 31) to (line 57, col 47)
|
||||
--------------------------------
|
||||
58 > console.log(nameB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1593 to 1616) SpanInfo: {"start":1597,"length":18}
|
||||
>console.log(nameB)
|
||||
>:=> (line 58, col 4) to (line 58, col 22)
|
||||
--------------------------------
|
||||
59 >}
|
||||
|
||||
~~ => Pos: (1617 to 1618) SpanInfo: {"start":1597,"length":18}
|
||||
>console.log(nameB)
|
||||
>:=> (line 58, col 4) to (line 58, col 22)
|
||||
--------------------------------
|
||||
60 >for (let [nameB = "noName"] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1619 to 1645) SpanInfo: {"start":1629,"length":16}
|
||||
>nameB = "noName"
|
||||
>:=> (line 60, col 10) to (line 60, col 26)
|
||||
60 >for (let [nameB = "noName"] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1646 to 1679) SpanInfo: {"start":1650,"length":26}
|
||||
>[multiRobotA, multiRobotB]
|
||||
>:=> (line 60, col 31) to (line 60, col 57)
|
||||
--------------------------------
|
||||
61 > console.log(nameB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1680 to 1703) SpanInfo: {"start":1684,"length":18}
|
||||
>console.log(nameB)
|
||||
>:=> (line 61, col 4) to (line 61, col 22)
|
||||
--------------------------------
|
||||
62 >}
|
||||
|
||||
~~ => Pos: (1704 to 1705) SpanInfo: {"start":1684,"length":18}
|
||||
>console.log(nameB)
|
||||
>:=> (line 61, col 4) to (line 61, col 22)
|
||||
--------------------------------
|
||||
63 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1706 to 1729) SpanInfo: {"start":1716,"length":13}
|
||||
>numberA2 = -1
|
||||
>:=> (line 63, col 10) to (line 63, col 23)
|
||||
63 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (1730 to 1748) SpanInfo: {"start":1731,"length":17}
|
||||
>nameA2 = "noName"
|
||||
>:=> (line 63, col 25) to (line 63, col 42)
|
||||
63 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (1749 to 1767) SpanInfo: {"start":1750,"length":17}
|
||||
>skillA2 = "skill"
|
||||
>:=> (line 63, col 44) to (line 63, col 61)
|
||||
63 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~=> Pos: (1768 to 1781) SpanInfo: {"start":1772,"length":6}
|
||||
>robots
|
||||
>:=> (line 63, col 66) to (line 63, col 72)
|
||||
--------------------------------
|
||||
64 > console.log(nameA2);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1782 to 1806) SpanInfo: {"start":1786,"length":19}
|
||||
>console.log(nameA2)
|
||||
>:=> (line 64, col 4) to (line 64, col 23)
|
||||
--------------------------------
|
||||
65 >}
|
||||
|
||||
~~ => Pos: (1807 to 1808) SpanInfo: {"start":1786,"length":19}
|
||||
>console.log(nameA2)
|
||||
>:=> (line 64, col 4) to (line 64, col 23)
|
||||
--------------------------------
|
||||
66 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1809 to 1832) SpanInfo: {"start":1819,"length":13}
|
||||
>numberA2 = -1
|
||||
>:=> (line 66, col 10) to (line 66, col 23)
|
||||
66 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (1833 to 1851) SpanInfo: {"start":1834,"length":17}
|
||||
>nameA2 = "noName"
|
||||
>:=> (line 66, col 25) to (line 66, col 42)
|
||||
66 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (1852 to 1870) SpanInfo: {"start":1853,"length":17}
|
||||
>skillA2 = "skill"
|
||||
>:=> (line 66, col 44) to (line 66, col 61)
|
||||
66 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (1871 to 1889) SpanInfo: {"start":1875,"length":11}
|
||||
>getRobots()
|
||||
>:=> (line 66, col 66) to (line 66, col 77)
|
||||
--------------------------------
|
||||
67 > console.log(nameA2);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1890 to 1914) SpanInfo: {"start":1894,"length":19}
|
||||
>console.log(nameA2)
|
||||
>:=> (line 67, col 4) to (line 67, col 23)
|
||||
--------------------------------
|
||||
68 >}
|
||||
|
||||
~~ => Pos: (1915 to 1916) SpanInfo: {"start":1894,"length":19}
|
||||
>console.log(nameA2)
|
||||
>:=> (line 67, col 4) to (line 67, col 23)
|
||||
--------------------------------
|
||||
69 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1917 to 1940) SpanInfo: {"start":1927,"length":13}
|
||||
>numberA2 = -1
|
||||
>:=> (line 69, col 10) to (line 69, col 23)
|
||||
69 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (1941 to 1959) SpanInfo: {"start":1942,"length":17}
|
||||
>nameA2 = "noName"
|
||||
>:=> (line 69, col 25) to (line 69, col 42)
|
||||
69 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (1960 to 1978) SpanInfo: {"start":1961,"length":17}
|
||||
>skillA2 = "skill"
|
||||
>:=> (line 69, col 44) to (line 69, col 61)
|
||||
69 >for (let [numberA2 = -1, nameA2 = "noName", skillA2 = "skill"] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1979 to 2002) SpanInfo: {"start":1983,"length":16}
|
||||
>[robotA, robotB]
|
||||
>:=> (line 69, col 66) to (line 69, col 82)
|
||||
--------------------------------
|
||||
70 > console.log(nameA2);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2003 to 2027) SpanInfo: {"start":2007,"length":19}
|
||||
>console.log(nameA2)
|
||||
>:=> (line 70, col 4) to (line 70, col 23)
|
||||
--------------------------------
|
||||
71 >}
|
||||
|
||||
~~ => Pos: (2028 to 2029) SpanInfo: {"start":2007,"length":19}
|
||||
>console.log(nameA2)
|
||||
>:=> (line 70, col 4) to (line 70, col 23)
|
||||
--------------------------------
|
||||
72 >for (let [nameMA = "noName", [
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2030 to 2057) SpanInfo: {"start":2040,"length":17}
|
||||
>nameMA = "noName"
|
||||
>:=> (line 72, col 10) to (line 72, col 27)
|
||||
72 >for (let [nameMA = "noName", [
|
||||
|
||||
~~~ => Pos: (2058 to 2060) SpanInfo: {"start":2065,"length":25}
|
||||
>primarySkillA = "primary"
|
||||
>:=> (line 73, col 4) to (line 73, col 29)
|
||||
--------------------------------
|
||||
73 > primarySkillA = "primary",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2061 to 2091) SpanInfo: {"start":2065,"length":25}
|
||||
>primarySkillA = "primary"
|
||||
>:=> (line 73, col 4) to (line 73, col 29)
|
||||
--------------------------------
|
||||
74 > secondarySkillA = "secondary"
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2092 to 2125) SpanInfo: {"start":2096,"length":29}
|
||||
>secondarySkillA = "secondary"
|
||||
>:=> (line 74, col 4) to (line 74, col 33)
|
||||
--------------------------------
|
||||
75 >] = ["skill1", "skill2"]] of multiRobots) {
|
||||
|
||||
~ => Pos: (2126 to 2126) SpanInfo: {"start":2096,"length":29}
|
||||
>secondarySkillA = "secondary"
|
||||
>:=> (line 74, col 4) to (line 74, col 33)
|
||||
75 >] = ["skill1", "skill2"]] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2127 to 2150) SpanInfo: {"start":2059,"length":91}
|
||||
>[
|
||||
> primarySkillA = "primary",
|
||||
> secondarySkillA = "secondary"
|
||||
>] = ["skill1", "skill2"]
|
||||
>:=> (line 72, col 29) to (line 75, col 24)
|
||||
75 >] = ["skill1", "skill2"]] of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (2151 to 2169) SpanInfo: {"start":2155,"length":11}
|
||||
>multiRobots
|
||||
>:=> (line 75, col 29) to (line 75, col 40)
|
||||
--------------------------------
|
||||
76 > console.log(nameMA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2170 to 2194) SpanInfo: {"start":2174,"length":19}
|
||||
>console.log(nameMA)
|
||||
>:=> (line 76, col 4) to (line 76, col 23)
|
||||
--------------------------------
|
||||
77 >}
|
||||
|
||||
~~ => Pos: (2195 to 2196) SpanInfo: {"start":2174,"length":19}
|
||||
>console.log(nameMA)
|
||||
>:=> (line 76, col 4) to (line 76, col 23)
|
||||
--------------------------------
|
||||
78 >for (let [nameMA = "noName", [
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2197 to 2224) SpanInfo: {"start":2207,"length":17}
|
||||
>nameMA = "noName"
|
||||
>:=> (line 78, col 10) to (line 78, col 27)
|
||||
78 >for (let [nameMA = "noName", [
|
||||
|
||||
~~~ => Pos: (2225 to 2227) SpanInfo: {"start":2232,"length":25}
|
||||
>primarySkillA = "primary"
|
||||
>:=> (line 79, col 4) to (line 79, col 29)
|
||||
--------------------------------
|
||||
79 > primarySkillA = "primary",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2228 to 2258) SpanInfo: {"start":2232,"length":25}
|
||||
>primarySkillA = "primary"
|
||||
>:=> (line 79, col 4) to (line 79, col 29)
|
||||
--------------------------------
|
||||
80 > secondarySkillA = "secondary"
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2259 to 2292) SpanInfo: {"start":2263,"length":29}
|
||||
>secondarySkillA = "secondary"
|
||||
>:=> (line 80, col 4) to (line 80, col 33)
|
||||
--------------------------------
|
||||
81 >] = ["skill1", "skill2"]] of getMultiRobots()) {
|
||||
|
||||
~ => Pos: (2293 to 2293) SpanInfo: {"start":2263,"length":29}
|
||||
>secondarySkillA = "secondary"
|
||||
>:=> (line 80, col 4) to (line 80, col 33)
|
||||
81 >] = ["skill1", "skill2"]] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2294 to 2317) SpanInfo: {"start":2226,"length":91}
|
||||
>[
|
||||
> primarySkillA = "primary",
|
||||
> secondarySkillA = "secondary"
|
||||
>] = ["skill1", "skill2"]
|
||||
>:=> (line 78, col 29) to (line 81, col 24)
|
||||
81 >] = ["skill1", "skill2"]] of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2318 to 2341) SpanInfo: {"start":2322,"length":16}
|
||||
>getMultiRobots()
|
||||
>:=> (line 81, col 29) to (line 81, col 45)
|
||||
--------------------------------
|
||||
82 > console.log(nameMA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2342 to 2366) SpanInfo: {"start":2346,"length":19}
|
||||
>console.log(nameMA)
|
||||
>:=> (line 82, col 4) to (line 82, col 23)
|
||||
--------------------------------
|
||||
83 >}
|
||||
|
||||
~~ => Pos: (2367 to 2368) SpanInfo: {"start":2346,"length":19}
|
||||
>console.log(nameMA)
|
||||
>:=> (line 82, col 4) to (line 82, col 23)
|
||||
--------------------------------
|
||||
84 >for (let [nameMA = "noName", [
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2369 to 2396) SpanInfo: {"start":2379,"length":17}
|
||||
>nameMA = "noName"
|
||||
>:=> (line 84, col 10) to (line 84, col 27)
|
||||
84 >for (let [nameMA = "noName", [
|
||||
|
||||
~~~ => Pos: (2397 to 2399) SpanInfo: {"start":2404,"length":25}
|
||||
>primarySkillA = "primary"
|
||||
>:=> (line 85, col 4) to (line 85, col 29)
|
||||
--------------------------------
|
||||
85 > primarySkillA = "primary",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2400 to 2430) SpanInfo: {"start":2404,"length":25}
|
||||
>primarySkillA = "primary"
|
||||
>:=> (line 85, col 4) to (line 85, col 29)
|
||||
--------------------------------
|
||||
86 > secondarySkillA = "secondary"
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2431 to 2464) SpanInfo: {"start":2435,"length":29}
|
||||
>secondarySkillA = "secondary"
|
||||
>:=> (line 86, col 4) to (line 86, col 33)
|
||||
--------------------------------
|
||||
87 >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~ => Pos: (2465 to 2465) SpanInfo: {"start":2435,"length":29}
|
||||
>secondarySkillA = "secondary"
|
||||
>:=> (line 86, col 4) to (line 86, col 33)
|
||||
87 >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2466 to 2489) SpanInfo: {"start":2398,"length":91}
|
||||
>[
|
||||
> primarySkillA = "primary",
|
||||
> secondarySkillA = "secondary"
|
||||
>] = ["skill1", "skill2"]
|
||||
>:=> (line 84, col 29) to (line 87, col 24)
|
||||
87 >] = ["skill1", "skill2"]] of [multiRobotA, multiRobotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2490 to 2523) SpanInfo: {"start":2494,"length":26}
|
||||
>[multiRobotA, multiRobotB]
|
||||
>:=> (line 87, col 29) to (line 87, col 55)
|
||||
--------------------------------
|
||||
88 > console.log(nameMA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2524 to 2548) SpanInfo: {"start":2528,"length":19}
|
||||
>console.log(nameMA)
|
||||
>:=> (line 88, col 4) to (line 88, col 23)
|
||||
--------------------------------
|
||||
89 >}
|
||||
|
||||
~~ => Pos: (2549 to 2550) SpanInfo: {"start":2528,"length":19}
|
||||
>console.log(nameMA)
|
||||
>:=> (line 88, col 4) to (line 88, col 23)
|
||||
--------------------------------
|
||||
90 >for (let [numberA3 = -1, ...robotAInfo] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2551 to 2574) SpanInfo: {"start":2561,"length":13}
|
||||
>numberA3 = -1
|
||||
>:=> (line 90, col 10) to (line 90, col 23)
|
||||
90 >for (let [numberA3 = -1, ...robotAInfo] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~ => Pos: (2575 to 2589) SpanInfo: {"start":2576,"length":13}
|
||||
>...robotAInfo
|
||||
>:=> (line 90, col 25) to (line 90, col 38)
|
||||
90 >for (let [numberA3 = -1, ...robotAInfo] of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~=> Pos: (2590 to 2603) SpanInfo: {"start":2594,"length":6}
|
||||
>robots
|
||||
>:=> (line 90, col 43) to (line 90, col 49)
|
||||
--------------------------------
|
||||
91 > console.log(numberA3);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2604 to 2630) SpanInfo: {"start":2608,"length":21}
|
||||
>console.log(numberA3)
|
||||
>:=> (line 91, col 4) to (line 91, col 25)
|
||||
--------------------------------
|
||||
92 >}
|
||||
|
||||
~~ => Pos: (2631 to 2632) SpanInfo: {"start":2608,"length":21}
|
||||
>console.log(numberA3)
|
||||
>:=> (line 91, col 4) to (line 91, col 25)
|
||||
--------------------------------
|
||||
93 >for (let [numberA3 = -1, ...robotAInfo] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2633 to 2656) SpanInfo: {"start":2643,"length":13}
|
||||
>numberA3 = -1
|
||||
>:=> (line 93, col 10) to (line 93, col 23)
|
||||
93 >for (let [numberA3 = -1, ...robotAInfo] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~ => Pos: (2657 to 2671) SpanInfo: {"start":2658,"length":13}
|
||||
>...robotAInfo
|
||||
>:=> (line 93, col 25) to (line 93, col 38)
|
||||
93 >for (let [numberA3 = -1, ...robotAInfo] of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (2672 to 2690) SpanInfo: {"start":2676,"length":11}
|
||||
>getRobots()
|
||||
>:=> (line 93, col 43) to (line 93, col 54)
|
||||
--------------------------------
|
||||
94 > console.log(numberA3);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2691 to 2717) SpanInfo: {"start":2695,"length":21}
|
||||
>console.log(numberA3)
|
||||
>:=> (line 94, col 4) to (line 94, col 25)
|
||||
--------------------------------
|
||||
95 >}
|
||||
|
||||
~~ => Pos: (2718 to 2719) SpanInfo: {"start":2695,"length":21}
|
||||
>console.log(numberA3)
|
||||
>:=> (line 94, col 4) to (line 94, col 25)
|
||||
--------------------------------
|
||||
96 >for (let [numberA3 = -1, ...robotAInfo] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2720 to 2743) SpanInfo: {"start":2730,"length":13}
|
||||
>numberA3 = -1
|
||||
>:=> (line 96, col 10) to (line 96, col 23)
|
||||
96 >for (let [numberA3 = -1, ...robotAInfo] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~ => Pos: (2744 to 2758) SpanInfo: {"start":2745,"length":13}
|
||||
>...robotAInfo
|
||||
>:=> (line 96, col 25) to (line 96, col 38)
|
||||
96 >for (let [numberA3 = -1, ...robotAInfo] of [robotA, robotB]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2759 to 2782) SpanInfo: {"start":2763,"length":16}
|
||||
>[robotA, robotB]
|
||||
>:=> (line 96, col 43) to (line 96, col 59)
|
||||
--------------------------------
|
||||
97 > console.log(numberA3);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2783 to 2809) SpanInfo: {"start":2787,"length":21}
|
||||
>console.log(numberA3)
|
||||
>:=> (line 97, col 4) to (line 97, col 25)
|
||||
--------------------------------
|
||||
98 >}
|
||||
~ => Pos: (2810 to 2810) SpanInfo: {"start":2787,"length":21}
|
||||
>console.log(numberA3)
|
||||
>:=> (line 97, col 4) to (line 97, col 25)
|
||||
@@ -0,0 +1,523 @@
|
||||
|
||||
1 >declare var console: {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined
|
||||
--------------------------------
|
||||
2 > log(msg: any): void;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined
|
||||
--------------------------------
|
||||
3 >}
|
||||
|
||||
~~ => Pos: (48 to 49) SpanInfo: undefined
|
||||
--------------------------------
|
||||
4 >interface Robot {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (50 to 67) SpanInfo: undefined
|
||||
--------------------------------
|
||||
5 > name: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (68 to 85) SpanInfo: undefined
|
||||
--------------------------------
|
||||
6 > skill: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (86 to 104) SpanInfo: undefined
|
||||
--------------------------------
|
||||
7 >}
|
||||
|
||||
~~ => Pos: (105 to 106) SpanInfo: undefined
|
||||
--------------------------------
|
||||
8 >interface MultiRobot {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (107 to 129) SpanInfo: undefined
|
||||
--------------------------------
|
||||
9 > name: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (130 to 147) SpanInfo: undefined
|
||||
--------------------------------
|
||||
10 > skills: {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (148 to 161) SpanInfo: undefined
|
||||
--------------------------------
|
||||
11 > primary: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (162 to 186) SpanInfo: undefined
|
||||
--------------------------------
|
||||
12 > secondary: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (187 to 213) SpanInfo: undefined
|
||||
--------------------------------
|
||||
13 > };
|
||||
|
||||
~~~~~~~ => Pos: (214 to 220) SpanInfo: undefined
|
||||
--------------------------------
|
||||
14 >}
|
||||
|
||||
~~ => Pos: (221 to 222) SpanInfo: undefined
|
||||
--------------------------------
|
||||
15 >let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (223 to 322) SpanInfo: {"start":223,"length":98}
|
||||
>let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]
|
||||
>:=> (line 15, col 0) to (line 15, col 98)
|
||||
--------------------------------
|
||||
16 >let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (323 to 424) SpanInfo: {"start":323,"length":180}
|
||||
>let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]
|
||||
>:=> (line 16, col 0) to (line 17, col 78)
|
||||
--------------------------------
|
||||
17 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (425 to 504) SpanInfo: {"start":323,"length":180}
|
||||
>let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]
|
||||
>:=> (line 16, col 0) to (line 17, col 78)
|
||||
--------------------------------
|
||||
18 >function getRobots() {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (505 to 527) SpanInfo: {"start":532,"length":13}
|
||||
>return robots
|
||||
>:=> (line 19, col 4) to (line 19, col 17)
|
||||
--------------------------------
|
||||
19 > return robots;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (528 to 546) SpanInfo: {"start":532,"length":13}
|
||||
>return robots
|
||||
>:=> (line 19, col 4) to (line 19, col 17)
|
||||
--------------------------------
|
||||
20 >}
|
||||
|
||||
~~ => Pos: (547 to 548) SpanInfo: {"start":547,"length":1}
|
||||
>}
|
||||
>:=> (line 20, col 0) to (line 20, col 1)
|
||||
--------------------------------
|
||||
21 >function getMultiRobots() {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (549 to 576) SpanInfo: {"start":581,"length":18}
|
||||
>return multiRobots
|
||||
>:=> (line 22, col 4) to (line 22, col 22)
|
||||
--------------------------------
|
||||
22 > return multiRobots;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (577 to 600) SpanInfo: {"start":581,"length":18}
|
||||
>return multiRobots
|
||||
>:=> (line 22, col 4) to (line 22, col 22)
|
||||
--------------------------------
|
||||
23 >}
|
||||
|
||||
~~ => Pos: (601 to 602) SpanInfo: {"start":601,"length":1}
|
||||
>}
|
||||
>:=> (line 23, col 0) to (line 23, col 1)
|
||||
--------------------------------
|
||||
24 >for (let {name: nameA } of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (603 to 625) SpanInfo: {"start":613,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 24, col 10) to (line 24, col 21)
|
||||
24 >for (let {name: nameA } of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (626 to 639) SpanInfo: {"start":630,"length":6}
|
||||
>robots
|
||||
>:=> (line 24, col 27) to (line 24, col 33)
|
||||
--------------------------------
|
||||
25 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (640 to 663) SpanInfo: {"start":644,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 25, col 4) to (line 25, col 22)
|
||||
--------------------------------
|
||||
26 >}
|
||||
|
||||
~~ => Pos: (664 to 665) SpanInfo: {"start":644,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 25, col 4) to (line 25, col 22)
|
||||
--------------------------------
|
||||
27 >for (let {name: nameA } of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (666 to 688) SpanInfo: {"start":676,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 27, col 10) to (line 27, col 21)
|
||||
27 >for (let {name: nameA } of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (689 to 707) SpanInfo: {"start":693,"length":11}
|
||||
>getRobots()
|
||||
>:=> (line 27, col 27) to (line 27, col 38)
|
||||
--------------------------------
|
||||
28 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (708 to 731) SpanInfo: {"start":712,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 28, col 4) to (line 28, col 22)
|
||||
--------------------------------
|
||||
29 >}
|
||||
|
||||
~~ => Pos: (732 to 733) SpanInfo: {"start":712,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 28, col 4) to (line 28, col 22)
|
||||
--------------------------------
|
||||
30 >for (let {name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (734 to 756) SpanInfo: {"start":744,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 30, col 10) to (line 30, col 21)
|
||||
30 >for (let {name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (757 to 840) SpanInfo: {"start":761,"length":76}
|
||||
>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]
|
||||
>:=> (line 30, col 27) to (line 30, col 103)
|
||||
--------------------------------
|
||||
31 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (841 to 864) SpanInfo: {"start":845,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 31, col 4) to (line 31, col 22)
|
||||
--------------------------------
|
||||
32 >}
|
||||
|
||||
~~ => Pos: (865 to 866) SpanInfo: {"start":845,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 31, col 4) to (line 31, col 22)
|
||||
--------------------------------
|
||||
33 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (867 to 884) SpanInfo: {"start":878,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 33, col 11) to (line 33, col 63)
|
||||
33 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~ => Pos: (885 to 905) SpanInfo: {"start":888,"length":17}
|
||||
>primary: primaryA
|
||||
>:=> (line 33, col 21) to (line 33, col 38)
|
||||
33 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (906 to 929) SpanInfo: {"start":907,"length":21}
|
||||
>secondary: secondaryA
|
||||
>:=> (line 33, col 40) to (line 33, col 61)
|
||||
33 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) {
|
||||
|
||||
~~=> Pos: (930 to 931) SpanInfo: {"start":878,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 33, col 11) to (line 33, col 63)
|
||||
33 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (932 to 950) SpanInfo: {"start":936,"length":11}
|
||||
>multiRobots
|
||||
>:=> (line 33, col 69) to (line 33, col 80)
|
||||
--------------------------------
|
||||
34 > console.log(primaryA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (951 to 977) SpanInfo: {"start":955,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 34, col 4) to (line 34, col 25)
|
||||
--------------------------------
|
||||
35 >}
|
||||
|
||||
~~ => Pos: (978 to 979) SpanInfo: {"start":955,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 34, col 4) to (line 34, col 25)
|
||||
--------------------------------
|
||||
36 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (980 to 997) SpanInfo: {"start":991,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 36, col 11) to (line 36, col 63)
|
||||
36 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~ => Pos: (998 to 1018) SpanInfo: {"start":1001,"length":17}
|
||||
>primary: primaryA
|
||||
>:=> (line 36, col 21) to (line 36, col 38)
|
||||
36 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1019 to 1042) SpanInfo: {"start":1020,"length":21}
|
||||
>secondary: secondaryA
|
||||
>:=> (line 36, col 40) to (line 36, col 61)
|
||||
36 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) {
|
||||
|
||||
~~=> Pos: (1043 to 1044) SpanInfo: {"start":991,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 36, col 11) to (line 36, col 63)
|
||||
36 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1045 to 1068) SpanInfo: {"start":1049,"length":16}
|
||||
>getMultiRobots()
|
||||
>:=> (line 36, col 69) to (line 36, col 85)
|
||||
--------------------------------
|
||||
37 > console.log(primaryA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1069 to 1095) SpanInfo: {"start":1073,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 37, col 4) to (line 37, col 25)
|
||||
--------------------------------
|
||||
38 >}
|
||||
|
||||
~~ => Pos: (1096 to 1097) SpanInfo: {"start":1073,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 37, col 4) to (line 37, col 25)
|
||||
--------------------------------
|
||||
39 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (1098 to 1115) SpanInfo: {"start":1109,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 39, col 11) to (line 39, col 63)
|
||||
39 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~ => Pos: (1116 to 1136) SpanInfo: {"start":1119,"length":17}
|
||||
>primary: primaryA
|
||||
>:=> (line 39, col 21) to (line 39, col 38)
|
||||
39 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1137 to 1160) SpanInfo: {"start":1138,"length":21}
|
||||
>secondary: secondaryA
|
||||
>:=> (line 39, col 40) to (line 39, col 61)
|
||||
39 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~=> Pos: (1161 to 1162) SpanInfo: {"start":1109,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 39, col 11) to (line 39, col 63)
|
||||
39 >for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1163 to 1236) SpanInfo: {"start":1167,"length":148}
|
||||
>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]
|
||||
>:=> (line 39, col 69) to (line 40, col 78)
|
||||
--------------------------------
|
||||
40 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1237 to 1318) SpanInfo: {"start":1167,"length":148}
|
||||
>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]
|
||||
>:=> (line 39, col 69) to (line 40, col 78)
|
||||
--------------------------------
|
||||
41 > console.log(primaryA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1319 to 1345) SpanInfo: {"start":1323,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 41, col 4) to (line 41, col 25)
|
||||
--------------------------------
|
||||
42 >}
|
||||
|
||||
~~ => Pos: (1346 to 1347) SpanInfo: {"start":1323,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 41, col 4) to (line 41, col 25)
|
||||
--------------------------------
|
||||
43 >for (let {name: nameA, skill: skillA } of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1348 to 1369) SpanInfo: {"start":1358,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 43, col 10) to (line 43, col 21)
|
||||
43 >for (let {name: nameA, skill: skillA } of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~ => Pos: (1370 to 1385) SpanInfo: {"start":1371,"length":13}
|
||||
>skill: skillA
|
||||
>:=> (line 43, col 23) to (line 43, col 36)
|
||||
43 >for (let {name: nameA, skill: skillA } of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~=> Pos: (1386 to 1399) SpanInfo: {"start":1390,"length":6}
|
||||
>robots
|
||||
>:=> (line 43, col 42) to (line 43, col 48)
|
||||
--------------------------------
|
||||
44 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1400 to 1423) SpanInfo: {"start":1404,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 44, col 4) to (line 44, col 22)
|
||||
--------------------------------
|
||||
45 >}
|
||||
|
||||
~~ => Pos: (1424 to 1425) SpanInfo: {"start":1404,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 44, col 4) to (line 44, col 22)
|
||||
--------------------------------
|
||||
46 >for (let {name: nameA, skill: skillA } of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1426 to 1447) SpanInfo: {"start":1436,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 46, col 10) to (line 46, col 21)
|
||||
46 >for (let {name: nameA, skill: skillA } of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~ => Pos: (1448 to 1463) SpanInfo: {"start":1449,"length":13}
|
||||
>skill: skillA
|
||||
>:=> (line 46, col 23) to (line 46, col 36)
|
||||
46 >for (let {name: nameA, skill: skillA } of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (1464 to 1482) SpanInfo: {"start":1468,"length":11}
|
||||
>getRobots()
|
||||
>:=> (line 46, col 42) to (line 46, col 53)
|
||||
--------------------------------
|
||||
47 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1483 to 1506) SpanInfo: {"start":1487,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 47, col 4) to (line 47, col 22)
|
||||
--------------------------------
|
||||
48 >}
|
||||
|
||||
~~ => Pos: (1507 to 1508) SpanInfo: {"start":1487,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 47, col 4) to (line 47, col 22)
|
||||
--------------------------------
|
||||
49 >for (let {name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1509 to 1530) SpanInfo: {"start":1519,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 49, col 10) to (line 49, col 21)
|
||||
49 >for (let {name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~ => Pos: (1531 to 1546) SpanInfo: {"start":1532,"length":13}
|
||||
>skill: skillA
|
||||
>:=> (line 49, col 23) to (line 49, col 36)
|
||||
49 >for (let {name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1547 to 1630) SpanInfo: {"start":1551,"length":76}
|
||||
>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]
|
||||
>:=> (line 49, col 42) to (line 49, col 118)
|
||||
--------------------------------
|
||||
50 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1631 to 1654) SpanInfo: {"start":1635,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 50, col 4) to (line 50, col 22)
|
||||
--------------------------------
|
||||
51 >}
|
||||
|
||||
~~ => Pos: (1655 to 1656) SpanInfo: {"start":1635,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 50, col 4) to (line 50, col 22)
|
||||
--------------------------------
|
||||
52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1657 to 1678) SpanInfo: {"start":1667,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 52, col 10) to (line 52, col 21)
|
||||
52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) {
|
||||
|
||||
~~~~~~~~ => Pos: (1679 to 1686) SpanInfo: {"start":1680,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 52, col 23) to (line 52, col 75)
|
||||
52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~=> Pos: (1687 to 1707) SpanInfo: {"start":1690,"length":17}
|
||||
>primary: primaryA
|
||||
>:=> (line 52, col 33) to (line 52, col 50)
|
||||
52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1708 to 1731) SpanInfo: {"start":1709,"length":21}
|
||||
>secondary: secondaryA
|
||||
>:=> (line 52, col 52) to (line 52, col 73)
|
||||
52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) {
|
||||
|
||||
~~=> Pos: (1732 to 1733) SpanInfo: {"start":1680,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 52, col 23) to (line 52, col 75)
|
||||
52 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (1734 to 1752) SpanInfo: {"start":1738,"length":11}
|
||||
>multiRobots
|
||||
>:=> (line 52, col 81) to (line 52, col 92)
|
||||
--------------------------------
|
||||
53 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1753 to 1776) SpanInfo: {"start":1757,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 53, col 4) to (line 53, col 22)
|
||||
--------------------------------
|
||||
54 >}
|
||||
|
||||
~~ => Pos: (1777 to 1778) SpanInfo: {"start":1757,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 53, col 4) to (line 53, col 22)
|
||||
--------------------------------
|
||||
55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1779 to 1800) SpanInfo: {"start":1789,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 55, col 10) to (line 55, col 21)
|
||||
55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~ => Pos: (1801 to 1808) SpanInfo: {"start":1802,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 55, col 23) to (line 55, col 75)
|
||||
55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~=> Pos: (1809 to 1829) SpanInfo: {"start":1812,"length":17}
|
||||
>primary: primaryA
|
||||
>:=> (line 55, col 33) to (line 55, col 50)
|
||||
55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1830 to 1853) SpanInfo: {"start":1831,"length":21}
|
||||
>secondary: secondaryA
|
||||
>:=> (line 55, col 52) to (line 55, col 73)
|
||||
55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) {
|
||||
|
||||
~~=> Pos: (1854 to 1855) SpanInfo: {"start":1802,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 55, col 23) to (line 55, col 75)
|
||||
55 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1856 to 1879) SpanInfo: {"start":1860,"length":16}
|
||||
>getMultiRobots()
|
||||
>:=> (line 55, col 81) to (line 55, col 97)
|
||||
--------------------------------
|
||||
56 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1880 to 1903) SpanInfo: {"start":1884,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 56, col 4) to (line 56, col 22)
|
||||
--------------------------------
|
||||
57 >}
|
||||
|
||||
~~ => Pos: (1904 to 1905) SpanInfo: {"start":1884,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 56, col 4) to (line 56, col 22)
|
||||
--------------------------------
|
||||
58 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1906 to 1927) SpanInfo: {"start":1916,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 58, col 10) to (line 58, col 21)
|
||||
58 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~ => Pos: (1928 to 1935) SpanInfo: {"start":1929,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 58, col 23) to (line 58, col 75)
|
||||
58 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~=> Pos: (1936 to 1956) SpanInfo: {"start":1939,"length":17}
|
||||
>primary: primaryA
|
||||
>:=> (line 58, col 33) to (line 58, col 50)
|
||||
58 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1957 to 1980) SpanInfo: {"start":1958,"length":21}
|
||||
>secondary: secondaryA
|
||||
>:=> (line 58, col 52) to (line 58, col 73)
|
||||
58 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~=> Pos: (1981 to 1982) SpanInfo: {"start":1929,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 58, col 23) to (line 58, col 75)
|
||||
58 >for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1983 to 2056) SpanInfo: {"start":1987,"length":148}
|
||||
>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]
|
||||
>:=> (line 58, col 81) to (line 59, col 78)
|
||||
--------------------------------
|
||||
59 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2057 to 2138) SpanInfo: {"start":1987,"length":148}
|
||||
>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]
|
||||
>:=> (line 58, col 81) to (line 59, col 78)
|
||||
--------------------------------
|
||||
60 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2139 to 2162) SpanInfo: {"start":2143,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 60, col 4) to (line 60, col 22)
|
||||
--------------------------------
|
||||
61 >}
|
||||
~ => Pos: (2163 to 2163) SpanInfo: {"start":2143,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 60, col 4) to (line 60, col 22)
|
||||
+662
@@ -0,0 +1,662 @@
|
||||
|
||||
1 >declare var console: {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined
|
||||
--------------------------------
|
||||
2 > log(msg: any): void;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined
|
||||
--------------------------------
|
||||
3 >}
|
||||
|
||||
~~ => Pos: (48 to 49) SpanInfo: undefined
|
||||
--------------------------------
|
||||
4 >interface Robot {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (50 to 67) SpanInfo: undefined
|
||||
--------------------------------
|
||||
5 > name: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (68 to 85) SpanInfo: undefined
|
||||
--------------------------------
|
||||
6 > skill: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (86 to 104) SpanInfo: undefined
|
||||
--------------------------------
|
||||
7 >}
|
||||
|
||||
~~ => Pos: (105 to 106) SpanInfo: undefined
|
||||
--------------------------------
|
||||
8 >interface MultiRobot {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (107 to 129) SpanInfo: undefined
|
||||
--------------------------------
|
||||
9 > name: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (130 to 147) SpanInfo: undefined
|
||||
--------------------------------
|
||||
10 > skills: {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (148 to 161) SpanInfo: undefined
|
||||
--------------------------------
|
||||
11 > primary?: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (162 to 187) SpanInfo: undefined
|
||||
--------------------------------
|
||||
12 > secondary?: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (188 to 215) SpanInfo: undefined
|
||||
--------------------------------
|
||||
13 > };
|
||||
|
||||
~~~~~~~ => Pos: (216 to 222) SpanInfo: undefined
|
||||
--------------------------------
|
||||
14 >}
|
||||
|
||||
~~ => Pos: (223 to 224) SpanInfo: undefined
|
||||
--------------------------------
|
||||
15 >let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (225 to 324) SpanInfo: {"start":225,"length":98}
|
||||
>let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]
|
||||
>:=> (line 15, col 0) to (line 15, col 98)
|
||||
--------------------------------
|
||||
16 >let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (325 to 426) SpanInfo: {"start":325,"length":180}
|
||||
>let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]
|
||||
>:=> (line 16, col 0) to (line 17, col 78)
|
||||
--------------------------------
|
||||
17 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (427 to 506) SpanInfo: {"start":325,"length":180}
|
||||
>let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]
|
||||
>:=> (line 16, col 0) to (line 17, col 78)
|
||||
--------------------------------
|
||||
18 >function getRobots() {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (507 to 529) SpanInfo: {"start":534,"length":13}
|
||||
>return robots
|
||||
>:=> (line 19, col 4) to (line 19, col 17)
|
||||
--------------------------------
|
||||
19 > return robots;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (530 to 548) SpanInfo: {"start":534,"length":13}
|
||||
>return robots
|
||||
>:=> (line 19, col 4) to (line 19, col 17)
|
||||
--------------------------------
|
||||
20 >}
|
||||
|
||||
~~ => Pos: (549 to 550) SpanInfo: {"start":549,"length":1}
|
||||
>}
|
||||
>:=> (line 20, col 0) to (line 20, col 1)
|
||||
--------------------------------
|
||||
21 >function getMultiRobots() {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (551 to 578) SpanInfo: {"start":583,"length":18}
|
||||
>return multiRobots
|
||||
>:=> (line 22, col 4) to (line 22, col 22)
|
||||
--------------------------------
|
||||
22 > return multiRobots;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (579 to 602) SpanInfo: {"start":583,"length":18}
|
||||
>return multiRobots
|
||||
>:=> (line 22, col 4) to (line 22, col 22)
|
||||
--------------------------------
|
||||
23 >}
|
||||
|
||||
~~ => Pos: (603 to 604) SpanInfo: {"start":603,"length":1}
|
||||
>}
|
||||
>:=> (line 23, col 0) to (line 23, col 1)
|
||||
--------------------------------
|
||||
24 >for (let {name: nameA = "noName" } of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (605 to 638) SpanInfo: {"start":615,"length":22}
|
||||
>name: nameA = "noName"
|
||||
>:=> (line 24, col 10) to (line 24, col 32)
|
||||
24 >for (let {name: nameA = "noName" } of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~=> Pos: (639 to 652) SpanInfo: {"start":643,"length":6}
|
||||
>robots
|
||||
>:=> (line 24, col 38) to (line 24, col 44)
|
||||
--------------------------------
|
||||
25 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (653 to 676) SpanInfo: {"start":657,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 25, col 4) to (line 25, col 22)
|
||||
--------------------------------
|
||||
26 >}
|
||||
|
||||
~~ => Pos: (677 to 678) SpanInfo: {"start":657,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 25, col 4) to (line 25, col 22)
|
||||
--------------------------------
|
||||
27 >for (let {name: nameA = "noName" } of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (679 to 712) SpanInfo: {"start":689,"length":22}
|
||||
>name: nameA = "noName"
|
||||
>:=> (line 27, col 10) to (line 27, col 32)
|
||||
27 >for (let {name: nameA = "noName" } of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (713 to 731) SpanInfo: {"start":717,"length":11}
|
||||
>getRobots()
|
||||
>:=> (line 27, col 38) to (line 27, col 49)
|
||||
--------------------------------
|
||||
28 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (732 to 755) SpanInfo: {"start":736,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 28, col 4) to (line 28, col 22)
|
||||
--------------------------------
|
||||
29 >}
|
||||
|
||||
~~ => Pos: (756 to 757) SpanInfo: {"start":736,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 28, col 4) to (line 28, col 22)
|
||||
--------------------------------
|
||||
30 >for (let {name: nameA = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (758 to 791) SpanInfo: {"start":768,"length":22}
|
||||
>name: nameA = "noName"
|
||||
>:=> (line 30, col 10) to (line 30, col 32)
|
||||
30 >for (let {name: nameA = "noName" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (792 to 875) SpanInfo: {"start":796,"length":76}
|
||||
>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]
|
||||
>:=> (line 30, col 38) to (line 30, col 114)
|
||||
--------------------------------
|
||||
31 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (876 to 899) SpanInfo: {"start":880,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 31, col 4) to (line 31, col 22)
|
||||
--------------------------------
|
||||
32 >}
|
||||
|
||||
~~ => Pos: (900 to 901) SpanInfo: {"start":880,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 31, col 4) to (line 31, col 22)
|
||||
--------------------------------
|
||||
33 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } =
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (902 to 919) SpanInfo: {"start":913,"length":129}
|
||||
>skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } =
|
||||
> { primary: "nosKill", secondary: "noSkill" }
|
||||
>:=> (line 33, col 11) to (line 34, col 48)
|
||||
33 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } =
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (920 to 952) SpanInfo: {"start":923,"length":29}
|
||||
>primary: primaryA = "primary"
|
||||
>:=> (line 33, col 21) to (line 33, col 50)
|
||||
33 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } =
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (953 to 990) SpanInfo: {"start":954,"length":35}
|
||||
>secondary: secondaryA = "secondary"
|
||||
>:=> (line 33, col 52) to (line 33, col 87)
|
||||
33 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } =
|
||||
|
||||
~~~=> Pos: (991 to 993) SpanInfo: {"start":913,"length":129}
|
||||
>skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } =
|
||||
> { primary: "nosKill", secondary: "noSkill" }
|
||||
>:=> (line 33, col 11) to (line 34, col 48)
|
||||
--------------------------------
|
||||
34 > { primary: "nosKill", secondary: "noSkill" } } of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (994 to 1043) SpanInfo: {"start":913,"length":129}
|
||||
>skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } =
|
||||
> { primary: "nosKill", secondary: "noSkill" }
|
||||
>:=> (line 33, col 11) to (line 34, col 48)
|
||||
34 > { primary: "nosKill", secondary: "noSkill" } } of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (1044 to 1062) SpanInfo: {"start":1048,"length":11}
|
||||
>multiRobots
|
||||
>:=> (line 34, col 54) to (line 34, col 65)
|
||||
--------------------------------
|
||||
35 > console.log(primaryA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1063 to 1089) SpanInfo: {"start":1067,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 35, col 4) to (line 35, col 25)
|
||||
--------------------------------
|
||||
36 >}
|
||||
|
||||
~~ => Pos: (1090 to 1091) SpanInfo: {"start":1067,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 35, col 4) to (line 35, col 25)
|
||||
--------------------------------
|
||||
37 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } =
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (1092 to 1109) SpanInfo: {"start":1103,"length":129}
|
||||
>skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } =
|
||||
> { primary: "nosKill", secondary: "noSkill" }
|
||||
>:=> (line 37, col 11) to (line 38, col 48)
|
||||
37 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } =
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1110 to 1142) SpanInfo: {"start":1113,"length":29}
|
||||
>primary: primaryA = "primary"
|
||||
>:=> (line 37, col 21) to (line 37, col 50)
|
||||
37 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } =
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1143 to 1180) SpanInfo: {"start":1144,"length":35}
|
||||
>secondary: secondaryA = "secondary"
|
||||
>:=> (line 37, col 52) to (line 37, col 87)
|
||||
37 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } =
|
||||
|
||||
~~~=> Pos: (1181 to 1183) SpanInfo: {"start":1103,"length":129}
|
||||
>skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } =
|
||||
> { primary: "nosKill", secondary: "noSkill" }
|
||||
>:=> (line 37, col 11) to (line 38, col 48)
|
||||
--------------------------------
|
||||
38 > { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1184 to 1233) SpanInfo: {"start":1103,"length":129}
|
||||
>skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } =
|
||||
> { primary: "nosKill", secondary: "noSkill" }
|
||||
>:=> (line 37, col 11) to (line 38, col 48)
|
||||
38 > { primary: "nosKill", secondary: "noSkill" } } of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1234 to 1257) SpanInfo: {"start":1238,"length":16}
|
||||
>getMultiRobots()
|
||||
>:=> (line 38, col 54) to (line 38, col 70)
|
||||
--------------------------------
|
||||
39 > console.log(primaryA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1258 to 1284) SpanInfo: {"start":1262,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 39, col 4) to (line 39, col 25)
|
||||
--------------------------------
|
||||
40 >}
|
||||
|
||||
~~ => Pos: (1285 to 1286) SpanInfo: {"start":1262,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 39, col 4) to (line 39, col 25)
|
||||
--------------------------------
|
||||
41 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } =
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (1287 to 1304) SpanInfo: {"start":1298,"length":129}
|
||||
>skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } =
|
||||
> { primary: "nosKill", secondary: "noSkill" }
|
||||
>:=> (line 41, col 11) to (line 42, col 48)
|
||||
41 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } =
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1305 to 1337) SpanInfo: {"start":1308,"length":29}
|
||||
>primary: primaryA = "primary"
|
||||
>:=> (line 41, col 21) to (line 41, col 50)
|
||||
41 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } =
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1338 to 1375) SpanInfo: {"start":1339,"length":35}
|
||||
>secondary: secondaryA = "secondary"
|
||||
>:=> (line 41, col 52) to (line 41, col 87)
|
||||
41 >for (let { skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } =
|
||||
|
||||
~~~=> Pos: (1376 to 1378) SpanInfo: {"start":1298,"length":129}
|
||||
>skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } =
|
||||
> { primary: "nosKill", secondary: "noSkill" }
|
||||
>:=> (line 41, col 11) to (line 42, col 48)
|
||||
--------------------------------
|
||||
42 > { primary: "nosKill", secondary: "noSkill" } } of
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1379 to 1428) SpanInfo: {"start":1298,"length":129}
|
||||
>skills: { primary: primaryA = "primary", secondary: secondaryA = "secondary" } =
|
||||
> { primary: "nosKill", secondary: "noSkill" }
|
||||
>:=> (line 41, col 11) to (line 42, col 48)
|
||||
42 > { primary: "nosKill", secondary: "noSkill" } } of
|
||||
|
||||
~~~~=> Pos: (1429 to 1432) SpanInfo: {"start":1437,"length":162}
|
||||
><MultiRobot[]>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]
|
||||
>:=> (line 43, col 4) to (line 44, col 78)
|
||||
--------------------------------
|
||||
43 > <MultiRobot[]>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1433 to 1520) SpanInfo: {"start":1437,"length":162}
|
||||
><MultiRobot[]>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]
|
||||
>:=> (line 43, col 4) to (line 44, col 78)
|
||||
--------------------------------
|
||||
44 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1521 to 1602) SpanInfo: {"start":1437,"length":162}
|
||||
><MultiRobot[]>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]
|
||||
>:=> (line 43, col 4) to (line 44, col 78)
|
||||
--------------------------------
|
||||
45 > console.log(primaryA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1603 to 1629) SpanInfo: {"start":1607,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 45, col 4) to (line 45, col 25)
|
||||
--------------------------------
|
||||
46 >}
|
||||
|
||||
~~ => Pos: (1630 to 1631) SpanInfo: {"start":1607,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 45, col 4) to (line 45, col 25)
|
||||
--------------------------------
|
||||
47 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1632 to 1664) SpanInfo: {"start":1642,"length":22}
|
||||
>name: nameA = "noName"
|
||||
>:=> (line 47, col 10) to (line 47, col 32)
|
||||
47 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1665 to 1692) SpanInfo: {"start":1666,"length":25}
|
||||
>skill: skillA = "noSkill"
|
||||
>:=> (line 47, col 34) to (line 47, col 59)
|
||||
47 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of robots) {
|
||||
|
||||
~~~~~~~~~~~~~~=> Pos: (1693 to 1706) SpanInfo: {"start":1697,"length":6}
|
||||
>robots
|
||||
>:=> (line 47, col 65) to (line 47, col 71)
|
||||
--------------------------------
|
||||
48 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1707 to 1730) SpanInfo: {"start":1711,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 48, col 4) to (line 48, col 22)
|
||||
--------------------------------
|
||||
49 >}
|
||||
|
||||
~~ => Pos: (1731 to 1732) SpanInfo: {"start":1711,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 48, col 4) to (line 48, col 22)
|
||||
--------------------------------
|
||||
50 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1733 to 1765) SpanInfo: {"start":1743,"length":22}
|
||||
>name: nameA = "noName"
|
||||
>:=> (line 50, col 10) to (line 50, col 32)
|
||||
50 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1766 to 1794) SpanInfo: {"start":1767,"length":25}
|
||||
>skill: skillA = "noSkill"
|
||||
>:=> (line 50, col 34) to (line 50, col 59)
|
||||
50 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of getRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~=> Pos: (1795 to 1813) SpanInfo: {"start":1799,"length":11}
|
||||
>getRobots()
|
||||
>:=> (line 50, col 66) to (line 50, col 77)
|
||||
--------------------------------
|
||||
51 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1814 to 1837) SpanInfo: {"start":1818,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 51, col 4) to (line 51, col 22)
|
||||
--------------------------------
|
||||
52 >}
|
||||
|
||||
~~ => Pos: (1838 to 1839) SpanInfo: {"start":1818,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 51, col 4) to (line 51, col 22)
|
||||
--------------------------------
|
||||
53 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1840 to 1872) SpanInfo: {"start":1850,"length":22}
|
||||
>name: nameA = "noName"
|
||||
>:=> (line 53, col 10) to (line 53, col 32)
|
||||
53 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1873 to 1901) SpanInfo: {"start":1874,"length":25}
|
||||
>skill: skillA = "noSkill"
|
||||
>:=> (line 53, col 34) to (line 53, col 59)
|
||||
53 >for (let {name: nameA = "noName", skill: skillA = "noSkill" } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1902 to 1985) SpanInfo: {"start":1906,"length":76}
|
||||
>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]
|
||||
>:=> (line 53, col 66) to (line 53, col 142)
|
||||
--------------------------------
|
||||
54 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1986 to 2009) SpanInfo: {"start":1990,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 54, col 4) to (line 54, col 22)
|
||||
--------------------------------
|
||||
55 >}
|
||||
|
||||
~~ => Pos: (2010 to 2011) SpanInfo: {"start":1990,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 54, col 4) to (line 54, col 22)
|
||||
--------------------------------
|
||||
56 >for (let {
|
||||
|
||||
~~~~~~~~~~~ => Pos: (2012 to 2022) SpanInfo: {"start":2027,"length":22}
|
||||
>name: nameA = "noName"
|
||||
>:=> (line 57, col 4) to (line 57, col 26)
|
||||
--------------------------------
|
||||
57 > name: nameA = "noName",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2023 to 2050) SpanInfo: {"start":2027,"length":22}
|
||||
>name: nameA = "noName"
|
||||
>:=> (line 57, col 4) to (line 57, col 26)
|
||||
--------------------------------
|
||||
58 > skills: {
|
||||
|
||||
~~~~~~~~~~~ => Pos: (2051 to 2061) SpanInfo: {"start":2055,"length":145}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "noSkill", secondary: "noSkill" }
|
||||
>:=> (line 58, col 4) to (line 61, col 52)
|
||||
58 > skills: {
|
||||
|
||||
~~~ => Pos: (2062 to 2064) SpanInfo: {"start":2073,"length":29}
|
||||
>primary: primaryA = "primary"
|
||||
>:=> (line 59, col 8) to (line 59, col 37)
|
||||
--------------------------------
|
||||
59 > primary: primaryA = "primary",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2065 to 2103) SpanInfo: {"start":2073,"length":29}
|
||||
>primary: primaryA = "primary"
|
||||
>:=> (line 59, col 8) to (line 59, col 37)
|
||||
--------------------------------
|
||||
60 > secondary: secondaryA = "secondary"
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2104 to 2147) SpanInfo: {"start":2112,"length":35}
|
||||
>secondary: secondaryA = "secondary"
|
||||
>:=> (line 60, col 8) to (line 60, col 43)
|
||||
--------------------------------
|
||||
61 > } = { primary: "noSkill", secondary: "noSkill" }
|
||||
|
||||
~~~~~ => Pos: (2148 to 2152) SpanInfo: {"start":2112,"length":35}
|
||||
>secondary: secondaryA = "secondary"
|
||||
>:=> (line 60, col 8) to (line 60, col 43)
|
||||
61 > } = { primary: "noSkill", secondary: "noSkill" }
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2153 to 2200) SpanInfo: {"start":2055,"length":145}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "noSkill", secondary: "noSkill" }
|
||||
>:=> (line 58, col 4) to (line 61, col 52)
|
||||
--------------------------------
|
||||
62 >} of multiRobots) {
|
||||
|
||||
~ => Pos: (2201 to 2201) SpanInfo: {"start":2055,"length":145}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "noSkill", secondary: "noSkill" }
|
||||
>:=> (line 58, col 4) to (line 61, col 52)
|
||||
62 >} of multiRobots) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (2202 to 2220) SpanInfo: {"start":2206,"length":11}
|
||||
>multiRobots
|
||||
>:=> (line 62, col 5) to (line 62, col 16)
|
||||
--------------------------------
|
||||
63 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2221 to 2244) SpanInfo: {"start":2225,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 63, col 4) to (line 63, col 22)
|
||||
--------------------------------
|
||||
64 >}
|
||||
|
||||
~~ => Pos: (2245 to 2246) SpanInfo: {"start":2225,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 63, col 4) to (line 63, col 22)
|
||||
--------------------------------
|
||||
65 >for (let {
|
||||
|
||||
~~~~~~~~~~~ => Pos: (2247 to 2257) SpanInfo: {"start":2262,"length":22}
|
||||
>name: nameA = "noName"
|
||||
>:=> (line 66, col 4) to (line 66, col 26)
|
||||
--------------------------------
|
||||
66 > name: nameA = "noName",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2258 to 2285) SpanInfo: {"start":2262,"length":22}
|
||||
>name: nameA = "noName"
|
||||
>:=> (line 66, col 4) to (line 66, col 26)
|
||||
--------------------------------
|
||||
67 > skills: {
|
||||
|
||||
~~~~~~~~~~~ => Pos: (2286 to 2296) SpanInfo: {"start":2290,"length":145}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "noSkill", secondary: "noSkill" }
|
||||
>:=> (line 67, col 4) to (line 70, col 52)
|
||||
67 > skills: {
|
||||
|
||||
~~~ => Pos: (2297 to 2299) SpanInfo: {"start":2308,"length":29}
|
||||
>primary: primaryA = "primary"
|
||||
>:=> (line 68, col 8) to (line 68, col 37)
|
||||
--------------------------------
|
||||
68 > primary: primaryA = "primary",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2300 to 2338) SpanInfo: {"start":2308,"length":29}
|
||||
>primary: primaryA = "primary"
|
||||
>:=> (line 68, col 8) to (line 68, col 37)
|
||||
--------------------------------
|
||||
69 > secondary: secondaryA = "secondary"
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2339 to 2382) SpanInfo: {"start":2347,"length":35}
|
||||
>secondary: secondaryA = "secondary"
|
||||
>:=> (line 69, col 8) to (line 69, col 43)
|
||||
--------------------------------
|
||||
70 > } = { primary: "noSkill", secondary: "noSkill" }
|
||||
|
||||
~~~~~ => Pos: (2383 to 2387) SpanInfo: {"start":2347,"length":35}
|
||||
>secondary: secondaryA = "secondary"
|
||||
>:=> (line 69, col 8) to (line 69, col 43)
|
||||
70 > } = { primary: "noSkill", secondary: "noSkill" }
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2388 to 2435) SpanInfo: {"start":2290,"length":145}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "noSkill", secondary: "noSkill" }
|
||||
>:=> (line 67, col 4) to (line 70, col 52)
|
||||
--------------------------------
|
||||
71 >} of getMultiRobots()) {
|
||||
|
||||
~ => Pos: (2436 to 2436) SpanInfo: {"start":2290,"length":145}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "noSkill", secondary: "noSkill" }
|
||||
>:=> (line 67, col 4) to (line 70, col 52)
|
||||
71 >} of getMultiRobots()) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2437 to 2460) SpanInfo: {"start":2441,"length":16}
|
||||
>getMultiRobots()
|
||||
>:=> (line 71, col 5) to (line 71, col 21)
|
||||
--------------------------------
|
||||
72 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2461 to 2484) SpanInfo: {"start":2465,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 72, col 4) to (line 72, col 22)
|
||||
--------------------------------
|
||||
73 >}
|
||||
|
||||
~~ => Pos: (2485 to 2486) SpanInfo: {"start":2465,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 72, col 4) to (line 72, col 22)
|
||||
--------------------------------
|
||||
74 >for (let {
|
||||
|
||||
~~~~~~~~~~~ => Pos: (2487 to 2497) SpanInfo: {"start":2502,"length":22}
|
||||
>name: nameA = "noName"
|
||||
>:=> (line 75, col 4) to (line 75, col 26)
|
||||
--------------------------------
|
||||
75 > name: nameA = "noName",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2498 to 2525) SpanInfo: {"start":2502,"length":22}
|
||||
>name: nameA = "noName"
|
||||
>:=> (line 75, col 4) to (line 75, col 26)
|
||||
--------------------------------
|
||||
76 > skills: {
|
||||
|
||||
~~~~~~~~~~~ => Pos: (2526 to 2536) SpanInfo: {"start":2530,"length":145}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "noSkill", secondary: "noSkill" }
|
||||
>:=> (line 76, col 4) to (line 79, col 52)
|
||||
76 > skills: {
|
||||
|
||||
~~~ => Pos: (2537 to 2539) SpanInfo: {"start":2548,"length":29}
|
||||
>primary: primaryA = "primary"
|
||||
>:=> (line 77, col 8) to (line 77, col 37)
|
||||
--------------------------------
|
||||
77 > primary: primaryA = "primary",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2540 to 2578) SpanInfo: {"start":2548,"length":29}
|
||||
>primary: primaryA = "primary"
|
||||
>:=> (line 77, col 8) to (line 77, col 37)
|
||||
--------------------------------
|
||||
78 > secondary: secondaryA = "secondary"
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2579 to 2622) SpanInfo: {"start":2587,"length":35}
|
||||
>secondary: secondaryA = "secondary"
|
||||
>:=> (line 78, col 8) to (line 78, col 43)
|
||||
--------------------------------
|
||||
79 > } = { primary: "noSkill", secondary: "noSkill" }
|
||||
|
||||
~~~~~ => Pos: (2623 to 2627) SpanInfo: {"start":2587,"length":35}
|
||||
>secondary: secondaryA = "secondary"
|
||||
>:=> (line 78, col 8) to (line 78, col 43)
|
||||
79 > } = { primary: "noSkill", secondary: "noSkill" }
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2628 to 2675) SpanInfo: {"start":2530,"length":145}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "noSkill", secondary: "noSkill" }
|
||||
>:=> (line 76, col 4) to (line 79, col 52)
|
||||
--------------------------------
|
||||
80 >} of <MultiRobot[]>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~ => Pos: (2676 to 2676) SpanInfo: {"start":2530,"length":145}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "noSkill", secondary: "noSkill" }
|
||||
>:=> (line 76, col 4) to (line 79, col 52)
|
||||
80 >} of <MultiRobot[]>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2677 to 2764) SpanInfo: {"start":2681,"length":162}
|
||||
><MultiRobot[]>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]
|
||||
>:=> (line 80, col 5) to (line 81, col 78)
|
||||
--------------------------------
|
||||
81 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (2765 to 2846) SpanInfo: {"start":2681,"length":162}
|
||||
><MultiRobot[]>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } },
|
||||
> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]
|
||||
>:=> (line 80, col 5) to (line 81, col 78)
|
||||
--------------------------------
|
||||
82 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (2847 to 2870) SpanInfo: {"start":2851,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 82, col 4) to (line 82, col 22)
|
||||
--------------------------------
|
||||
83 >}
|
||||
~ => Pos: (2871 to 2871) SpanInfo: {"start":2851,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 82, col 4) to (line 82, col 22)
|
||||
@@ -0,0 +1,196 @@
|
||||
|
||||
1 >declare var console: {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined
|
||||
--------------------------------
|
||||
2 > log(msg: any): void;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined
|
||||
--------------------------------
|
||||
3 >}
|
||||
|
||||
~~ => Pos: (48 to 49) SpanInfo: undefined
|
||||
--------------------------------
|
||||
4 >type Robot = [number, string, string];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (50 to 88) SpanInfo: undefined
|
||||
--------------------------------
|
||||
5 >var robotA: Robot = [1, "mower", "mowing"];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (89 to 132) SpanInfo: {"start":89,"length":42}
|
||||
>var robotA: Robot = [1, "mower", "mowing"]
|
||||
>:=> (line 5, col 0) to (line 5, col 42)
|
||||
--------------------------------
|
||||
6 >function foo1([, nameA]: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (133 to 146) SpanInfo: {"start":171,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 7, col 4) to (line 7, col 22)
|
||||
6 >function foo1([, nameA]: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~ => Pos: (147 to 163) SpanInfo: {"start":150,"length":5}
|
||||
>nameA
|
||||
>:=> (line 6, col 17) to (line 6, col 22)
|
||||
6 >function foo1([, nameA]: Robot) {
|
||||
|
||||
~~~ => Pos: (164 to 166) SpanInfo: {"start":171,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 7, col 4) to (line 7, col 22)
|
||||
--------------------------------
|
||||
7 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (167 to 190) SpanInfo: {"start":171,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 7, col 4) to (line 7, col 22)
|
||||
--------------------------------
|
||||
8 >}
|
||||
|
||||
~~ => Pos: (191 to 192) SpanInfo: {"start":191,"length":1}
|
||||
>}
|
||||
>:=> (line 8, col 0) to (line 8, col 1)
|
||||
--------------------------------
|
||||
9 >function foo2([numberB]: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (193 to 206) SpanInfo: {"start":231,"length":20}
|
||||
>console.log(numberB)
|
||||
>:=> (line 10, col 4) to (line 10, col 24)
|
||||
9 >function foo2([numberB]: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~ => Pos: (207 to 223) SpanInfo: {"start":208,"length":7}
|
||||
>numberB
|
||||
>:=> (line 9, col 15) to (line 9, col 22)
|
||||
9 >function foo2([numberB]: Robot) {
|
||||
|
||||
~~~ => Pos: (224 to 226) SpanInfo: {"start":231,"length":20}
|
||||
>console.log(numberB)
|
||||
>:=> (line 10, col 4) to (line 10, col 24)
|
||||
--------------------------------
|
||||
10 > console.log(numberB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (227 to 252) SpanInfo: {"start":231,"length":20}
|
||||
>console.log(numberB)
|
||||
>:=> (line 10, col 4) to (line 10, col 24)
|
||||
--------------------------------
|
||||
11 >}
|
||||
|
||||
~~ => Pos: (253 to 254) SpanInfo: {"start":253,"length":1}
|
||||
>}
|
||||
>:=> (line 11, col 0) to (line 11, col 1)
|
||||
--------------------------------
|
||||
12 >function foo3([numberA2, nameA2, skillA2]: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (255 to 268) SpanInfo: {"start":311,"length":19}
|
||||
>console.log(nameA2)
|
||||
>:=> (line 13, col 4) to (line 13, col 23)
|
||||
12 >function foo3([numberA2, nameA2, skillA2]: Robot) {
|
||||
|
||||
~~~~~~~~~~ => Pos: (269 to 278) SpanInfo: {"start":270,"length":8}
|
||||
>numberA2
|
||||
>:=> (line 12, col 15) to (line 12, col 23)
|
||||
12 >function foo3([numberA2, nameA2, skillA2]: Robot) {
|
||||
|
||||
~~~~~~~~ => Pos: (279 to 286) SpanInfo: {"start":280,"length":6}
|
||||
>nameA2
|
||||
>:=> (line 12, col 25) to (line 12, col 31)
|
||||
12 >function foo3([numberA2, nameA2, skillA2]: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~=> Pos: (287 to 303) SpanInfo: {"start":288,"length":7}
|
||||
>skillA2
|
||||
>:=> (line 12, col 33) to (line 12, col 40)
|
||||
12 >function foo3([numberA2, nameA2, skillA2]: Robot) {
|
||||
|
||||
~~~=> Pos: (304 to 306) SpanInfo: {"start":311,"length":19}
|
||||
>console.log(nameA2)
|
||||
>:=> (line 13, col 4) to (line 13, col 23)
|
||||
--------------------------------
|
||||
13 > console.log(nameA2);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (307 to 331) SpanInfo: {"start":311,"length":19}
|
||||
>console.log(nameA2)
|
||||
>:=> (line 13, col 4) to (line 13, col 23)
|
||||
--------------------------------
|
||||
14 >}
|
||||
|
||||
~~ => Pos: (332 to 333) SpanInfo: {"start":332,"length":1}
|
||||
>}
|
||||
>:=> (line 14, col 0) to (line 14, col 1)
|
||||
--------------------------------
|
||||
15 >function foo4([numberA3, ...robotAInfo]: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (334 to 347) SpanInfo: {"start":388,"length":23}
|
||||
>console.log(robotAInfo)
|
||||
>:=> (line 16, col 4) to (line 16, col 27)
|
||||
15 >function foo4([numberA3, ...robotAInfo]: Robot) {
|
||||
|
||||
~~~~~~~~~~ => Pos: (348 to 357) SpanInfo: {"start":349,"length":8}
|
||||
>numberA3
|
||||
>:=> (line 15, col 15) to (line 15, col 23)
|
||||
15 >function foo4([numberA3, ...robotAInfo]: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (358 to 380) SpanInfo: {"start":359,"length":13}
|
||||
>...robotAInfo
|
||||
>:=> (line 15, col 25) to (line 15, col 38)
|
||||
15 >function foo4([numberA3, ...robotAInfo]: Robot) {
|
||||
|
||||
~~~=> Pos: (381 to 383) SpanInfo: {"start":388,"length":23}
|
||||
>console.log(robotAInfo)
|
||||
>:=> (line 16, col 4) to (line 16, col 27)
|
||||
--------------------------------
|
||||
16 > console.log(robotAInfo);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (384 to 412) SpanInfo: {"start":388,"length":23}
|
||||
>console.log(robotAInfo)
|
||||
>:=> (line 16, col 4) to (line 16, col 27)
|
||||
--------------------------------
|
||||
17 >}
|
||||
|
||||
~~ => Pos: (413 to 414) SpanInfo: {"start":413,"length":1}
|
||||
>}
|
||||
>:=> (line 17, col 0) to (line 17, col 1)
|
||||
--------------------------------
|
||||
18 >foo1(robotA);
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (415 to 428) SpanInfo: {"start":415,"length":12}
|
||||
>foo1(robotA)
|
||||
>:=> (line 18, col 0) to (line 18, col 12)
|
||||
--------------------------------
|
||||
19 >foo1([2, "trimmer", "trimming"]);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (429 to 462) SpanInfo: {"start":429,"length":32}
|
||||
>foo1([2, "trimmer", "trimming"])
|
||||
>:=> (line 19, col 0) to (line 19, col 32)
|
||||
--------------------------------
|
||||
20 >foo2(robotA);
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (463 to 476) SpanInfo: {"start":463,"length":12}
|
||||
>foo2(robotA)
|
||||
>:=> (line 20, col 0) to (line 20, col 12)
|
||||
--------------------------------
|
||||
21 >foo2([2, "trimmer", "trimming"]);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (477 to 510) SpanInfo: {"start":477,"length":32}
|
||||
>foo2([2, "trimmer", "trimming"])
|
||||
>:=> (line 21, col 0) to (line 21, col 32)
|
||||
--------------------------------
|
||||
22 >foo3(robotA);
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (511 to 524) SpanInfo: {"start":511,"length":12}
|
||||
>foo3(robotA)
|
||||
>:=> (line 22, col 0) to (line 22, col 12)
|
||||
--------------------------------
|
||||
23 >foo3([2, "trimmer", "trimming"]);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (525 to 558) SpanInfo: {"start":525,"length":32}
|
||||
>foo3([2, "trimmer", "trimming"])
|
||||
>:=> (line 23, col 0) to (line 23, col 32)
|
||||
--------------------------------
|
||||
24 >foo4(robotA);
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (559 to 572) SpanInfo: {"start":559,"length":12}
|
||||
>foo4(robotA)
|
||||
>:=> (line 24, col 0) to (line 24, col 12)
|
||||
--------------------------------
|
||||
25 >foo4([2, "trimmer", "trimming"]);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (573 to 605) SpanInfo: {"start":573,"length":32}
|
||||
>foo4([2, "trimmer", "trimming"])
|
||||
>:=> (line 25, col 0) to (line 25, col 32)
|
||||
@@ -0,0 +1,196 @@
|
||||
|
||||
1 >declare var console: {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined
|
||||
--------------------------------
|
||||
2 > log(msg: any): void;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined
|
||||
--------------------------------
|
||||
3 >}
|
||||
|
||||
~~ => Pos: (48 to 49) SpanInfo: undefined
|
||||
--------------------------------
|
||||
4 >type Robot = [string, [string, string]];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (50 to 90) SpanInfo: undefined
|
||||
--------------------------------
|
||||
5 >var robotA: Robot = ["trimmer", ["trimming", "edging"]];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (91 to 147) SpanInfo: {"start":91,"length":55}
|
||||
>var robotA: Robot = ["trimmer", ["trimming", "edging"]]
|
||||
>:=> (line 5, col 0) to (line 5, col 55)
|
||||
--------------------------------
|
||||
6 >function foo1([, skillA]: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (148 to 161) SpanInfo: {"start":187,"length":19}
|
||||
>console.log(skillA)
|
||||
>:=> (line 7, col 4) to (line 7, col 23)
|
||||
6 >function foo1([, skillA]: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (162 to 179) SpanInfo: {"start":165,"length":6}
|
||||
>skillA
|
||||
>:=> (line 6, col 17) to (line 6, col 23)
|
||||
6 >function foo1([, skillA]: Robot) {
|
||||
|
||||
~~~ => Pos: (180 to 182) SpanInfo: {"start":187,"length":19}
|
||||
>console.log(skillA)
|
||||
>:=> (line 7, col 4) to (line 7, col 23)
|
||||
--------------------------------
|
||||
7 > console.log(skillA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (183 to 207) SpanInfo: {"start":187,"length":19}
|
||||
>console.log(skillA)
|
||||
>:=> (line 7, col 4) to (line 7, col 23)
|
||||
--------------------------------
|
||||
8 >}
|
||||
|
||||
~~ => Pos: (208 to 209) SpanInfo: {"start":208,"length":1}
|
||||
>}
|
||||
>:=> (line 8, col 0) to (line 8, col 1)
|
||||
--------------------------------
|
||||
9 >function foo2([nameMB]: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (210 to 223) SpanInfo: {"start":247,"length":19}
|
||||
>console.log(nameMB)
|
||||
>:=> (line 10, col 4) to (line 10, col 23)
|
||||
9 >function foo2([nameMB]: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~~~ => Pos: (224 to 239) SpanInfo: {"start":225,"length":6}
|
||||
>nameMB
|
||||
>:=> (line 9, col 15) to (line 9, col 21)
|
||||
9 >function foo2([nameMB]: Robot) {
|
||||
|
||||
~~~ => Pos: (240 to 242) SpanInfo: {"start":247,"length":19}
|
||||
>console.log(nameMB)
|
||||
>:=> (line 10, col 4) to (line 10, col 23)
|
||||
--------------------------------
|
||||
10 > console.log(nameMB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (243 to 267) SpanInfo: {"start":247,"length":19}
|
||||
>console.log(nameMB)
|
||||
>:=> (line 10, col 4) to (line 10, col 23)
|
||||
--------------------------------
|
||||
11 >}
|
||||
|
||||
~~ => Pos: (268 to 269) SpanInfo: {"start":268,"length":1}
|
||||
>}
|
||||
>:=> (line 11, col 0) to (line 11, col 1)
|
||||
--------------------------------
|
||||
12 >function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (270 to 283) SpanInfo: {"start":341,"length":19}
|
||||
>console.log(nameMA)
|
||||
>:=> (line 13, col 4) to (line 13, col 23)
|
||||
12 >function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) {
|
||||
|
||||
~~~~~~~~ => Pos: (284 to 291) SpanInfo: {"start":285,"length":6}
|
||||
>nameMA
|
||||
>:=> (line 12, col 15) to (line 12, col 21)
|
||||
12 >function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~~~ => Pos: (292 to 307) SpanInfo: {"start":294,"length":13}
|
||||
>primarySkillA
|
||||
>:=> (line 12, col 24) to (line 12, col 37)
|
||||
12 >function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~=> Pos: (308 to 324) SpanInfo: {"start":309,"length":15}
|
||||
>secondarySkillA
|
||||
>:=> (line 12, col 39) to (line 12, col 54)
|
||||
12 >function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) {
|
||||
|
||||
~~~~~~~~~=> Pos: (325 to 333) SpanInfo: {"start":293,"length":32}
|
||||
>[primarySkillA, secondarySkillA]
|
||||
>:=> (line 12, col 23) to (line 12, col 55)
|
||||
12 >function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) {
|
||||
|
||||
~~~=> Pos: (334 to 336) SpanInfo: {"start":341,"length":19}
|
||||
>console.log(nameMA)
|
||||
>:=> (line 13, col 4) to (line 13, col 23)
|
||||
--------------------------------
|
||||
13 > console.log(nameMA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (337 to 361) SpanInfo: {"start":341,"length":19}
|
||||
>console.log(nameMA)
|
||||
>:=> (line 13, col 4) to (line 13, col 23)
|
||||
--------------------------------
|
||||
14 >}
|
||||
|
||||
~~ => Pos: (362 to 363) SpanInfo: {"start":362,"length":1}
|
||||
>}
|
||||
>:=> (line 14, col 0) to (line 14, col 1)
|
||||
--------------------------------
|
||||
15 >function foo4([...multiRobotAInfo]: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (364 to 377) SpanInfo: {"start":413,"length":28}
|
||||
>console.log(multiRobotAInfo)
|
||||
>:=> (line 16, col 4) to (line 16, col 32)
|
||||
15 >function foo4([...multiRobotAInfo]: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (378 to 405) SpanInfo: {"start":379,"length":18}
|
||||
>...multiRobotAInfo
|
||||
>:=> (line 15, col 15) to (line 15, col 33)
|
||||
15 >function foo4([...multiRobotAInfo]: Robot) {
|
||||
|
||||
~~~ => Pos: (406 to 408) SpanInfo: {"start":413,"length":28}
|
||||
>console.log(multiRobotAInfo)
|
||||
>:=> (line 16, col 4) to (line 16, col 32)
|
||||
--------------------------------
|
||||
16 > console.log(multiRobotAInfo);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (409 to 442) SpanInfo: {"start":413,"length":28}
|
||||
>console.log(multiRobotAInfo)
|
||||
>:=> (line 16, col 4) to (line 16, col 32)
|
||||
--------------------------------
|
||||
17 >}
|
||||
|
||||
~~ => Pos: (443 to 444) SpanInfo: {"start":443,"length":1}
|
||||
>}
|
||||
>:=> (line 17, col 0) to (line 17, col 1)
|
||||
--------------------------------
|
||||
18 >foo1(robotA);
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (445 to 458) SpanInfo: {"start":445,"length":12}
|
||||
>foo1(robotA)
|
||||
>:=> (line 18, col 0) to (line 18, col 12)
|
||||
--------------------------------
|
||||
19 >foo1(["roomba", ["vaccum", "mopping"]]);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (459 to 499) SpanInfo: {"start":459,"length":39}
|
||||
>foo1(["roomba", ["vaccum", "mopping"]])
|
||||
>:=> (line 19, col 0) to (line 19, col 39)
|
||||
--------------------------------
|
||||
20 >foo2(robotA);
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (500 to 513) SpanInfo: {"start":500,"length":12}
|
||||
>foo2(robotA)
|
||||
>:=> (line 20, col 0) to (line 20, col 12)
|
||||
--------------------------------
|
||||
21 >foo2(["roomba", ["vaccum", "mopping"]]);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (514 to 554) SpanInfo: {"start":514,"length":39}
|
||||
>foo2(["roomba", ["vaccum", "mopping"]])
|
||||
>:=> (line 21, col 0) to (line 21, col 39)
|
||||
--------------------------------
|
||||
22 >foo3(robotA);
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (555 to 568) SpanInfo: {"start":555,"length":12}
|
||||
>foo3(robotA)
|
||||
>:=> (line 22, col 0) to (line 22, col 12)
|
||||
--------------------------------
|
||||
23 >foo3(["roomba", ["vaccum", "mopping"]]);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (569 to 609) SpanInfo: {"start":569,"length":39}
|
||||
>foo3(["roomba", ["vaccum", "mopping"]])
|
||||
>:=> (line 23, col 0) to (line 23, col 39)
|
||||
--------------------------------
|
||||
24 >foo4(robotA);
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (610 to 623) SpanInfo: {"start":610,"length":12}
|
||||
>foo4(robotA)
|
||||
>:=> (line 24, col 0) to (line 24, col 12)
|
||||
--------------------------------
|
||||
25 >foo4(["roomba", ["vaccum", "mopping"]]);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (624 to 663) SpanInfo: {"start":624,"length":39}
|
||||
>foo4(["roomba", ["vaccum", "mopping"]])
|
||||
>:=> (line 25, col 0) to (line 25, col 39)
|
||||
+196
@@ -0,0 +1,196 @@
|
||||
|
||||
1 >declare var console: {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined
|
||||
--------------------------------
|
||||
2 > log(msg: any): void;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined
|
||||
--------------------------------
|
||||
3 >}
|
||||
|
||||
~~ => Pos: (48 to 49) SpanInfo: undefined
|
||||
--------------------------------
|
||||
4 >type Robot = [number, string, string];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (50 to 88) SpanInfo: undefined
|
||||
--------------------------------
|
||||
5 >var robotA: Robot = [1, "mower", "mowing"];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (89 to 132) SpanInfo: {"start":89,"length":42}
|
||||
>var robotA: Robot = [1, "mower", "mowing"]
|
||||
>:=> (line 5, col 0) to (line 5, col 42)
|
||||
--------------------------------
|
||||
6 >function foo1([, nameA = "noName"]: Robot = [-1, "name", "skill"]) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (133 to 146) SpanInfo: {"start":206,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 7, col 4) to (line 7, col 22)
|
||||
6 >function foo1([, nameA = "noName"]: Robot = [-1, "name", "skill"]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (147 to 198) SpanInfo: {"start":150,"length":16}
|
||||
>nameA = "noName"
|
||||
>:=> (line 6, col 17) to (line 6, col 33)
|
||||
6 >function foo1([, nameA = "noName"]: Robot = [-1, "name", "skill"]) {
|
||||
|
||||
~~~=> Pos: (199 to 201) SpanInfo: {"start":206,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 7, col 4) to (line 7, col 22)
|
||||
--------------------------------
|
||||
7 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (202 to 225) SpanInfo: {"start":206,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 7, col 4) to (line 7, col 22)
|
||||
--------------------------------
|
||||
8 >}
|
||||
|
||||
~~ => Pos: (226 to 227) SpanInfo: {"start":226,"length":1}
|
||||
>}
|
||||
>:=> (line 8, col 0) to (line 8, col 1)
|
||||
--------------------------------
|
||||
9 >function foo2([numberB = -1]: Robot = [-1, "name", "skill"]) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (228 to 241) SpanInfo: {"start":295,"length":20}
|
||||
>console.log(numberB)
|
||||
>:=> (line 10, col 4) to (line 10, col 24)
|
||||
9 >function foo2([numberB = -1]: Robot = [-1, "name", "skill"]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (242 to 287) SpanInfo: {"start":243,"length":12}
|
||||
>numberB = -1
|
||||
>:=> (line 9, col 15) to (line 9, col 27)
|
||||
9 >function foo2([numberB = -1]: Robot = [-1, "name", "skill"]) {
|
||||
|
||||
~~~=> Pos: (288 to 290) SpanInfo: {"start":295,"length":20}
|
||||
>console.log(numberB)
|
||||
>:=> (line 10, col 4) to (line 10, col 24)
|
||||
--------------------------------
|
||||
10 > console.log(numberB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (291 to 316) SpanInfo: {"start":295,"length":20}
|
||||
>console.log(numberB)
|
||||
>:=> (line 10, col 4) to (line 10, col 24)
|
||||
--------------------------------
|
||||
11 >}
|
||||
|
||||
~~ => Pos: (317 to 318) SpanInfo: {"start":317,"length":1}
|
||||
>}
|
||||
>:=> (line 11, col 0) to (line 11, col 1)
|
||||
--------------------------------
|
||||
12 >function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"]) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (319 to 332) SpanInfo: {"start":423,"length":19}
|
||||
>console.log(nameA2)
|
||||
>:=> (line 13, col 4) to (line 13, col 23)
|
||||
12 >function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"]) {
|
||||
|
||||
~~~~~~~~~~~~~~~ => Pos: (333 to 347) SpanInfo: {"start":334,"length":13}
|
||||
>numberA2 = -1
|
||||
>:=> (line 12, col 15) to (line 12, col 28)
|
||||
12 >function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~=> Pos: (348 to 364) SpanInfo: {"start":349,"length":15}
|
||||
>nameA2 = "name"
|
||||
>:=> (line 12, col 30) to (line 12, col 45)
|
||||
12 >function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (365 to 415) SpanInfo: {"start":366,"length":17}
|
||||
>skillA2 = "skill"
|
||||
>:=> (line 12, col 47) to (line 12, col 64)
|
||||
12 >function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"]) {
|
||||
|
||||
~~~=> Pos: (416 to 418) SpanInfo: {"start":423,"length":19}
|
||||
>console.log(nameA2)
|
||||
>:=> (line 13, col 4) to (line 13, col 23)
|
||||
--------------------------------
|
||||
13 > console.log(nameA2);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (419 to 443) SpanInfo: {"start":423,"length":19}
|
||||
>console.log(nameA2)
|
||||
>:=> (line 13, col 4) to (line 13, col 23)
|
||||
--------------------------------
|
||||
14 >}
|
||||
|
||||
~~ => Pos: (444 to 445) SpanInfo: {"start":444,"length":1}
|
||||
>}
|
||||
>:=> (line 14, col 0) to (line 14, col 1)
|
||||
--------------------------------
|
||||
15 >function foo4([numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"]) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (446 to 459) SpanInfo: {"start":529,"length":23}
|
||||
>console.log(robotAInfo)
|
||||
>:=> (line 16, col 4) to (line 16, col 27)
|
||||
15 >function foo4([numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"]) {
|
||||
|
||||
~~~~~~~~~~~~~~~ => Pos: (460 to 474) SpanInfo: {"start":461,"length":13}
|
||||
>numberA3 = -1
|
||||
>:=> (line 15, col 15) to (line 15, col 28)
|
||||
15 >function foo4([numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (475 to 521) SpanInfo: {"start":476,"length":13}
|
||||
>...robotAInfo
|
||||
>:=> (line 15, col 30) to (line 15, col 43)
|
||||
15 >function foo4([numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"]) {
|
||||
|
||||
~~~=> Pos: (522 to 524) SpanInfo: {"start":529,"length":23}
|
||||
>console.log(robotAInfo)
|
||||
>:=> (line 16, col 4) to (line 16, col 27)
|
||||
--------------------------------
|
||||
16 > console.log(robotAInfo);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (525 to 553) SpanInfo: {"start":529,"length":23}
|
||||
>console.log(robotAInfo)
|
||||
>:=> (line 16, col 4) to (line 16, col 27)
|
||||
--------------------------------
|
||||
17 >}
|
||||
|
||||
~~ => Pos: (554 to 555) SpanInfo: {"start":554,"length":1}
|
||||
>}
|
||||
>:=> (line 17, col 0) to (line 17, col 1)
|
||||
--------------------------------
|
||||
18 >foo1(robotA);
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (556 to 569) SpanInfo: {"start":556,"length":12}
|
||||
>foo1(robotA)
|
||||
>:=> (line 18, col 0) to (line 18, col 12)
|
||||
--------------------------------
|
||||
19 >foo1([2, "trimmer", "trimming"]);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (570 to 603) SpanInfo: {"start":570,"length":32}
|
||||
>foo1([2, "trimmer", "trimming"])
|
||||
>:=> (line 19, col 0) to (line 19, col 32)
|
||||
--------------------------------
|
||||
20 >foo2(robotA);
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (604 to 617) SpanInfo: {"start":604,"length":12}
|
||||
>foo2(robotA)
|
||||
>:=> (line 20, col 0) to (line 20, col 12)
|
||||
--------------------------------
|
||||
21 >foo2([2, "trimmer", "trimming"]);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (618 to 651) SpanInfo: {"start":618,"length":32}
|
||||
>foo2([2, "trimmer", "trimming"])
|
||||
>:=> (line 21, col 0) to (line 21, col 32)
|
||||
--------------------------------
|
||||
22 >foo3(robotA);
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (652 to 665) SpanInfo: {"start":652,"length":12}
|
||||
>foo3(robotA)
|
||||
>:=> (line 22, col 0) to (line 22, col 12)
|
||||
--------------------------------
|
||||
23 >foo3([2, "trimmer", "trimming"]);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (666 to 699) SpanInfo: {"start":666,"length":32}
|
||||
>foo3([2, "trimmer", "trimming"])
|
||||
>:=> (line 23, col 0) to (line 23, col 32)
|
||||
--------------------------------
|
||||
24 >foo4(robotA);
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (700 to 713) SpanInfo: {"start":700,"length":12}
|
||||
>foo4(robotA)
|
||||
>:=> (line 24, col 0) to (line 24, col 12)
|
||||
--------------------------------
|
||||
25 >foo4([2, "trimmer", "trimming"]);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (714 to 746) SpanInfo: {"start":714,"length":32}
|
||||
>foo4([2, "trimmer", "trimming"])
|
||||
>:=> (line 25, col 0) to (line 25, col 32)
|
||||
+172
@@ -0,0 +1,172 @@
|
||||
|
||||
1 >declare var console: {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined
|
||||
--------------------------------
|
||||
2 > log(msg: any): void;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined
|
||||
--------------------------------
|
||||
3 >}
|
||||
|
||||
~~ => Pos: (48 to 49) SpanInfo: undefined
|
||||
--------------------------------
|
||||
4 >type Robot = [string, string[]];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (50 to 82) SpanInfo: undefined
|
||||
--------------------------------
|
||||
5 >var robotA: Robot = ["trimmer", ["trimming", "edging"]];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (83 to 139) SpanInfo: {"start":83,"length":55}
|
||||
>var robotA: Robot = ["trimmer", ["trimming", "edging"]]
|
||||
>:=> (line 5, col 0) to (line 5, col 55)
|
||||
--------------------------------
|
||||
6 >function foo1([, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "skill2"]]) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (140 to 153) SpanInfo: {"start":236,"length":19}
|
||||
>console.log(skillA)
|
||||
>:=> (line 7, col 4) to (line 7, col 23)
|
||||
6 >function foo1([, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "skill2"]]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (154 to 228) SpanInfo: {"start":157,"length":31}
|
||||
>skillA = ["noSkill", "noSkill"]
|
||||
>:=> (line 6, col 17) to (line 6, col 48)
|
||||
6 >function foo1([, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "skill2"]]) {
|
||||
|
||||
~~~=> Pos: (229 to 231) SpanInfo: {"start":236,"length":19}
|
||||
>console.log(skillA)
|
||||
>:=> (line 7, col 4) to (line 7, col 23)
|
||||
--------------------------------
|
||||
7 > console.log(skillA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (232 to 256) SpanInfo: {"start":236,"length":19}
|
||||
>console.log(skillA)
|
||||
>:=> (line 7, col 4) to (line 7, col 23)
|
||||
--------------------------------
|
||||
8 >}
|
||||
|
||||
~~ => Pos: (257 to 258) SpanInfo: {"start":257,"length":1}
|
||||
>}
|
||||
>:=> (line 8, col 0) to (line 8, col 1)
|
||||
--------------------------------
|
||||
9 >function foo2([nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]]) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (259 to 272) SpanInfo: {"start":340,"length":19}
|
||||
>console.log(nameMB)
|
||||
>:=> (line 10, col 4) to (line 10, col 23)
|
||||
9 >function foo2([nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]]) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (273 to 332) SpanInfo: {"start":274,"length":17}
|
||||
>nameMB = "noName"
|
||||
>:=> (line 9, col 15) to (line 9, col 32)
|
||||
9 >function foo2([nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]]) {
|
||||
|
||||
~~~=> Pos: (333 to 335) SpanInfo: {"start":340,"length":19}
|
||||
>console.log(nameMB)
|
||||
>:=> (line 10, col 4) to (line 10, col 23)
|
||||
--------------------------------
|
||||
10 > console.log(nameMB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (336 to 360) SpanInfo: {"start":340,"length":19}
|
||||
>console.log(nameMB)
|
||||
>:=> (line 10, col 4) to (line 10, col 23)
|
||||
--------------------------------
|
||||
11 >}
|
||||
|
||||
~~ => Pos: (361 to 362) SpanInfo: {"start":361,"length":1}
|
||||
>}
|
||||
>:=> (line 11, col 0) to (line 11, col 1)
|
||||
--------------------------------
|
||||
12 >function foo3([nameMA = "noName", [
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (363 to 376) SpanInfo: {"start":506,"length":19}
|
||||
>console.log(nameMA)
|
||||
>:=> (line 16, col 4) to (line 16, col 23)
|
||||
12 >function foo3([nameMA = "noName", [
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (377 to 395) SpanInfo: {"start":378,"length":17}
|
||||
>nameMA = "noName"
|
||||
>:=> (line 12, col 15) to (line 12, col 32)
|
||||
12 >function foo3([nameMA = "noName", [
|
||||
|
||||
~~~ => Pos: (396 to 398) SpanInfo: {"start":403,"length":25}
|
||||
>primarySkillA = "primary"
|
||||
>:=> (line 13, col 4) to (line 13, col 29)
|
||||
--------------------------------
|
||||
13 > primarySkillA = "primary",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (399 to 429) SpanInfo: {"start":403,"length":25}
|
||||
>primarySkillA = "primary"
|
||||
>:=> (line 13, col 4) to (line 13, col 29)
|
||||
--------------------------------
|
||||
14 > secondarySkillA = "secondary"
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (430 to 463) SpanInfo: {"start":434,"length":29}
|
||||
>secondarySkillA = "secondary"
|
||||
>:=> (line 14, col 4) to (line 14, col 33)
|
||||
--------------------------------
|
||||
15 >] = ["noSkill", "noSkill"]]: Robot) {
|
||||
|
||||
~ => Pos: (464 to 464) SpanInfo: {"start":434,"length":29}
|
||||
>secondarySkillA = "secondary"
|
||||
>:=> (line 14, col 4) to (line 14, col 33)
|
||||
15 >] = ["noSkill", "noSkill"]]: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (465 to 498) SpanInfo: {"start":397,"length":93}
|
||||
>[
|
||||
> primarySkillA = "primary",
|
||||
> secondarySkillA = "secondary"
|
||||
>] = ["noSkill", "noSkill"]
|
||||
>:=> (line 12, col 34) to (line 15, col 26)
|
||||
15 >] = ["noSkill", "noSkill"]]: Robot) {
|
||||
|
||||
~~~ => Pos: (499 to 501) SpanInfo: {"start":506,"length":19}
|
||||
>console.log(nameMA)
|
||||
>:=> (line 16, col 4) to (line 16, col 23)
|
||||
--------------------------------
|
||||
16 > console.log(nameMA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (502 to 526) SpanInfo: {"start":506,"length":19}
|
||||
>console.log(nameMA)
|
||||
>:=> (line 16, col 4) to (line 16, col 23)
|
||||
--------------------------------
|
||||
17 >}
|
||||
|
||||
~~ => Pos: (527 to 528) SpanInfo: {"start":527,"length":1}
|
||||
>}
|
||||
>:=> (line 17, col 0) to (line 17, col 1)
|
||||
--------------------------------
|
||||
18 >foo1(robotA);
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (529 to 542) SpanInfo: {"start":529,"length":12}
|
||||
>foo1(robotA)
|
||||
>:=> (line 18, col 0) to (line 18, col 12)
|
||||
--------------------------------
|
||||
19 >foo1(["roomba", ["vaccum", "mopping"]]);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (543 to 583) SpanInfo: {"start":543,"length":39}
|
||||
>foo1(["roomba", ["vaccum", "mopping"]])
|
||||
>:=> (line 19, col 0) to (line 19, col 39)
|
||||
--------------------------------
|
||||
20 >foo2(robotA);
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (584 to 597) SpanInfo: {"start":584,"length":12}
|
||||
>foo2(robotA)
|
||||
>:=> (line 20, col 0) to (line 20, col 12)
|
||||
--------------------------------
|
||||
21 >foo2(["roomba", ["vaccum", "mopping"]]);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (598 to 638) SpanInfo: {"start":598,"length":39}
|
||||
>foo2(["roomba", ["vaccum", "mopping"]])
|
||||
>:=> (line 21, col 0) to (line 21, col 39)
|
||||
--------------------------------
|
||||
22 >foo3(robotA);
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (639 to 652) SpanInfo: {"start":639,"length":12}
|
||||
>foo3(robotA)
|
||||
>:=> (line 22, col 0) to (line 22, col 12)
|
||||
--------------------------------
|
||||
23 >foo3(["roomba", ["vaccum", "mopping"]]);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (653 to 692) SpanInfo: {"start":653,"length":39}
|
||||
>foo3(["roomba", ["vaccum", "mopping"]])
|
||||
>:=> (line 23, col 0) to (line 23, col 39)
|
||||
+200
@@ -0,0 +1,200 @@
|
||||
|
||||
1 >declare var console: {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined
|
||||
--------------------------------
|
||||
2 > log(msg: string): void;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 50) SpanInfo: undefined
|
||||
--------------------------------
|
||||
3 >}
|
||||
|
||||
~~ => Pos: (51 to 52) SpanInfo: undefined
|
||||
--------------------------------
|
||||
4 >interface Robot {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (53 to 70) SpanInfo: undefined
|
||||
--------------------------------
|
||||
5 > name: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (71 to 88) SpanInfo: undefined
|
||||
--------------------------------
|
||||
6 > skills: {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (89 to 102) SpanInfo: undefined
|
||||
--------------------------------
|
||||
7 > primary: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (103 to 127) SpanInfo: undefined
|
||||
--------------------------------
|
||||
8 > secondary: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (128 to 154) SpanInfo: undefined
|
||||
--------------------------------
|
||||
9 > };
|
||||
|
||||
~~~~~~~ => Pos: (155 to 161) SpanInfo: undefined
|
||||
--------------------------------
|
||||
10 >}
|
||||
|
||||
~~ => Pos: (162 to 163) SpanInfo: undefined
|
||||
--------------------------------
|
||||
11 >var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } };
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (164 to 252) SpanInfo: {"start":164,"length":87}
|
||||
>var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }
|
||||
>:=> (line 11, col 0) to (line 11, col 87)
|
||||
--------------------------------
|
||||
12 >function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (253 to 266) SpanInfo: {"start":338,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 13, col 4) to (line 13, col 25)
|
||||
12 >function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) {
|
||||
|
||||
~~~~~~~~~ => Pos: (267 to 275) SpanInfo: {"start":269,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 12, col 16) to (line 12, col 68)
|
||||
12 >function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~ => Pos: (276 to 296) SpanInfo: {"start":279,"length":17}
|
||||
>primary: primaryA
|
||||
>:=> (line 12, col 26) to (line 12, col 43)
|
||||
12 >function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (297 to 320) SpanInfo: {"start":298,"length":21}
|
||||
>secondary: secondaryA
|
||||
>:=> (line 12, col 45) to (line 12, col 66)
|
||||
12 >function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) {
|
||||
|
||||
~~~~~~~~~~=> Pos: (321 to 330) SpanInfo: {"start":269,"length":52}
|
||||
>skills: { primary: primaryA, secondary: secondaryA }
|
||||
>:=> (line 12, col 16) to (line 12, col 68)
|
||||
12 >function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) {
|
||||
|
||||
~~~=> Pos: (331 to 333) SpanInfo: {"start":338,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 13, col 4) to (line 13, col 25)
|
||||
--------------------------------
|
||||
13 > console.log(primaryA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (334 to 360) SpanInfo: {"start":338,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 13, col 4) to (line 13, col 25)
|
||||
--------------------------------
|
||||
14 >}
|
||||
|
||||
~~ => Pos: (361 to 362) SpanInfo: {"start":361,"length":1}
|
||||
>}
|
||||
>:=> (line 14, col 0) to (line 14, col 1)
|
||||
--------------------------------
|
||||
15 >function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (363 to 376) SpanInfo: {"start":461,"length":23}
|
||||
>console.log(secondaryB)
|
||||
>:=> (line 16, col 4) to (line 16, col 27)
|
||||
15 >function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (377 to 390) SpanInfo: {"start":379,"length":11}
|
||||
>name: nameC
|
||||
>:=> (line 15, col 16) to (line 15, col 27)
|
||||
15 >function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) {
|
||||
|
||||
~~~~~~~~ => Pos: (391 to 398) SpanInfo: {"start":392,"length":52}
|
||||
>skills: { primary: primaryB, secondary: secondaryB }
|
||||
>:=> (line 15, col 29) to (line 15, col 81)
|
||||
15 >function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~=> Pos: (399 to 419) SpanInfo: {"start":402,"length":17}
|
||||
>primary: primaryB
|
||||
>:=> (line 15, col 39) to (line 15, col 56)
|
||||
15 >function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (420 to 443) SpanInfo: {"start":421,"length":21}
|
||||
>secondary: secondaryB
|
||||
>:=> (line 15, col 58) to (line 15, col 79)
|
||||
15 >function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) {
|
||||
|
||||
~~~~~~~~~~=> Pos: (444 to 453) SpanInfo: {"start":392,"length":52}
|
||||
>skills: { primary: primaryB, secondary: secondaryB }
|
||||
>:=> (line 15, col 29) to (line 15, col 81)
|
||||
15 >function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) {
|
||||
|
||||
~~~=> Pos: (454 to 456) SpanInfo: {"start":461,"length":23}
|
||||
>console.log(secondaryB)
|
||||
>:=> (line 16, col 4) to (line 16, col 27)
|
||||
--------------------------------
|
||||
16 > console.log(secondaryB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (457 to 485) SpanInfo: {"start":461,"length":23}
|
||||
>console.log(secondaryB)
|
||||
>:=> (line 16, col 4) to (line 16, col 27)
|
||||
--------------------------------
|
||||
17 >}
|
||||
|
||||
~~ => Pos: (486 to 487) SpanInfo: {"start":486,"length":1}
|
||||
>}
|
||||
>:=> (line 17, col 0) to (line 17, col 1)
|
||||
--------------------------------
|
||||
18 >function foo3({ skills }: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (488 to 501) SpanInfo: {"start":527,"length":27}
|
||||
>console.log(skills.primary)
|
||||
>:=> (line 19, col 4) to (line 19, col 31)
|
||||
18 >function foo3({ skills }: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (502 to 519) SpanInfo: {"start":504,"length":6}
|
||||
>skills
|
||||
>:=> (line 18, col 16) to (line 18, col 22)
|
||||
18 >function foo3({ skills }: Robot) {
|
||||
|
||||
~~~ => Pos: (520 to 522) SpanInfo: {"start":527,"length":27}
|
||||
>console.log(skills.primary)
|
||||
>:=> (line 19, col 4) to (line 19, col 31)
|
||||
--------------------------------
|
||||
19 > console.log(skills.primary);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (523 to 555) SpanInfo: {"start":527,"length":27}
|
||||
>console.log(skills.primary)
|
||||
>:=> (line 19, col 4) to (line 19, col 31)
|
||||
--------------------------------
|
||||
20 >}
|
||||
|
||||
~~ => Pos: (556 to 557) SpanInfo: {"start":556,"length":1}
|
||||
>}
|
||||
>:=> (line 20, col 0) to (line 20, col 1)
|
||||
--------------------------------
|
||||
21 >foo1(robotA);
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (558 to 571) SpanInfo: {"start":558,"length":12}
|
||||
>foo1(robotA)
|
||||
>:=> (line 21, col 0) to (line 21, col 12)
|
||||
--------------------------------
|
||||
22 >foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } });
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (572 to 657) SpanInfo: {"start":572,"length":84}
|
||||
>foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } })
|
||||
>:=> (line 22, col 0) to (line 22, col 84)
|
||||
--------------------------------
|
||||
23 >foo2(robotA);
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (658 to 671) SpanInfo: {"start":658,"length":12}
|
||||
>foo2(robotA)
|
||||
>:=> (line 23, col 0) to (line 23, col 12)
|
||||
--------------------------------
|
||||
24 >foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } });
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (672 to 757) SpanInfo: {"start":672,"length":84}
|
||||
>foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } })
|
||||
>:=> (line 24, col 0) to (line 24, col 84)
|
||||
--------------------------------
|
||||
25 >foo3(robotA);
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (758 to 771) SpanInfo: {"start":758,"length":12}
|
||||
>foo3(robotA)
|
||||
>:=> (line 25, col 0) to (line 25, col 12)
|
||||
--------------------------------
|
||||
26 >foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } });
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (772 to 856) SpanInfo: {"start":772,"length":84}
|
||||
>foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } })
|
||||
>:=> (line 26, col 0) to (line 26, col 84)
|
||||
+274
@@ -0,0 +1,274 @@
|
||||
|
||||
1 >declare var console: {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined
|
||||
--------------------------------
|
||||
2 > log(msg: string): void;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 50) SpanInfo: undefined
|
||||
--------------------------------
|
||||
3 >}
|
||||
|
||||
~~ => Pos: (51 to 52) SpanInfo: undefined
|
||||
--------------------------------
|
||||
4 >interface Robot {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (53 to 70) SpanInfo: undefined
|
||||
--------------------------------
|
||||
5 > name: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (71 to 88) SpanInfo: undefined
|
||||
--------------------------------
|
||||
6 > skills: {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (89 to 102) SpanInfo: undefined
|
||||
--------------------------------
|
||||
7 > primary?: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (103 to 128) SpanInfo: undefined
|
||||
--------------------------------
|
||||
8 > secondary?: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (129 to 156) SpanInfo: undefined
|
||||
--------------------------------
|
||||
9 > };
|
||||
|
||||
~~~~~~~ => Pos: (157 to 163) SpanInfo: undefined
|
||||
--------------------------------
|
||||
10 >}
|
||||
|
||||
~~ => Pos: (164 to 165) SpanInfo: undefined
|
||||
--------------------------------
|
||||
11 >var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } };
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (166 to 254) SpanInfo: {"start":166,"length":87}
|
||||
>var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }
|
||||
>:=> (line 11, col 0) to (line 11, col 87)
|
||||
--------------------------------
|
||||
12 >function foo1(
|
||||
|
||||
~~~~~~~~~~~~~~~ => Pos: (255 to 269) SpanInfo: {"start":475,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 19, col 4) to (line 19, col 25)
|
||||
--------------------------------
|
||||
13 > {
|
||||
|
||||
~~~~~~ => Pos: (270 to 275) SpanInfo: {"start":284,"length":161}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "SomeSkill", secondary: "someSkill" }
|
||||
>:=> (line 14, col 8) to (line 17, col 60)
|
||||
--------------------------------
|
||||
14 > skills: {
|
||||
|
||||
~~~~~~~~~~~~~~~ => Pos: (276 to 290) SpanInfo: {"start":284,"length":161}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "SomeSkill", secondary: "someSkill" }
|
||||
>:=> (line 14, col 8) to (line 17, col 60)
|
||||
14 > skills: {
|
||||
|
||||
~~~ => Pos: (291 to 293) SpanInfo: {"start":306,"length":29}
|
||||
>primary: primaryA = "primary"
|
||||
>:=> (line 15, col 12) to (line 15, col 41)
|
||||
--------------------------------
|
||||
15 > primary: primaryA = "primary",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (294 to 336) SpanInfo: {"start":306,"length":29}
|
||||
>primary: primaryA = "primary"
|
||||
>:=> (line 15, col 12) to (line 15, col 41)
|
||||
--------------------------------
|
||||
16 > secondary: secondaryA = "secondary"
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (337 to 384) SpanInfo: {"start":349,"length":35}
|
||||
>secondary: secondaryA = "secondary"
|
||||
>:=> (line 16, col 12) to (line 16, col 47)
|
||||
--------------------------------
|
||||
17 > } = { primary: "SomeSkill", secondary: "someSkill" }
|
||||
|
||||
~~~~~~~~~ => Pos: (385 to 393) SpanInfo: {"start":349,"length":35}
|
||||
>secondary: secondaryA = "secondary"
|
||||
>:=> (line 16, col 12) to (line 16, col 47)
|
||||
17 > } = { primary: "SomeSkill", secondary: "someSkill" }
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (394 to 445) SpanInfo: {"start":284,"length":161}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "SomeSkill", secondary: "someSkill" }
|
||||
>:=> (line 14, col 8) to (line 17, col 60)
|
||||
--------------------------------
|
||||
18 > }: Robot = robotA) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~ => Pos: (446 to 467) SpanInfo: {"start":284,"length":161}
|
||||
>skills: {
|
||||
> primary: primaryA = "primary",
|
||||
> secondary: secondaryA = "secondary"
|
||||
> } = { primary: "SomeSkill", secondary: "someSkill" }
|
||||
>:=> (line 14, col 8) to (line 17, col 60)
|
||||
18 > }: Robot = robotA) {
|
||||
|
||||
~~~ => Pos: (468 to 470) SpanInfo: {"start":475,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 19, col 4) to (line 19, col 25)
|
||||
--------------------------------
|
||||
19 > console.log(primaryA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (471 to 497) SpanInfo: {"start":475,"length":21}
|
||||
>console.log(primaryA)
|
||||
>:=> (line 19, col 4) to (line 19, col 25)
|
||||
--------------------------------
|
||||
20 >}
|
||||
|
||||
~~ => Pos: (498 to 499) SpanInfo: {"start":498,"length":1}
|
||||
>}
|
||||
>:=> (line 20, col 0) to (line 20, col 1)
|
||||
--------------------------------
|
||||
21 >function foo2(
|
||||
|
||||
~~~~~~~~~~~~~~~ => Pos: (500 to 514) SpanInfo: {"start":750,"length":23}
|
||||
>console.log(secondaryB)
|
||||
>:=> (line 29, col 4) to (line 29, col 27)
|
||||
--------------------------------
|
||||
22 > {
|
||||
|
||||
~~~~~~ => Pos: (515 to 520) SpanInfo: {"start":529,"length":20}
|
||||
>name: nameC = "name"
|
||||
>:=> (line 23, col 8) to (line 23, col 28)
|
||||
--------------------------------
|
||||
23 > name: nameC = "name",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (521 to 550) SpanInfo: {"start":529,"length":20}
|
||||
>name: nameC = "name"
|
||||
>:=> (line 23, col 8) to (line 23, col 28)
|
||||
--------------------------------
|
||||
24 > skills: {
|
||||
|
||||
~~~~~~~~~~~~~~~ => Pos: (551 to 565) SpanInfo: {"start":559,"length":161}
|
||||
>skills: {
|
||||
> primary: primaryB = "primary",
|
||||
> secondary: secondaryB = "secondary"
|
||||
> } = { primary: "SomeSkill", secondary: "someSkill" }
|
||||
>:=> (line 24, col 8) to (line 27, col 60)
|
||||
24 > skills: {
|
||||
|
||||
~~~ => Pos: (566 to 568) SpanInfo: {"start":581,"length":29}
|
||||
>primary: primaryB = "primary"
|
||||
>:=> (line 25, col 12) to (line 25, col 41)
|
||||
--------------------------------
|
||||
25 > primary: primaryB = "primary",
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (569 to 611) SpanInfo: {"start":581,"length":29}
|
||||
>primary: primaryB = "primary"
|
||||
>:=> (line 25, col 12) to (line 25, col 41)
|
||||
--------------------------------
|
||||
26 > secondary: secondaryB = "secondary"
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (612 to 659) SpanInfo: {"start":624,"length":35}
|
||||
>secondary: secondaryB = "secondary"
|
||||
>:=> (line 26, col 12) to (line 26, col 47)
|
||||
--------------------------------
|
||||
27 > } = { primary: "SomeSkill", secondary: "someSkill" }
|
||||
|
||||
~~~~~~~~~ => Pos: (660 to 668) SpanInfo: {"start":624,"length":35}
|
||||
>secondary: secondaryB = "secondary"
|
||||
>:=> (line 26, col 12) to (line 26, col 47)
|
||||
27 > } = { primary: "SomeSkill", secondary: "someSkill" }
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (669 to 720) SpanInfo: {"start":559,"length":161}
|
||||
>skills: {
|
||||
> primary: primaryB = "primary",
|
||||
> secondary: secondaryB = "secondary"
|
||||
> } = { primary: "SomeSkill", secondary: "someSkill" }
|
||||
>:=> (line 24, col 8) to (line 27, col 60)
|
||||
--------------------------------
|
||||
28 > }: Robot = robotA) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~ => Pos: (721 to 742) SpanInfo: {"start":559,"length":161}
|
||||
>skills: {
|
||||
> primary: primaryB = "primary",
|
||||
> secondary: secondaryB = "secondary"
|
||||
> } = { primary: "SomeSkill", secondary: "someSkill" }
|
||||
>:=> (line 24, col 8) to (line 27, col 60)
|
||||
28 > }: Robot = robotA) {
|
||||
|
||||
~~~ => Pos: (743 to 745) SpanInfo: {"start":750,"length":23}
|
||||
>console.log(secondaryB)
|
||||
>:=> (line 29, col 4) to (line 29, col 27)
|
||||
--------------------------------
|
||||
29 > console.log(secondaryB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (746 to 774) SpanInfo: {"start":750,"length":23}
|
||||
>console.log(secondaryB)
|
||||
>:=> (line 29, col 4) to (line 29, col 27)
|
||||
--------------------------------
|
||||
30 >}
|
||||
|
||||
~~ => Pos: (775 to 776) SpanInfo: {"start":775,"length":1}
|
||||
>}
|
||||
>:=> (line 30, col 0) to (line 30, col 1)
|
||||
--------------------------------
|
||||
31 >function foo3({ skills = { primary: "SomeSkill", secondary: "someSkill" } }: Robot = robotA) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (777 to 790) SpanInfo: {"start":877,"length":27}
|
||||
>console.log(skills.primary)
|
||||
>:=> (line 32, col 4) to (line 32, col 31)
|
||||
31 >function foo3({ skills = { primary: "SomeSkill", secondary: "someSkill" } }: Robot = robotA) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (791 to 869) SpanInfo: {"start":793,"length":57}
|
||||
>skills = { primary: "SomeSkill", secondary: "someSkill" }
|
||||
>:=> (line 31, col 16) to (line 31, col 73)
|
||||
31 >function foo3({ skills = { primary: "SomeSkill", secondary: "someSkill" } }: Robot = robotA) {
|
||||
|
||||
~~~=> Pos: (870 to 872) SpanInfo: {"start":877,"length":27}
|
||||
>console.log(skills.primary)
|
||||
>:=> (line 32, col 4) to (line 32, col 31)
|
||||
--------------------------------
|
||||
32 > console.log(skills.primary);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (873 to 905) SpanInfo: {"start":877,"length":27}
|
||||
>console.log(skills.primary)
|
||||
>:=> (line 32, col 4) to (line 32, col 31)
|
||||
--------------------------------
|
||||
33 >}
|
||||
|
||||
~~ => Pos: (906 to 907) SpanInfo: {"start":906,"length":1}
|
||||
>}
|
||||
>:=> (line 33, col 0) to (line 33, col 1)
|
||||
--------------------------------
|
||||
34 >foo1(robotA);
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (908 to 921) SpanInfo: {"start":908,"length":12}
|
||||
>foo1(robotA)
|
||||
>:=> (line 34, col 0) to (line 34, col 12)
|
||||
--------------------------------
|
||||
35 >foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } });
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (922 to 1007) SpanInfo: {"start":922,"length":84}
|
||||
>foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } })
|
||||
>:=> (line 35, col 0) to (line 35, col 84)
|
||||
--------------------------------
|
||||
36 >foo2(robotA);
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (1008 to 1021) SpanInfo: {"start":1008,"length":12}
|
||||
>foo2(robotA)
|
||||
>:=> (line 36, col 0) to (line 36, col 12)
|
||||
--------------------------------
|
||||
37 >foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } });
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1022 to 1107) SpanInfo: {"start":1022,"length":84}
|
||||
>foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } })
|
||||
>:=> (line 37, col 0) to (line 37, col 84)
|
||||
--------------------------------
|
||||
38 >foo3(robotA);
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (1108 to 1121) SpanInfo: {"start":1108,"length":12}
|
||||
>foo3(robotA)
|
||||
>:=> (line 38, col 0) to (line 38, col 12)
|
||||
--------------------------------
|
||||
39 >foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } });
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1122 to 1206) SpanInfo: {"start":1122,"length":84}
|
||||
>foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } })
|
||||
>:=> (line 39, col 0) to (line 39, col 84)
|
||||
@@ -0,0 +1,164 @@
|
||||
|
||||
1 >interface Robot {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (0 to 17) SpanInfo: undefined
|
||||
--------------------------------
|
||||
2 > name: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (18 to 35) SpanInfo: undefined
|
||||
--------------------------------
|
||||
3 > skill: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (36 to 54) SpanInfo: undefined
|
||||
--------------------------------
|
||||
4 >}
|
||||
|
||||
~~ => Pos: (55 to 56) SpanInfo: undefined
|
||||
--------------------------------
|
||||
5 >declare var console: {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (57 to 79) SpanInfo: undefined
|
||||
--------------------------------
|
||||
6 > log(msg: string): void;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (80 to 107) SpanInfo: undefined
|
||||
--------------------------------
|
||||
7 >}
|
||||
|
||||
~~ => Pos: (108 to 109) SpanInfo: undefined
|
||||
--------------------------------
|
||||
8 >var hello = "hello";
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~ => Pos: (110 to 130) SpanInfo: {"start":110,"length":19}
|
||||
>var hello = "hello"
|
||||
>:=> (line 8, col 0) to (line 8, col 19)
|
||||
--------------------------------
|
||||
9 >var robotA: Robot = { name: "mower", skill: "mowing" };
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (131 to 186) SpanInfo: {"start":131,"length":54}
|
||||
>var robotA: Robot = { name: "mower", skill: "mowing" }
|
||||
>:=> (line 9, col 0) to (line 9, col 54)
|
||||
--------------------------------
|
||||
10 >function foo1({ name: nameA }: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (187 to 200) SpanInfo: {"start":231,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 11, col 4) to (line 11, col 22)
|
||||
10 >function foo1({ name: nameA }: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (201 to 223) SpanInfo: {"start":203,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 10, col 16) to (line 10, col 27)
|
||||
10 >function foo1({ name: nameA }: Robot) {
|
||||
|
||||
~~~ => Pos: (224 to 226) SpanInfo: {"start":231,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 11, col 4) to (line 11, col 22)
|
||||
--------------------------------
|
||||
11 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (227 to 250) SpanInfo: {"start":231,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 11, col 4) to (line 11, col 22)
|
||||
--------------------------------
|
||||
12 >}
|
||||
|
||||
~~ => Pos: (251 to 252) SpanInfo: {"start":251,"length":1}
|
||||
>}
|
||||
>:=> (line 12, col 0) to (line 12, col 1)
|
||||
--------------------------------
|
||||
13 >function foo2({ name: nameB, skill: skillB }: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (253 to 266) SpanInfo: {"start":312,"length":18}
|
||||
>console.log(nameB)
|
||||
>:=> (line 14, col 4) to (line 14, col 22)
|
||||
13 >function foo2({ name: nameB, skill: skillB }: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (267 to 280) SpanInfo: {"start":269,"length":11}
|
||||
>name: nameB
|
||||
>:=> (line 13, col 16) to (line 13, col 27)
|
||||
13 >function foo2({ name: nameB, skill: skillB }: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (281 to 304) SpanInfo: {"start":282,"length":13}
|
||||
>skill: skillB
|
||||
>:=> (line 13, col 29) to (line 13, col 42)
|
||||
13 >function foo2({ name: nameB, skill: skillB }: Robot) {
|
||||
|
||||
~~~=> Pos: (305 to 307) SpanInfo: {"start":312,"length":18}
|
||||
>console.log(nameB)
|
||||
>:=> (line 14, col 4) to (line 14, col 22)
|
||||
--------------------------------
|
||||
14 > console.log(nameB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (308 to 331) SpanInfo: {"start":312,"length":18}
|
||||
>console.log(nameB)
|
||||
>:=> (line 14, col 4) to (line 14, col 22)
|
||||
--------------------------------
|
||||
15 >}
|
||||
|
||||
~~ => Pos: (332 to 333) SpanInfo: {"start":332,"length":1}
|
||||
>}
|
||||
>:=> (line 15, col 0) to (line 15, col 1)
|
||||
--------------------------------
|
||||
16 >function foo3({ name }: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (334 to 347) SpanInfo: {"start":371,"length":17}
|
||||
>console.log(name)
|
||||
>:=> (line 17, col 4) to (line 17, col 21)
|
||||
16 >function foo3({ name }: Robot) {
|
||||
|
||||
~~~~~~~~~~~~~~~~ => Pos: (348 to 363) SpanInfo: {"start":350,"length":4}
|
||||
>name
|
||||
>:=> (line 16, col 16) to (line 16, col 20)
|
||||
16 >function foo3({ name }: Robot) {
|
||||
|
||||
~~~ => Pos: (364 to 366) SpanInfo: {"start":371,"length":17}
|
||||
>console.log(name)
|
||||
>:=> (line 17, col 4) to (line 17, col 21)
|
||||
--------------------------------
|
||||
17 > console.log(name);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (367 to 389) SpanInfo: {"start":371,"length":17}
|
||||
>console.log(name)
|
||||
>:=> (line 17, col 4) to (line 17, col 21)
|
||||
--------------------------------
|
||||
18 >}
|
||||
|
||||
~~ => Pos: (390 to 391) SpanInfo: {"start":390,"length":1}
|
||||
>}
|
||||
>:=> (line 18, col 0) to (line 18, col 1)
|
||||
--------------------------------
|
||||
19 >foo1(robotA);
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (392 to 405) SpanInfo: {"start":392,"length":12}
|
||||
>foo1(robotA)
|
||||
>:=> (line 19, col 0) to (line 19, col 12)
|
||||
--------------------------------
|
||||
20 >foo1({ name: "Edger", skill: "cutting edges" });
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (406 to 454) SpanInfo: {"start":406,"length":47}
|
||||
>foo1({ name: "Edger", skill: "cutting edges" })
|
||||
>:=> (line 20, col 0) to (line 20, col 47)
|
||||
--------------------------------
|
||||
21 >foo2(robotA);
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (455 to 468) SpanInfo: {"start":455,"length":12}
|
||||
>foo2(robotA)
|
||||
>:=> (line 21, col 0) to (line 21, col 12)
|
||||
--------------------------------
|
||||
22 >foo2({ name: "Edger", skill: "cutting edges" });
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (469 to 517) SpanInfo: {"start":469,"length":47}
|
||||
>foo2({ name: "Edger", skill: "cutting edges" })
|
||||
>:=> (line 22, col 0) to (line 22, col 47)
|
||||
--------------------------------
|
||||
23 >foo3(robotA);
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (518 to 531) SpanInfo: {"start":518,"length":12}
|
||||
>foo3(robotA)
|
||||
>:=> (line 23, col 0) to (line 23, col 12)
|
||||
--------------------------------
|
||||
24 >foo3({ name: "Edger", skill: "cutting edges" });
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (532 to 579) SpanInfo: {"start":532,"length":47}
|
||||
>foo3({ name: "Edger", skill: "cutting edges" })
|
||||
>:=> (line 24, col 0) to (line 24, col 47)
|
||||
+164
@@ -0,0 +1,164 @@
|
||||
|
||||
1 >interface Robot {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (0 to 17) SpanInfo: undefined
|
||||
--------------------------------
|
||||
2 > name?: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (18 to 36) SpanInfo: undefined
|
||||
--------------------------------
|
||||
3 > skill?: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~ => Pos: (37 to 56) SpanInfo: undefined
|
||||
--------------------------------
|
||||
4 >}
|
||||
|
||||
~~ => Pos: (57 to 58) SpanInfo: undefined
|
||||
--------------------------------
|
||||
5 >declare var console: {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (59 to 81) SpanInfo: undefined
|
||||
--------------------------------
|
||||
6 > log(msg: string): void;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (82 to 109) SpanInfo: undefined
|
||||
--------------------------------
|
||||
7 >}
|
||||
|
||||
~~ => Pos: (110 to 111) SpanInfo: undefined
|
||||
--------------------------------
|
||||
8 >var hello = "hello";
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~ => Pos: (112 to 132) SpanInfo: {"start":112,"length":19}
|
||||
>var hello = "hello"
|
||||
>:=> (line 8, col 0) to (line 8, col 19)
|
||||
--------------------------------
|
||||
9 >var robotA: Robot = { name: "mower", skill: "mowing" };
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (133 to 188) SpanInfo: {"start":133,"length":54}
|
||||
>var robotA: Robot = { name: "mower", skill: "mowing" }
|
||||
>:=> (line 9, col 0) to (line 9, col 54)
|
||||
--------------------------------
|
||||
10 >function foo1({ name: nameA = "<NoName>" }: Robot = { }) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (189 to 202) SpanInfo: {"start":252,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 11, col 4) to (line 11, col 22)
|
||||
10 >function foo1({ name: nameA = "<NoName>" }: Robot = { }) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (203 to 244) SpanInfo: {"start":205,"length":24}
|
||||
>name: nameA = "<NoName>"
|
||||
>:=> (line 10, col 16) to (line 10, col 40)
|
||||
10 >function foo1({ name: nameA = "<NoName>" }: Robot = { }) {
|
||||
|
||||
~~~=> Pos: (245 to 247) SpanInfo: {"start":252,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 11, col 4) to (line 11, col 22)
|
||||
--------------------------------
|
||||
11 > console.log(nameA);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (248 to 271) SpanInfo: {"start":252,"length":18}
|
||||
>console.log(nameA)
|
||||
>:=> (line 11, col 4) to (line 11, col 22)
|
||||
--------------------------------
|
||||
12 >}
|
||||
|
||||
~~ => Pos: (272 to 273) SpanInfo: {"start":272,"length":1}
|
||||
>}
|
||||
>:=> (line 12, col 0) to (line 12, col 1)
|
||||
--------------------------------
|
||||
13 >function foo2({ name: nameB = "<NoName>", skill: skillB = "noSkill" }: Robot = {}) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (274 to 287) SpanInfo: {"start":363,"length":18}
|
||||
>console.log(nameB)
|
||||
>:=> (line 14, col 4) to (line 14, col 22)
|
||||
13 >function foo2({ name: nameB = "<NoName>", skill: skillB = "noSkill" }: Robot = {}) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (288 to 314) SpanInfo: {"start":290,"length":24}
|
||||
>name: nameB = "<NoName>"
|
||||
>:=> (line 13, col 16) to (line 13, col 40)
|
||||
13 >function foo2({ name: nameB = "<NoName>", skill: skillB = "noSkill" }: Robot = {}) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (315 to 355) SpanInfo: {"start":316,"length":25}
|
||||
>skill: skillB = "noSkill"
|
||||
>:=> (line 13, col 42) to (line 13, col 67)
|
||||
13 >function foo2({ name: nameB = "<NoName>", skill: skillB = "noSkill" }: Robot = {}) {
|
||||
|
||||
~~~=> Pos: (356 to 358) SpanInfo: {"start":363,"length":18}
|
||||
>console.log(nameB)
|
||||
>:=> (line 14, col 4) to (line 14, col 22)
|
||||
--------------------------------
|
||||
14 > console.log(nameB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (359 to 382) SpanInfo: {"start":363,"length":18}
|
||||
>console.log(nameB)
|
||||
>:=> (line 14, col 4) to (line 14, col 22)
|
||||
--------------------------------
|
||||
15 >}
|
||||
|
||||
~~ => Pos: (383 to 384) SpanInfo: {"start":383,"length":1}
|
||||
>}
|
||||
>:=> (line 15, col 0) to (line 15, col 1)
|
||||
--------------------------------
|
||||
16 >function foo3({ name = "<NoName>" }: Robot = {}) {
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (385 to 398) SpanInfo: {"start":440,"length":17}
|
||||
>console.log(name)
|
||||
>:=> (line 17, col 4) to (line 17, col 21)
|
||||
16 >function foo3({ name = "<NoName>" }: Robot = {}) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (399 to 432) SpanInfo: {"start":401,"length":17}
|
||||
>name = "<NoName>"
|
||||
>:=> (line 16, col 16) to (line 16, col 33)
|
||||
16 >function foo3({ name = "<NoName>" }: Robot = {}) {
|
||||
|
||||
~~~=> Pos: (433 to 435) SpanInfo: {"start":440,"length":17}
|
||||
>console.log(name)
|
||||
>:=> (line 17, col 4) to (line 17, col 21)
|
||||
--------------------------------
|
||||
17 > console.log(name);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (436 to 458) SpanInfo: {"start":440,"length":17}
|
||||
>console.log(name)
|
||||
>:=> (line 17, col 4) to (line 17, col 21)
|
||||
--------------------------------
|
||||
18 >}
|
||||
|
||||
~~ => Pos: (459 to 460) SpanInfo: {"start":459,"length":1}
|
||||
>}
|
||||
>:=> (line 18, col 0) to (line 18, col 1)
|
||||
--------------------------------
|
||||
19 >foo1(robotA);
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (461 to 474) SpanInfo: {"start":461,"length":12}
|
||||
>foo1(robotA)
|
||||
>:=> (line 19, col 0) to (line 19, col 12)
|
||||
--------------------------------
|
||||
20 >foo1({ name: "Edger", skill: "cutting edges" });
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (475 to 523) SpanInfo: {"start":475,"length":47}
|
||||
>foo1({ name: "Edger", skill: "cutting edges" })
|
||||
>:=> (line 20, col 0) to (line 20, col 47)
|
||||
--------------------------------
|
||||
21 >foo2(robotA);
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (524 to 537) SpanInfo: {"start":524,"length":12}
|
||||
>foo2(robotA)
|
||||
>:=> (line 21, col 0) to (line 21, col 12)
|
||||
--------------------------------
|
||||
22 >foo2({ name: "Edger", skill: "cutting edges" });
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (538 to 586) SpanInfo: {"start":538,"length":47}
|
||||
>foo2({ name: "Edger", skill: "cutting edges" })
|
||||
>:=> (line 22, col 0) to (line 22, col 47)
|
||||
--------------------------------
|
||||
23 >foo3(robotA);
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (587 to 600) SpanInfo: {"start":587,"length":12}
|
||||
>foo3(robotA)
|
||||
>:=> (line 23, col 0) to (line 23, col 12)
|
||||
--------------------------------
|
||||
24 >foo3({ name: "Edger", skill: "cutting edges" });
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (601 to 648) SpanInfo: {"start":601,"length":47}
|
||||
>foo3({ name: "Edger", skill: "cutting edges" })
|
||||
>:=> (line 24, col 0) to (line 24, col 47)
|
||||
@@ -0,0 +1,109 @@
|
||||
|
||||
1 >interface Robot {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (0 to 17) SpanInfo: undefined
|
||||
--------------------------------
|
||||
2 > name: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (18 to 35) SpanInfo: undefined
|
||||
--------------------------------
|
||||
3 > skill: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (36 to 54) SpanInfo: undefined
|
||||
--------------------------------
|
||||
4 >}
|
||||
|
||||
~~ => Pos: (55 to 56) SpanInfo: undefined
|
||||
--------------------------------
|
||||
5 >declare var console: {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (57 to 79) SpanInfo: undefined
|
||||
--------------------------------
|
||||
6 > log(msg: string): void;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (80 to 107) SpanInfo: undefined
|
||||
--------------------------------
|
||||
7 >}
|
||||
|
||||
~~ => Pos: (108 to 109) SpanInfo: undefined
|
||||
--------------------------------
|
||||
8 >var hello = "hello";
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~ => Pos: (110 to 130) SpanInfo: {"start":110,"length":19}
|
||||
>var hello = "hello"
|
||||
>:=> (line 8, col 0) to (line 8, col 19)
|
||||
--------------------------------
|
||||
9 >var robotA: Robot = { name: "mower", skill: "mowing" };
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (131 to 186) SpanInfo: {"start":131,"length":54}
|
||||
>var robotA: Robot = { name: "mower", skill: "mowing" }
|
||||
>:=> (line 9, col 0) to (line 9, col 54)
|
||||
--------------------------------
|
||||
10 >var robotB: Robot = { name: "trimmer", skill: "trimming" };
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (187 to 246) SpanInfo: {"start":187,"length":58}
|
||||
>var robotB: Robot = { name: "trimmer", skill: "trimming" }
|
||||
>:=> (line 10, col 0) to (line 10, col 58)
|
||||
--------------------------------
|
||||
11 >var { name: nameA } = robotA;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (247 to 276) SpanInfo: {"start":253,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 11, col 6) to (line 11, col 17)
|
||||
--------------------------------
|
||||
12 >var { name: nameB, skill: skillB } = robotB;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (277 to 294) SpanInfo: {"start":283,"length":11}
|
||||
>name: nameB
|
||||
>:=> (line 12, col 6) to (line 12, col 17)
|
||||
12 >var { name: nameB, skill: skillB } = robotB;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (295 to 321) SpanInfo: {"start":296,"length":13}
|
||||
>skill: skillB
|
||||
>:=> (line 12, col 19) to (line 12, col 32)
|
||||
--------------------------------
|
||||
13 >var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" };
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (322 to 339) SpanInfo: {"start":328,"length":11}
|
||||
>name: nameC
|
||||
>:=> (line 13, col 6) to (line 13, col 17)
|
||||
13 >var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" };
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (340 to 401) SpanInfo: {"start":341,"length":13}
|
||||
>skill: skillC
|
||||
>:=> (line 13, col 19) to (line 13, col 32)
|
||||
--------------------------------
|
||||
14 >if (nameA == nameB) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~ => Pos: (402 to 423) SpanInfo: {"start":402,"length":19}
|
||||
>if (nameA == nameB)
|
||||
>:=> (line 14, col 0) to (line 14, col 19)
|
||||
--------------------------------
|
||||
15 > console.log(skillB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (424 to 448) SpanInfo: {"start":428,"length":19}
|
||||
>console.log(skillB)
|
||||
>:=> (line 15, col 4) to (line 15, col 23)
|
||||
--------------------------------
|
||||
16 >}
|
||||
|
||||
~~ => Pos: (449 to 450) SpanInfo: {"start":428,"length":19}
|
||||
>console.log(skillB)
|
||||
>:=> (line 15, col 4) to (line 15, col 23)
|
||||
--------------------------------
|
||||
17 >else {
|
||||
|
||||
~~~~~~~ => Pos: (451 to 457) SpanInfo: {"start":462,"length":18}
|
||||
>console.log(nameC)
|
||||
>:=> (line 18, col 4) to (line 18, col 22)
|
||||
--------------------------------
|
||||
18 > console.log(nameC);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (458 to 481) SpanInfo: {"start":462,"length":18}
|
||||
>console.log(nameC)
|
||||
>:=> (line 18, col 4) to (line 18, col 22)
|
||||
--------------------------------
|
||||
19 >}
|
||||
~ => Pos: (482 to 482) SpanInfo: {"start":462,"length":18}
|
||||
>console.log(nameC)
|
||||
>:=> (line 18, col 4) to (line 18, col 22)
|
||||
@@ -0,0 +1,227 @@
|
||||
|
||||
1 >interface Robot {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (0 to 17) SpanInfo: undefined
|
||||
--------------------------------
|
||||
2 > name: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (18 to 35) SpanInfo: undefined
|
||||
--------------------------------
|
||||
3 > skill: string;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~ => Pos: (36 to 54) SpanInfo: undefined
|
||||
--------------------------------
|
||||
4 >}
|
||||
|
||||
~~ => Pos: (55 to 56) SpanInfo: undefined
|
||||
--------------------------------
|
||||
5 >declare var console: {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (57 to 79) SpanInfo: undefined
|
||||
--------------------------------
|
||||
6 > log(msg: string): void;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (80 to 107) SpanInfo: undefined
|
||||
--------------------------------
|
||||
7 >}
|
||||
|
||||
~~ => Pos: (108 to 109) SpanInfo: undefined
|
||||
--------------------------------
|
||||
8 >var hello = "hello";
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~ => Pos: (110 to 130) SpanInfo: {"start":110,"length":19}
|
||||
>var hello = "hello"
|
||||
>:=> (line 8, col 0) to (line 8, col 19)
|
||||
--------------------------------
|
||||
9 >var robotA: Robot = { name: "mower", skill: "mowing" };
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (131 to 186) SpanInfo: {"start":131,"length":54}
|
||||
>var robotA: Robot = { name: "mower", skill: "mowing" }
|
||||
>:=> (line 9, col 0) to (line 9, col 54)
|
||||
--------------------------------
|
||||
10 >var robotB: Robot = { name: "trimmer", skill: "trimming" };
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (187 to 246) SpanInfo: {"start":187,"length":58}
|
||||
>var robotB: Robot = { name: "trimmer", skill: "trimming" }
|
||||
>:=> (line 10, col 0) to (line 10, col 58)
|
||||
--------------------------------
|
||||
11 >var a: string, { name: nameA } = robotA;
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (247 to 260) SpanInfo: undefined
|
||||
11 >var a: string, { name: nameA } = robotA;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (261 to 287) SpanInfo: {"start":264,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 11, col 17) to (line 11, col 28)
|
||||
--------------------------------
|
||||
12 >var b: string, { name: nameB, skill: skillB } = robotB;
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (288 to 301) SpanInfo: undefined
|
||||
12 >var b: string, { name: nameB, skill: skillB } = robotB;
|
||||
|
||||
~~~~~~~~~~~~~~~ => Pos: (302 to 316) SpanInfo: {"start":305,"length":11}
|
||||
>name: nameB
|
||||
>:=> (line 12, col 17) to (line 12, col 28)
|
||||
12 >var b: string, { name: nameB, skill: skillB } = robotB;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (317 to 343) SpanInfo: {"start":318,"length":13}
|
||||
>skill: skillB
|
||||
>:=> (line 12, col 30) to (line 12, col 43)
|
||||
--------------------------------
|
||||
13 >var c: string, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" };
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (344 to 357) SpanInfo: undefined
|
||||
13 >var c: string, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" };
|
||||
|
||||
~~~~~~~~~~~~~~~ => Pos: (358 to 372) SpanInfo: {"start":361,"length":11}
|
||||
>name: nameC
|
||||
>:=> (line 13, col 17) to (line 13, col 28)
|
||||
13 >var c: string, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" };
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (373 to 434) SpanInfo: {"start":374,"length":13}
|
||||
>skill: skillC
|
||||
>:=> (line 13, col 30) to (line 13, col 43)
|
||||
--------------------------------
|
||||
14 >
|
||||
|
||||
~ => Pos: (435 to 435) SpanInfo: undefined
|
||||
--------------------------------
|
||||
15 >var { name: nameA } = robotA, a = hello;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (436 to 464) SpanInfo: {"start":442,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 15, col 6) to (line 15, col 17)
|
||||
15 >var { name: nameA } = robotA, a = hello;
|
||||
|
||||
~~~~~~~~~~~~ => Pos: (465 to 476) SpanInfo: {"start":466,"length":9}
|
||||
>a = hello
|
||||
>:=> (line 15, col 30) to (line 15, col 39)
|
||||
--------------------------------
|
||||
16 >var { name: nameB, skill: skillB } = robotB, b = " hello";
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (477 to 494) SpanInfo: {"start":483,"length":11}
|
||||
>name: nameB
|
||||
>:=> (line 16, col 6) to (line 16, col 17)
|
||||
16 >var { name: nameB, skill: skillB } = robotB, b = " hello";
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (495 to 520) SpanInfo: {"start":496,"length":13}
|
||||
>skill: skillB
|
||||
>:=> (line 16, col 19) to (line 16, col 32)
|
||||
16 >var { name: nameB, skill: skillB } = robotB, b = " hello";
|
||||
|
||||
~~~~~~~~~~~~~~~=> Pos: (521 to 535) SpanInfo: {"start":522,"length":12}
|
||||
>b = " hello"
|
||||
>:=> (line 16, col 45) to (line 16, col 57)
|
||||
--------------------------------
|
||||
17 >var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c = hello;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~ => Pos: (536 to 553) SpanInfo: {"start":542,"length":11}
|
||||
>name: nameC
|
||||
>:=> (line 17, col 6) to (line 17, col 17)
|
||||
17 >var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c = hello;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (554 to 614) SpanInfo: {"start":555,"length":13}
|
||||
>skill: skillC
|
||||
>:=> (line 17, col 19) to (line 17, col 32)
|
||||
17 >var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c = hello;
|
||||
|
||||
~~~~~~~~~~~~=> Pos: (615 to 626) SpanInfo: {"start":616,"length":9}
|
||||
>c = hello
|
||||
>:=> (line 17, col 80) to (line 17, col 89)
|
||||
--------------------------------
|
||||
18 >
|
||||
|
||||
~ => Pos: (627 to 627) SpanInfo: undefined
|
||||
--------------------------------
|
||||
19 >var a = hello, { name: nameA } = robotA, a1= "hello";
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (628 to 641) SpanInfo: {"start":628,"length":13}
|
||||
>var a = hello
|
||||
>:=> (line 19, col 0) to (line 19, col 13)
|
||||
19 >var a = hello, { name: nameA } = robotA, a1= "hello";
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (642 to 667) SpanInfo: {"start":645,"length":11}
|
||||
>name: nameA
|
||||
>:=> (line 19, col 17) to (line 19, col 28)
|
||||
19 >var a = hello, { name: nameA } = robotA, a1= "hello";
|
||||
|
||||
~~~~~~~~~~~~~~=> Pos: (668 to 681) SpanInfo: {"start":669,"length":11}
|
||||
>a1= "hello"
|
||||
>:=> (line 19, col 41) to (line 19, col 52)
|
||||
--------------------------------
|
||||
20 >var b = hello, { name: nameB, skill: skillB } = robotB, b1 = "hello";
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (682 to 695) SpanInfo: {"start":682,"length":13}
|
||||
>var b = hello
|
||||
>:=> (line 20, col 0) to (line 20, col 13)
|
||||
20 >var b = hello, { name: nameB, skill: skillB } = robotB, b1 = "hello";
|
||||
|
||||
~~~~~~~~~~~~~~~ => Pos: (696 to 710) SpanInfo: {"start":699,"length":11}
|
||||
>name: nameB
|
||||
>:=> (line 20, col 17) to (line 20, col 28)
|
||||
20 >var b = hello, { name: nameB, skill: skillB } = robotB, b1 = "hello";
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (711 to 736) SpanInfo: {"start":712,"length":13}
|
||||
>skill: skillB
|
||||
>:=> (line 20, col 30) to (line 20, col 43)
|
||||
20 >var b = hello, { name: nameB, skill: skillB } = robotB, b1 = "hello";
|
||||
|
||||
~~~~~~~~~~~~~~~=> Pos: (737 to 751) SpanInfo: {"start":738,"length":12}
|
||||
>b1 = "hello"
|
||||
>:=> (line 20, col 56) to (line 20, col 68)
|
||||
--------------------------------
|
||||
21 >var c = hello, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c1 = hello;
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (752 to 765) SpanInfo: {"start":752,"length":13}
|
||||
>var c = hello
|
||||
>:=> (line 21, col 0) to (line 21, col 13)
|
||||
21 >var c = hello, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c1 = hello;
|
||||
|
||||
~~~~~~~~~~~~~~~ => Pos: (766 to 780) SpanInfo: {"start":769,"length":11}
|
||||
>name: nameC
|
||||
>:=> (line 21, col 17) to (line 21, col 28)
|
||||
21 >var c = hello, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c1 = hello;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (781 to 841) SpanInfo: {"start":782,"length":13}
|
||||
>skill: skillC
|
||||
>:=> (line 21, col 30) to (line 21, col 43)
|
||||
21 >var c = hello, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c1 = hello;
|
||||
|
||||
~~~~~~~~~~~~~=> Pos: (842 to 854) SpanInfo: {"start":843,"length":10}
|
||||
>c1 = hello
|
||||
>:=> (line 21, col 91) to (line 21, col 101)
|
||||
--------------------------------
|
||||
22 >if (nameA == nameB) {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~ => Pos: (855 to 876) SpanInfo: {"start":855,"length":19}
|
||||
>if (nameA == nameB)
|
||||
>:=> (line 22, col 0) to (line 22, col 19)
|
||||
--------------------------------
|
||||
23 > console.log(skillB);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (877 to 901) SpanInfo: {"start":881,"length":19}
|
||||
>console.log(skillB)
|
||||
>:=> (line 23, col 4) to (line 23, col 23)
|
||||
--------------------------------
|
||||
24 >}
|
||||
|
||||
~~ => Pos: (902 to 903) SpanInfo: {"start":881,"length":19}
|
||||
>console.log(skillB)
|
||||
>:=> (line 23, col 4) to (line 23, col 23)
|
||||
--------------------------------
|
||||
25 >else {
|
||||
|
||||
~~~~~~~ => Pos: (904 to 910) SpanInfo: {"start":915,"length":18}
|
||||
>console.log(nameC)
|
||||
>:=> (line 26, col 4) to (line 26, col 22)
|
||||
--------------------------------
|
||||
26 > console.log(nameC);
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (911 to 934) SpanInfo: {"start":915,"length":18}
|
||||
>console.log(nameC)
|
||||
>:=> (line 26, col 4) to (line 26, col 22)
|
||||
--------------------------------
|
||||
27 >}
|
||||
~ => Pos: (935 to 935) SpanInfo: {"start":915,"length":18}
|
||||
>console.log(nameC)
|
||||
>:=> (line 26, col 4) to (line 26, col 22)
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
|
||||
1 >declare var console: {
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined
|
||||
--------------------------------
|
||||
2 > log(msg: string): void;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 50) SpanInfo: undefined
|
||||
--------------------------------
|
||||
3 >}
|
||||
|
||||
~~ => Pos: (51 to 52) SpanInfo: undefined
|
||||
--------------------------------
|
||||
4 >type Robot = [number, string, string];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (53 to 91) SpanInfo: undefined
|
||||
--------------------------------
|
||||
5 >var robotA: Robot = [1, "mower", "mowing"];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (92 to 135) SpanInfo: {"start":92,"length":42}
|
||||
>var robotA: Robot = [1, "mower", "mowing"]
|
||||
>:=> (line 5, col 0) to (line 5, col 42)
|
||||
--------------------------------
|
||||
6 >var robotB: Robot = [2, "trimmer", "trimming"];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (136 to 183) SpanInfo: {"start":136,"length":46}
|
||||
>var robotB: Robot = [2, "trimmer", "trimming"]
|
||||
>:=> (line 6, col 0) to (line 6, col 46)
|
||||
--------------------------------
|
||||
7 >let [, nameA] = robotA;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (184 to 207) SpanInfo: {"start":191,"length":5}
|
||||
>nameA
|
||||
>:=> (line 7, col 7) to (line 7, col 12)
|
||||
--------------------------------
|
||||
8 >let [numberB] = robotB;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (208 to 231) SpanInfo: {"start":213,"length":7}
|
||||
>numberB
|
||||
>:=> (line 8, col 5) to (line 8, col 12)
|
||||
--------------------------------
|
||||
9 >let [numberA2, nameA2, skillA2] = robotA;
|
||||
|
||||
~~~~~~~~~~~~~~ => Pos: (232 to 245) SpanInfo: {"start":237,"length":8}
|
||||
>numberA2
|
||||
>:=> (line 9, col 5) to (line 9, col 13)
|
||||
9 >let [numberA2, nameA2, skillA2] = robotA;
|
||||
|
||||
~~~~~~~~ => Pos: (246 to 253) SpanInfo: {"start":247,"length":6}
|
||||
>nameA2
|
||||
>:=> (line 9, col 15) to (line 9, col 21)
|
||||
9 >let [numberA2, nameA2, skillA2] = robotA;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~ => Pos: (254 to 273) SpanInfo: {"start":255,"length":7}
|
||||
>skillA2
|
||||
>:=> (line 9, col 23) to (line 9, col 30)
|
||||
--------------------------------
|
||||
10 >let [numberC2] = [3, "edging", "Trimming edges"];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (274 to 323) SpanInfo: {"start":279,"length":8}
|
||||
>numberC2
|
||||
>:=> (line 10, col 5) to (line 10, col 13)
|
||||
--------------------------------
|
||||
11 >let [numberC, nameC, skillC] = [3, "edging", "Trimming edges"];
|
||||
|
||||
~~~~~~~~~~~~~ => Pos: (324 to 336) SpanInfo: {"start":329,"length":7}
|
||||
>numberC
|
||||
>:=> (line 11, col 5) to (line 11, col 12)
|
||||
11 >let [numberC, nameC, skillC] = [3, "edging", "Trimming edges"];
|
||||
|
||||
~~~~~~~ => Pos: (337 to 343) SpanInfo: {"start":338,"length":5}
|
||||
>nameC
|
||||
>:=> (line 11, col 14) to (line 11, col 19)
|
||||
11 >let [numberC, nameC, skillC] = [3, "edging", "Trimming edges"];
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (344 to 387) SpanInfo: {"start":345,"length":6}
|
||||
>skillC
|
||||
>:=> (line 11, col 21) to (line 11, col 27)
|
||||
--------------------------------
|
||||
12 >let [numberA3, ...robotAInfo] = robotA;
|
||||
~~~~~~~~~~~~~~ => Pos: (388 to 401) SpanInfo: {"start":393,"length":8}
|
||||
>numberA3
|
||||
>:=> (line 12, col 5) to (line 12, col 13)
|
||||
12 >let [numberA3, ...robotAInfo] = robotA;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (402 to 426) SpanInfo: {"start":403,"length":13}
|
||||
>...robotAInfo
|
||||
>:=> (line 12, col 15) to (line 12, col 28)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user