Update baselines

This commit is contained in:
Nathan Shively-Sanders
2017-07-13 11:34:56 -07:00
parent 91633cde5f
commit 48d9012989
72 changed files with 970 additions and 476 deletions
@@ -54,10 +54,10 @@
"pos": 34,
"end": 42,
"type": {
"kind": "JSDocTypeReference",
"kind": "TypeReference",
"pos": 35,
"end": 41,
"name": {
"typeName": {
"kind": "Identifier",
"pos": 35,
"end": 41,
@@ -1,5 +1,6 @@
{
"kind": "JSDocAllType",
"pos": 1,
"end": 2
"end": 2,
"flags": "JSDoc"
}
@@ -1,15 +1,18 @@
{
"kind": "JSDocArrayType",
"kind": "ArrayType",
"pos": 1,
"end": 4,
"flags": "JSDoc",
"elementType": {
"kind": "JSDocTypeReference",
"kind": "TypeReference",
"pos": 1,
"end": 2,
"name": {
"flags": "JSDoc",
"typeName": {
"kind": "Identifier",
"pos": 1,
"end": 2,
"flags": "JSDoc",
"text": "a"
}
}
@@ -1,19 +1,23 @@
{
"kind": "JSDocArrayType",
"kind": "ArrayType",
"pos": 1,
"end": 6,
"flags": "JSDoc",
"elementType": {
"kind": "JSDocArrayType",
"kind": "ArrayType",
"pos": 1,
"end": 4,
"flags": "JSDoc",
"elementType": {
"kind": "JSDocTypeReference",
"kind": "TypeReference",
"pos": 1,
"end": 2,
"name": {
"flags": "JSDoc",
"typeName": {
"kind": "Identifier",
"pos": 1,
"end": 2,
"flags": "JSDoc",
"text": "a"
}
}
@@ -2,22 +2,27 @@
"kind": "JSDocOptionalType",
"pos": 1,
"end": 7,
"flags": "JSDoc",
"type": {
"kind": "JSDocArrayType",
"kind": "ArrayType",
"pos": 1,
"end": 6,
"flags": "JSDoc",
"elementType": {
"kind": "JSDocArrayType",
"kind": "ArrayType",
"pos": 1,
"end": 4,
"flags": "JSDoc",
"elementType": {
"kind": "JSDocTypeReference",
"kind": "TypeReference",
"pos": 1,
"end": 2,
"name": {
"flags": "JSDoc",
"typeName": {
"kind": "Identifier",
"pos": 1,
"end": 2,
"flags": "JSDoc",
"text": "a"
}
}
@@ -1,30 +1,28 @@
{
"kind": "JSDocRecordType",
"kind": "TypeLiteral",
"pos": 1,
"end": 13,
"literal": {
"kind": "TypeLiteral",
"pos": 1,
"end": 13,
"members": {
"0": {
"kind": "CallSignature",
"pos": 2,
"end": 12,
"parameters": {
"length": 0,
"pos": 3,
"end": 3
},
"type": {
"kind": "NumberKeyword",
"pos": 5,
"end": 12
}
},
"length": 1,
"flags": "JSDoc",
"members": {
"0": {
"kind": "CallSignature",
"pos": 2,
"end": 12
}
"end": 12,
"flags": "JSDoc",
"parameters": {
"length": 0,
"pos": 3,
"end": 3
},
"type": {
"kind": "NumberKeyword",
"pos": 5,
"end": 12,
"flags": "JSDoc"
}
},
"length": 1,
"pos": 2,
"end": 12
}
}
@@ -2,25 +2,30 @@
"kind": "JSDocFunctionType",
"pos": 1,
"end": 26,
"flags": "JSDoc",
"parameters": {
"0": {
"kind": "Parameter",
"pos": 10,
"end": 16,
"flags": "JSDoc",
"type": {
"kind": "StringKeyword",
"pos": 10,
"end": 16
"end": 16,
"flags": "JSDoc"
}
},
"1": {
"kind": "Parameter",
"pos": 17,
"end": 25,
"flags": "JSDoc",
"type": {
"kind": "BooleanKeyword",
"pos": 17,
"end": 25
"end": 25,
"flags": "JSDoc"
}
},
"length": 2,
@@ -2,6 +2,7 @@
"kind": "JSDocFunctionType",
"pos": 1,
"end": 11,
"flags": "JSDoc",
"parameters": {
"length": 0,
"pos": 10,
@@ -2,25 +2,30 @@
"kind": "JSDocFunctionType",
"pos": 1,
"end": 26,
"flags": "JSDoc",
"parameters": {
"0": {
"kind": "Parameter",
"pos": 10,
"end": 16,
"flags": "JSDoc",
"type": {
"kind": "StringKeyword",
"pos": 10,
"end": 16
"end": 16,
"flags": "JSDoc"
}
},
"1": {
"kind": "Parameter",
"pos": 17,
"end": 25,
"flags": "JSDoc",
"type": {
"kind": "BooleanKeyword",
"pos": 17,
"end": 25
"end": 25,
"flags": "JSDoc"
}
},
"length": 2,
@@ -0,0 +1,31 @@
{
"kind": "JSDocFunctionType",
"pos": 1,
"end": 13,
"flags": "JSDoc",
"parameters": {
"0": {
"kind": "Parameter",
"pos": 10,
"end": 11,
"flags": "JSDoc",
"type": {
"kind": "TypeReference",
"pos": 10,
"end": 11,
"flags": "JSDoc",
"typeName": {
"kind": "Identifier",
"pos": 10,
"end": 11,
"flags": "JSDoc",
"text": "a"
}
}
},
"length": 1,
"pos": 10,
"end": 12,
"hasTrailingComma": true
}
}
@@ -1,11 +1,13 @@
{
"kind": "JSDocTypeReference",
"kind": "TypeReference",
"pos": 1,
"end": 4,
"name": {
"flags": "JSDoc",
"typeName": {
"kind": "Identifier",
"pos": 1,
"end": 4,
"flags": "JSDoc",
"originalKeywordKind": "VarKeyword",
"text": "var"
}
@@ -1,5 +1,6 @@
{
"kind": "NullKeyword",
"pos": 1,
"end": 5
"end": 5,
"flags": "JSDoc"
}
@@ -1,5 +1,6 @@
{
"kind": "UndefinedKeyword",
"pos": 1,
"end": 10
"end": 10,
"flags": "JSDoc"
}
@@ -1,36 +1,35 @@
{
"kind": "JSDocRecordType",
"kind": "TypeLiteral",
"pos": 1,
"end": 16,
"literal": {
"kind": "TypeLiteral",
"pos": 1,
"end": 16,
"members": {
"0": {
"kind": "MethodSignature",
"pos": 2,
"end": 15,
"name": {
"kind": "Identifier",
"pos": 2,
"end": 5,
"text": "foo"
},
"parameters": {
"length": 0,
"pos": 6,
"end": 6
},
"type": {
"kind": "NumberKeyword",
"pos": 8,
"end": 15
}
},
"length": 1,
"flags": "JSDoc",
"members": {
"0": {
"kind": "MethodSignature",
"pos": 2,
"end": 15
}
"end": 15,
"flags": "JSDoc",
"name": {
"kind": "Identifier",
"pos": 2,
"end": 5,
"flags": "JSDoc",
"text": "foo"
},
"parameters": {
"length": 0,
"pos": 6,
"end": 6
},
"type": {
"kind": "NumberKeyword",
"pos": 8,
"end": 15,
"flags": "JSDoc"
}
},
"length": 1,
"pos": 2,
"end": 15
}
}
@@ -1,25 +1,30 @@
{
"kind": "JSDocConstructorType",
"pos": 1,
"pos": 4,
"end": 8,
"flags": "JSDoc",
"type": {
"kind": "JSDocTypeReference",
"kind": "TypeReference",
"pos": 5,
"end": 8,
"name": {
"flags": "JSDoc",
"typeName": {
"kind": "FirstNode",
"pos": 5,
"end": 8,
"flags": "JSDoc",
"left": {
"kind": "Identifier",
"pos": 5,
"end": 6,
"flags": "JSDoc",
"text": "a"
},
"right": {
"kind": "Identifier",
"pos": 7,
"end": 8,
"flags": "JSDoc",
"text": "b"
}
}
@@ -2,9 +2,11 @@
"kind": "JSDocNonNullableType",
"pos": 1,
"end": 8,
"flags": "JSDoc",
"type": {
"kind": "NumberKeyword",
"pos": 2,
"end": 8
"end": 8,
"flags": "JSDoc"
}
}
@@ -2,9 +2,11 @@
"kind": "JSDocNonNullableType",
"pos": 1,
"end": 8,
"flags": "JSDoc",
"type": {
"kind": "NumberKeyword",
"pos": 1,
"end": 7
"end": 7,
"flags": "JSDoc"
}
}
@@ -2,9 +2,11 @@
"kind": "JSDocNullableType",
"pos": 1,
"end": 8,
"flags": "JSDoc",
"type": {
"kind": "NumberKeyword",
"pos": 2,
"end": 8
"end": 8,
"flags": "JSDoc"
}
}
@@ -2,9 +2,11 @@
"kind": "JSDocNullableType",
"pos": 1,
"end": 8,
"flags": "JSDoc",
"type": {
"kind": "NumberKeyword",
"pos": 1,
"end": 7
"end": 7,
"flags": "JSDoc"
}
}
@@ -2,9 +2,11 @@
"kind": "JSDocOptionalType",
"pos": 1,
"end": 3,
"flags": "JSDoc",
"type": {
"kind": "JSDocUnknownType",
"pos": 1,
"end": 2
"end": 2,
"flags": "JSDoc"
}
}
@@ -2,9 +2,11 @@
"kind": "JSDocOptionalType",
"pos": 1,
"end": 8,
"flags": "JSDoc",
"type": {
"kind": "NumberKeyword",
"pos": 1,
"end": 7
"end": 7,
"flags": "JSDoc"
}
}
@@ -1,15 +1,11 @@
{
"kind": "JSDocRecordType",
"kind": "TypeLiteral",
"pos": 1,
"end": 3,
"literal": {
"kind": "TypeLiteral",
"pos": 1,
"end": 3,
"members": {
"length": 0,
"pos": 2,
"end": 2
}
"flags": "JSDoc",
"members": {
"length": 0,
"pos": 2,
"end": 2
}
}
@@ -1,26 +1,24 @@
{
"kind": "JSDocRecordType",
"kind": "TypeLiteral",
"pos": 1,
"end": 6,
"literal": {
"kind": "TypeLiteral",
"pos": 1,
"end": 6,
"members": {
"0": {
"kind": "PropertySignature",
"flags": "JSDoc",
"members": {
"0": {
"kind": "PropertySignature",
"pos": 2,
"end": 5,
"flags": "JSDoc",
"name": {
"kind": "Identifier",
"pos": 2,
"end": 5,
"name": {
"kind": "Identifier",
"pos": 2,
"end": 5,
"text": "foo"
}
},
"length": 1,
"pos": 2,
"end": 5
}
"flags": "JSDoc",
"text": "foo"
}
},
"length": 1,
"pos": 2,
"end": 5
}
}
@@ -1,31 +1,30 @@
{
"kind": "JSDocRecordType",
"kind": "TypeLiteral",
"pos": 1,
"end": 14,
"literal": {
"kind": "TypeLiteral",
"pos": 1,
"end": 14,
"members": {
"0": {
"kind": "PropertySignature",
"pos": 2,
"end": 13,
"name": {
"kind": "Identifier",
"pos": 2,
"end": 5,
"text": "foo"
},
"type": {
"kind": "NumberKeyword",
"pos": 6,
"end": 13
}
},
"length": 1,
"flags": "JSDoc",
"members": {
"0": {
"kind": "PropertySignature",
"pos": 2,
"end": 13
}
"end": 13,
"flags": "JSDoc",
"name": {
"kind": "Identifier",
"pos": 2,
"end": 5,
"flags": "JSDoc",
"text": "foo"
},
"type": {
"kind": "NumberKeyword",
"pos": 6,
"end": 13,
"flags": "JSDoc"
}
},
"length": 1,
"pos": 2,
"end": 13
}
}
@@ -1,37 +1,37 @@
{
"kind": "JSDocRecordType",
"kind": "TypeLiteral",
"pos": 1,
"end": 11,
"literal": {
"kind": "TypeLiteral",
"pos": 1,
"end": 11,
"members": {
"0": {
"kind": "PropertySignature",
"flags": "JSDoc",
"members": {
"0": {
"kind": "PropertySignature",
"pos": 2,
"end": 6,
"flags": "JSDoc",
"name": {
"kind": "Identifier",
"pos": 2,
"end": 6,
"name": {
"kind": "Identifier",
"pos": 2,
"end": 5,
"text": "foo"
}
},
"1": {
"kind": "PropertySignature",
"end": 5,
"flags": "JSDoc",
"text": "foo"
}
},
"1": {
"kind": "PropertySignature",
"pos": 6,
"end": 10,
"flags": "JSDoc",
"name": {
"kind": "Identifier",
"pos": 6,
"end": 10,
"name": {
"kind": "Identifier",
"pos": 6,
"end": 10,
"text": "bar"
}
},
"length": 2,
"pos": 2,
"end": 10
}
"flags": "JSDoc",
"text": "bar"
}
},
"length": 2,
"pos": 2,
"end": 10
}
}
@@ -1,42 +1,43 @@
{
"kind": "JSDocRecordType",
"kind": "TypeLiteral",
"pos": 1,
"end": 19,
"literal": {
"kind": "TypeLiteral",
"pos": 1,
"end": 19,
"members": {
"0": {
"kind": "PropertySignature",
"flags": "JSDoc",
"members": {
"0": {
"kind": "PropertySignature",
"pos": 2,
"end": 14,
"flags": "JSDoc",
"name": {
"kind": "Identifier",
"pos": 2,
"end": 14,
"name": {
"kind": "Identifier",
"pos": 2,
"end": 5,
"text": "foo"
},
"type": {
"kind": "NumberKeyword",
"pos": 6,
"end": 13
}
"end": 5,
"flags": "JSDoc",
"text": "foo"
},
"1": {
"kind": "PropertySignature",
"type": {
"kind": "NumberKeyword",
"pos": 6,
"end": 13,
"flags": "JSDoc"
}
},
"1": {
"kind": "PropertySignature",
"pos": 14,
"end": 18,
"flags": "JSDoc",
"name": {
"kind": "Identifier",
"pos": 14,
"end": 18,
"name": {
"kind": "Identifier",
"pos": 14,
"end": 18,
"text": "bar"
}
},
"length": 2,
"pos": 2,
"end": 18
}
"flags": "JSDoc",
"text": "bar"
}
},
"length": 2,
"pos": 2,
"end": 18
}
}
@@ -1,42 +1,43 @@
{
"kind": "JSDocRecordType",
"kind": "TypeLiteral",
"pos": 1,
"end": 19,
"literal": {
"kind": "TypeLiteral",
"pos": 1,
"end": 19,
"members": {
"0": {
"kind": "PropertySignature",
"pos": 2,
"end": 6,
"name": {
"kind": "Identifier",
"pos": 2,
"end": 5,
"text": "foo"
}
},
"1": {
"kind": "PropertySignature",
"pos": 6,
"end": 18,
"name": {
"kind": "Identifier",
"pos": 6,
"end": 10,
"text": "bar"
},
"type": {
"kind": "NumberKeyword",
"pos": 11,
"end": 18
}
},
"length": 2,
"flags": "JSDoc",
"members": {
"0": {
"kind": "PropertySignature",
"pos": 2,
"end": 18
}
"end": 6,
"flags": "JSDoc",
"name": {
"kind": "Identifier",
"pos": 2,
"end": 5,
"flags": "JSDoc",
"text": "foo"
}
},
"1": {
"kind": "PropertySignature",
"pos": 6,
"end": 18,
"flags": "JSDoc",
"name": {
"kind": "Identifier",
"pos": 6,
"end": 10,
"flags": "JSDoc",
"text": "bar"
},
"type": {
"kind": "NumberKeyword",
"pos": 11,
"end": 18,
"flags": "JSDoc"
}
},
"length": 2,
"pos": 2,
"end": 18
}
}
@@ -1,47 +1,49 @@
{
"kind": "JSDocRecordType",
"kind": "TypeLiteral",
"pos": 1,
"end": 27,
"literal": {
"kind": "TypeLiteral",
"pos": 1,
"end": 27,
"members": {
"0": {
"kind": "PropertySignature",
"pos": 2,
"end": 14,
"name": {
"kind": "Identifier",
"pos": 2,
"end": 5,
"text": "foo"
},
"type": {
"kind": "NumberKeyword",
"pos": 6,
"end": 13
}
},
"1": {
"kind": "PropertySignature",
"pos": 14,
"end": 26,
"name": {
"kind": "Identifier",
"pos": 14,
"end": 18,
"text": "bar"
},
"type": {
"kind": "NumberKeyword",
"pos": 19,
"end": 26
}
},
"length": 2,
"flags": "JSDoc",
"members": {
"0": {
"kind": "PropertySignature",
"pos": 2,
"end": 26
}
"end": 14,
"flags": "JSDoc",
"name": {
"kind": "Identifier",
"pos": 2,
"end": 5,
"flags": "JSDoc",
"text": "foo"
},
"type": {
"kind": "NumberKeyword",
"pos": 6,
"end": 13,
"flags": "JSDoc"
}
},
"1": {
"kind": "PropertySignature",
"pos": 14,
"end": 26,
"flags": "JSDoc",
"name": {
"kind": "Identifier",
"pos": 14,
"end": 18,
"flags": "JSDoc",
"text": "bar"
},
"type": {
"kind": "NumberKeyword",
"pos": 19,
"end": 26,
"flags": "JSDoc"
}
},
"length": 2,
"pos": 2,
"end": 26
}
}
@@ -1,27 +1,25 @@
{
"kind": "JSDocRecordType",
"kind": "TypeLiteral",
"pos": 1,
"end": 11,
"literal": {
"kind": "TypeLiteral",
"pos": 1,
"end": 11,
"members": {
"0": {
"kind": "PropertySignature",
"flags": "JSDoc",
"members": {
"0": {
"kind": "PropertySignature",
"pos": 2,
"end": 10,
"flags": "JSDoc",
"name": {
"kind": "Identifier",
"pos": 2,
"end": 10,
"name": {
"kind": "Identifier",
"pos": 2,
"end": 10,
"originalKeywordKind": "FunctionKeyword",
"text": "function"
}
},
"length": 1,
"pos": 2,
"end": 10
}
"flags": "JSDoc",
"originalKeywordKind": "FunctionKeyword",
"text": "function"
}
},
"length": 1,
"pos": 2,
"end": 10
}
}
@@ -1,25 +1,30 @@
{
"kind": "JSDocThisType",
"pos": 1,
"pos": 5,
"end": 9,
"flags": "JSDoc",
"type": {
"kind": "JSDocTypeReference",
"kind": "TypeReference",
"pos": 6,
"end": 9,
"name": {
"flags": "JSDoc",
"typeName": {
"kind": "FirstNode",
"pos": 6,
"end": 9,
"flags": "JSDoc",
"left": {
"kind": "Identifier",
"pos": 6,
"end": 7,
"flags": "JSDoc",
"text": "a"
},
"right": {
"kind": "Identifier",
"pos": 8,
"end": 9,
"flags": "JSDoc",
"text": "b"
}
}
@@ -1,17 +1,20 @@
{
"kind": "JSDocUnionType",
"kind": "UnionType",
"pos": 1,
"end": 14,
"flags": "JSDoc",
"types": {
"0": {
"kind": "NumberKeyword",
"pos": 1,
"end": 7
"end": 7,
"flags": "JSDoc"
},
"1": {
"kind": "StringKeyword",
"pos": 8,
"end": 14
"end": 14,
"flags": "JSDoc"
},
"length": 2,
"pos": 1,
@@ -1,26 +1,24 @@
{
"kind": "JSDocRecordType",
"kind": "TypeLiteral",
"pos": 1,
"end": 5,
"literal": {
"kind": "TypeLiteral",
"pos": 1,
"end": 5,
"members": {
"0": {
"kind": "PropertySignature",
"pos": 2,
"end": 4,
"name": {
"kind": "Identifier",
"pos": 2,
"end": 3,
"text": "a"
}
},
"length": 1,
"flags": "JSDoc",
"members": {
"0": {
"kind": "PropertySignature",
"pos": 2,
"end": 4
}
"end": 4,
"flags": "JSDoc",
"name": {
"kind": "Identifier",
"pos": 2,
"end": 3,
"flags": "JSDoc",
"text": "a"
}
},
"length": 1,
"pos": 2,
"end": 4
}
}
@@ -0,0 +1,17 @@
{
"kind": "ConstructorType",
"pos": 1,
"end": 17,
"flags": "JSDoc",
"parameters": {
"length": 0,
"pos": 6,
"end": 6
},
"type": {
"kind": "StringKeyword",
"pos": 10,
"end": 17,
"flags": "JSDoc"
}
}
@@ -0,0 +1,17 @@
{
"kind": "FunctionType",
"pos": 1,
"end": 13,
"flags": "JSDoc",
"parameters": {
"length": 0,
"pos": 2,
"end": 2
},
"type": {
"kind": "StringKeyword",
"pos": 6,
"end": 13,
"flags": "JSDoc"
}
}
@@ -1,8 +1,9 @@
{
"kind": "JSDocTupleType",
"kind": "TupleType",
"pos": 1,
"end": 3,
"types": {
"flags": "JSDoc",
"elementTypes": {
"length": 0,
"pos": 2,
"end": 2
@@ -1,12 +1,14 @@
{
"kind": "JSDocTupleType",
"kind": "TupleType",
"pos": 1,
"end": 9,
"types": {
"flags": "JSDoc",
"elementTypes": {
"0": {
"kind": "NumberKeyword",
"pos": 2,
"end": 8
"end": 8,
"flags": "JSDoc"
},
"length": 1,
"pos": 2,
@@ -1,17 +1,20 @@
{
"kind": "JSDocTupleType",
"kind": "TupleType",
"pos": 1,
"end": 16,
"types": {
"flags": "JSDoc",
"elementTypes": {
"0": {
"kind": "NumberKeyword",
"pos": 2,
"end": 8
"end": 8,
"flags": "JSDoc"
},
"1": {
"kind": "StringKeyword",
"pos": 9,
"end": 15
"end": 15,
"flags": "JSDoc"
},
"length": 2,
"pos": 2,
@@ -1,22 +1,26 @@
{
"kind": "JSDocTupleType",
"kind": "TupleType",
"pos": 1,
"end": 24,
"types": {
"flags": "JSDoc",
"elementTypes": {
"0": {
"kind": "NumberKeyword",
"pos": 2,
"end": 8
"end": 8,
"flags": "JSDoc"
},
"1": {
"kind": "StringKeyword",
"pos": 9,
"end": 15
"end": 15,
"flags": "JSDoc"
},
"2": {
"kind": "BooleanKeyword",
"pos": 16,
"end": 23
"end": 23,
"flags": "JSDoc"
},
"length": 3,
"pos": 2,
@@ -0,0 +1,18 @@
{
"kind": "TupleType",
"pos": 1,
"end": 10,
"flags": "JSDoc",
"elementTypes": {
"0": {
"kind": "NumberKeyword",
"pos": 2,
"end": 8,
"flags": "JSDoc"
},
"length": 1,
"pos": 2,
"end": 9,
"hasTrailingComma": true
}
}
@@ -0,0 +1,18 @@
{
"kind": "TypeReference",
"pos": 1,
"end": 4,
"flags": "JSDoc",
"typeName": {
"kind": "Identifier",
"pos": 1,
"end": 2,
"flags": "JSDoc",
"text": "a"
},
"typeArguments": {
"length": 0,
"pos": 3,
"end": 3
}
}
@@ -0,0 +1,13 @@
{
"kind": "TypeQuery",
"pos": 1,
"end": 9,
"flags": "JSDoc",
"exprName": {
"kind": "Identifier",
"pos": 7,
"end": 9,
"flags": "JSDoc",
"text": "M"
}
}
@@ -1,18 +1,22 @@
{
"kind": "JSDocTypeReference",
"kind": "TypeReference",
"pos": 1,
"end": 11,
"name": {
"flags": "JSDoc",
"typeName": {
"kind": "Identifier",
"pos": 1,
"end": 2,
"text": "a"
"flags": "JSDoc",
"text": "a",
"jsdocDot": true
},
"typeArguments": {
"0": {
"kind": "NumberKeyword",
"pos": 4,
"end": 10
"end": 10,
"flags": "JSDoc"
},
"length": 1,
"pos": 4,
@@ -1,23 +1,28 @@
{
"kind": "JSDocTypeReference",
"kind": "TypeReference",
"pos": 1,
"end": 18,
"name": {
"flags": "JSDoc",
"typeName": {
"kind": "Identifier",
"pos": 1,
"end": 2,
"text": "a"
"flags": "JSDoc",
"text": "a",
"jsdocDot": true
},
"typeArguments": {
"0": {
"kind": "NumberKeyword",
"pos": 4,
"end": 10
"end": 10,
"flags": "JSDoc"
},
"1": {
"kind": "StringKeyword",
"pos": 11,
"end": 17
"end": 17,
"flags": "JSDoc"
},
"length": 2,
"pos": 4,
@@ -1,21 +1,25 @@
{
"kind": "JSDocTypeReference",
"kind": "TypeReference",
"pos": 1,
"end": 11,
"name": {
"flags": "JSDoc",
"typeName": {
"kind": "FirstNode",
"pos": 1,
"end": 11,
"flags": "JSDoc",
"left": {
"kind": "Identifier",
"pos": 1,
"end": 2,
"flags": "JSDoc",
"text": "a"
},
"right": {
"kind": "Identifier",
"pos": 3,
"end": 11,
"flags": "JSDoc",
"originalKeywordKind": "FunctionKeyword",
"text": "function"
}
@@ -1,20 +1,29 @@
{
"kind": "JSDocUnionType",
"kind": "ParenthesizedType",
"pos": 1,
"end": 16,
"types": {
"0": {
"kind": "NumberKeyword",
"pos": 2,
"end": 8
},
"1": {
"kind": "StringKeyword",
"pos": 9,
"end": 15
},
"length": 2,
"flags": "JSDoc",
"type": {
"kind": "UnionType",
"pos": 2,
"end": 15
"end": 15,
"flags": "JSDoc",
"types": {
"0": {
"kind": "NumberKeyword",
"pos": 2,
"end": 8,
"flags": "JSDoc"
},
"1": {
"kind": "StringKeyword",
"pos": 9,
"end": 15,
"flags": "JSDoc"
},
"length": 2,
"pos": 2,
"end": 15
}
}
}
@@ -1,5 +1,6 @@
{
"kind": "JSDocUnknownType",
"pos": 1,
"end": 2
"end": 2,
"flags": "JSDoc"
}
@@ -2,9 +2,11 @@
"kind": "JSDocVariadicType",
"pos": 1,
"end": 10,
"flags": "JSDoc",
"type": {
"kind": "NumberKeyword",
"pos": 4,
"end": 10
"end": 10,
"flags": "JSDoc"
}
}
@@ -20,7 +20,7 @@ x(1);
/** @type {function} */
const y = (a) => a + 1;
x(1);
y(1);
/** @type {function (number)} */
const x1 = (a) => a + 1;
@@ -38,7 +38,8 @@ var props = {};
/**
* @type {Object}
*/
var props = {};
var props = {};
//// [0.js]
// @ts-check
@@ -57,7 +58,7 @@ var x = function (a) { return a + 1; };
x(1);
/** @type {function} */
var y = function (a) { return a + 1; };
x(1);
y(1);
/** @type {function (number)} */
var x1 = function (a) { return a + 1; };
x1(0);
@@ -37,8 +37,8 @@ const y = (a) => a + 1;
>a : Symbol(a, Decl(0.js, 20, 11))
>a : Symbol(a, Decl(0.js, 20, 11))
x(1);
>x : Symbol(x, Decl(0.js, 16, 5))
y(1);
>y : Symbol(y, Decl(0.js, 20, 5))
/** @type {function (number)} */
const x1 = (a) => a + 1;
@@ -53,9 +53,9 @@ const y = (a) => a + 1;
>a : any
>1 : 1
x(1);
>x(1) : any
>x : Function
y(1);
>y(1) : any
>y : Function
>1 : 1
/** @type {function (number)} */
@@ -1,18 +1,16 @@
tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorLocals.ts(4,9): error TS2304: Cannot find name 'z'.
tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorLocals.ts(5,15): error TS2304: Cannot find name 'z'.
tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorLocals.ts(6,14): error TS2339: Property 'z' does not exist on type 'C'.
tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorLocals.ts(7,15): error TS1003: Identifier expected.
tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorLocals.ts(7,20): error TS2339: Property 'z' does not exist on type 'C'.
tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorLocals.ts(7,15): error TS2304: Cannot find name 'this'.
tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorLocals.ts(9,9): error TS2304: Cannot find name 'z'.
tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorLocals.ts(14,9): error TS2304: Cannot find name 'z'.
tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorLocals.ts(15,15): error TS2304: Cannot find name 'z'.
tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorLocals.ts(16,14): error TS2339: Property 'z' does not exist on type 'D<T>'.
tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorLocals.ts(17,15): error TS1003: Identifier expected.
tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorLocals.ts(17,20): error TS2339: Property 'z' does not exist on type 'D<T>'.
tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorLocals.ts(17,15): error TS2304: Cannot find name 'this'.
tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorLocals.ts(19,9): error TS2304: Cannot find name 'z'.
==== tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorLocals.ts (12 errors) ====
==== tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorLocals.ts (10 errors) ====
// Initializer expressions for instance member variables are evaluated in the scope of the class constructor body but are not permitted to reference parameters or local variables of the constructor.
class C {
@@ -27,9 +25,7 @@ tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencin
!!! error TS2339: Property 'z' does not exist on type 'C'.
d: typeof this.z; // error
~~~~
!!! error TS1003: Identifier expected.
~
!!! error TS2339: Property 'z' does not exist on type 'C'.
!!! error TS2304: Cannot find name 'this'.
constructor(x) {
z = 1;
~
@@ -49,9 +45,7 @@ tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencin
!!! error TS2339: Property 'z' does not exist on type 'D<T>'.
d: typeof this.z; // error
~~~~
!!! error TS1003: Identifier expected.
~
!!! error TS2339: Property 'z' does not exist on type 'D<T>'.
!!! error TS2304: Cannot find name 'this'.
constructor(x: T) {
z = 1;
~
@@ -27,7 +27,6 @@ var C = (function () {
function C(x) {
this.a = z; // error
this.c = this.z; // error
this.d = this.z; // error
z = 1;
}
return C;
@@ -36,7 +35,6 @@ var D = (function () {
function D(x) {
this.a = z; // error
this.c = this.z; // error
this.d = this.z; // error
z = 1;
}
return D;
@@ -2,7 +2,7 @@ tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencin
tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts(5,15): error TS2304: Cannot find name 'x'.
tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts(10,9): error TS2663: Cannot find name 'x'. Did you mean the instance member 'this.x'?
tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts(11,15): error TS2304: Cannot find name 'x'.
tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts(17,15): error TS1003: Identifier expected.
tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts(17,15): error TS2304: Cannot find name 'this'.
tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts(23,9): error TS2663: Cannot find name 'x'. Did you mean the instance member 'this.x'?
@@ -33,7 +33,7 @@ tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencin
a = this.x; // ok
b: typeof this.x; // error
~~~~
!!! error TS1003: Identifier expected.
!!! error TS2304: Cannot find name 'this'.
constructor(public x) { }
}
@@ -44,7 +44,6 @@ var E = (function () {
function E(x) {
this.x = x;
this.a = this.x; // ok
this.b = this.x; // error
}
return E;
}());
@@ -4,12 +4,15 @@ tests/cases/conformance/types/specifyingTypes/typeQueries/invalidTypeOfTarget.ts
tests/cases/conformance/types/specifyingTypes/typeQueries/invalidTypeOfTarget.ts(3,16): error TS1003: Identifier expected.
tests/cases/conformance/types/specifyingTypes/typeQueries/invalidTypeOfTarget.ts(4,16): error TS1003: Identifier expected.
tests/cases/conformance/types/specifyingTypes/typeQueries/invalidTypeOfTarget.ts(5,16): error TS1003: Identifier expected.
tests/cases/conformance/types/specifyingTypes/typeQueries/invalidTypeOfTarget.ts(6,16): error TS1003: Identifier expected.
tests/cases/conformance/types/specifyingTypes/typeQueries/invalidTypeOfTarget.ts(7,16): error TS1003: Identifier expected.
tests/cases/conformance/types/specifyingTypes/typeQueries/invalidTypeOfTarget.ts(6,16): error TS2304: Cannot find name 'null'.
tests/cases/conformance/types/specifyingTypes/typeQueries/invalidTypeOfTarget.ts(7,16): error TS2552: Cannot find name 'function'. Did you mean 'Function'?
tests/cases/conformance/types/specifyingTypes/typeQueries/invalidTypeOfTarget.ts(7,25): error TS1005: '=' expected.
tests/cases/conformance/types/specifyingTypes/typeQueries/invalidTypeOfTarget.ts(7,25): error TS2304: Cannot find name 'f'.
tests/cases/conformance/types/specifyingTypes/typeQueries/invalidTypeOfTarget.ts(7,29): error TS1005: ',' expected.
tests/cases/conformance/types/specifyingTypes/typeQueries/invalidTypeOfTarget.ts(8,16): error TS1003: Identifier expected.
==== tests/cases/conformance/types/specifyingTypes/typeQueries/invalidTypeOfTarget.ts (9 errors) ====
==== tests/cases/conformance/types/specifyingTypes/typeQueries/invalidTypeOfTarget.ts (12 errors) ====
var x1: typeof {};
~
!!! error TS1003: Identifier expected.
@@ -29,10 +32,16 @@ tests/cases/conformance/types/specifyingTypes/typeQueries/invalidTypeOfTarget.ts
!!! error TS1003: Identifier expected.
var x6: typeof null;
~~~~
!!! error TS1003: Identifier expected.
!!! error TS2304: Cannot find name 'null'.
var x7: typeof function f() { };
~~~~~~~~
!!! error TS1003: Identifier expected.
!!! error TS2552: Cannot find name 'function'. Did you mean 'Function'?
~
!!! error TS1005: '=' expected.
~
!!! error TS2304: Cannot find name 'f'.
~
!!! error TS1005: ',' expected.
var x8: typeof /123/;
~
!!! error TS1003: Identifier expected.
@@ -14,6 +14,6 @@ var x2 = function () { return ; };
var x3 = 1;
var x4 = '';
var x5;
var x6 = null;
var x7 = function f() { };
var x6;
var x7 = f(), _a = void 0;
var x8 = /123/;
@@ -0,0 +1,63 @@
=== tests/cases/conformance/jsdoc/functions.js ===
/**
* @param {function(this: string, number): number} c is just passing on through
* @return {function(this: string, number): number}
*/
function id1(c) {
>id1 : Symbol(id1, Decl(functions.js, 0, 0))
>c : Symbol(c, Decl(functions.js, 4, 13))
return c
>c : Symbol(c, Decl(functions.js, 4, 13))
}
var x = id1(function (n) { return this.length + n });
>x : Symbol(x, Decl(functions.js, 8, 3))
>id1 : Symbol(id1, Decl(functions.js, 0, 0))
>n : Symbol(n, Decl(functions.js, 8, 22))
>this.length : Symbol(String.length, Decl(lib.d.ts, --, --))
>this : Symbol(this, Decl(functions.js, 1, 20))
>length : Symbol(String.length, Decl(lib.d.ts, --, --))
>n : Symbol(n, Decl(functions.js, 8, 22))
/**
* @param {function(new: { length: number }, number): number} c is just passing on through
* @return {function(new: { length: number }, number): number}
*/
function id2(c) {
>id2 : Symbol(id2, Decl(functions.js, 8, 53))
>c : Symbol(c, Decl(functions.js, 14, 13))
return c
>c : Symbol(c, Decl(functions.js, 14, 13))
}
class C {
>C : Symbol(C, Decl(functions.js, 16, 1))
/** @param {number} n */
constructor(n) {
>n : Symbol(n, Decl(functions.js, 20, 16))
this.length = n;
>this.length : Symbol(C.length, Decl(functions.js, 20, 20))
>this : Symbol(C, Decl(functions.js, 16, 1))
>length : Symbol(C.length, Decl(functions.js, 20, 20))
>n : Symbol(n, Decl(functions.js, 20, 16))
}
}
var y = id2(C);
>y : Symbol(y, Decl(functions.js, 25, 3))
>id2 : Symbol(id2, Decl(functions.js, 8, 53))
>C : Symbol(C, Decl(functions.js, 16, 1))
var z = new y(12);
>z : Symbol(z, Decl(functions.js, 26, 3))
>y : Symbol(y, Decl(functions.js, 25, 3))
z.length;
>z.length : Symbol(length, Decl(functions.js, 12, 27))
>z : Symbol(z, Decl(functions.js, 26, 3))
>length : Symbol(length, Decl(functions.js, 12, 27))
@@ -0,0 +1,70 @@
=== tests/cases/conformance/jsdoc/functions.js ===
/**
* @param {function(this: string, number): number} c is just passing on through
* @return {function(this: string, number): number}
*/
function id1(c) {
>id1 : (c: (this: string, arg1: number) => number) => (this: string, arg1: number) => number
>c : (this: string, arg1: number) => number
return c
>c : (this: string, arg1: number) => number
}
var x = id1(function (n) { return this.length + n });
>x : (this: string, arg1: number) => number
>id1(function (n) { return this.length + n }) : (this: string, arg1: number) => number
>id1 : (c: (this: string, arg1: number) => number) => (this: string, arg1: number) => number
>function (n) { return this.length + n } : (this: string, n: number) => number
>n : number
>this.length + n : number
>this.length : number
>this : string
>length : number
>n : number
/**
* @param {function(new: { length: number }, number): number} c is just passing on through
* @return {function(new: { length: number }, number): number}
*/
function id2(c) {
>id2 : (c: new (arg1: number) => { length: number; }) => new (arg1: number) => { length: number; }
>c : new (arg1: number) => { length: number; }
return c
>c : new (arg1: number) => { length: number; }
}
class C {
>C : C
/** @param {number} n */
constructor(n) {
>n : number
this.length = n;
>this.length = n : number
>this.length : number
>this : this
>length : number
>n : number
}
}
var y = id2(C);
>y : new (arg1: number) => { length: number; }
>id2(C) : new (arg1: number) => { length: number; }
>id2 : (c: new (arg1: number) => { length: number; }) => new (arg1: number) => { length: number; }
>C : typeof C
var z = new y(12);
>z : { length: number; }
>new y(12) : { length: number; }
>y : new (arg1: number) => { length: number; }
>12 : 12
z.length;
>z.length : number
>z : { length: number; }
>length : number
@@ -0,0 +1,85 @@
tests/cases/conformance/jsdoc/jsdocInTypescript.ts(2,10): error TS8020: JSDoc types can only used inside documentation comments.
tests/cases/conformance/jsdoc/jsdocInTypescript.ts(4,15): error TS8020: JSDoc types can only used inside documentation comments.
tests/cases/conformance/jsdoc/jsdocInTypescript.ts(4,27): error TS8020: JSDoc types can only used inside documentation comments.
tests/cases/conformance/jsdoc/jsdocInTypescript.ts(7,20): error TS8020: JSDoc types can only used inside documentation comments.
tests/cases/conformance/jsdoc/jsdocInTypescript.ts(7,32): error TS8020: JSDoc types can only used inside documentation comments.
tests/cases/conformance/jsdoc/jsdocInTypescript.ts(10,18): error TS8020: JSDoc types can only used inside documentation comments.
tests/cases/conformance/jsdoc/jsdocInTypescript.ts(10,31): error TS8020: JSDoc types can only used inside documentation comments.
tests/cases/conformance/jsdoc/jsdocInTypescript.ts(11,12): error TS2554: Expected 1 arguments, but got 2.
tests/cases/conformance/jsdoc/jsdocInTypescript.ts(13,14): error TS8020: JSDoc types can only used inside documentation comments.
tests/cases/conformance/jsdoc/jsdocInTypescript.ts(14,11): error TS8020: JSDoc types can only used inside documentation comments.
tests/cases/conformance/jsdoc/jsdocInTypescript.ts(15,8): error TS8020: JSDoc types can only used inside documentation comments.
tests/cases/conformance/jsdoc/jsdocInTypescript.ts(16,15): error TS8020: JSDoc types can only used inside documentation comments.
tests/cases/conformance/jsdoc/jsdocInTypescript.ts(17,11): error TS8020: JSDoc types can only used inside documentation comments.
tests/cases/conformance/jsdoc/jsdocInTypescript.ts(18,5): error TS2322: Type '{}' is not assignable to type 'string'.
tests/cases/conformance/jsdoc/jsdocInTypescript.ts(18,16): error TS8020: JSDoc types can only used inside documentation comments.
tests/cases/conformance/jsdoc/jsdocInTypescript.ts(19,5): error TS2322: Type '{}' is not assignable to type 'string'.
tests/cases/conformance/jsdoc/jsdocInTypescript.ts(19,17): error TS8020: JSDoc types can only used inside documentation comments.
tests/cases/conformance/jsdoc/jsdocInTypescript.ts(20,17): error TS8020: JSDoc types can only used inside documentation comments.
tests/cases/conformance/jsdoc/jsdocInTypescript.ts(21,5): error TS2322: Type 'undefined' is not assignable to type 'number | null'.
tests/cases/conformance/jsdoc/jsdocInTypescript.ts(21,17): error TS8020: JSDoc types can only used inside documentation comments.
==== tests/cases/conformance/jsdoc/jsdocInTypescript.ts (20 errors) ====
// grammar error from checker
var ara: Array.<number> = [1,2,3];
~~~~~~~~~~~~~~
!!! error TS8020: JSDoc types can only used inside documentation comments.
function f(x: ?number, y: Array.<number>) {
~~~~~~~
!!! error TS8020: JSDoc types can only used inside documentation comments.
~~~~~~~~~~~~~~
!!! error TS8020: JSDoc types can only used inside documentation comments.
return x ? x + y[1] : y[0];
}
function hof(ctor: function(new: number, string)) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS8020: JSDoc types can only used inside documentation comments.
~~~~~~~~
!!! error TS8020: JSDoc types can only used inside documentation comments.
return new ctor('hi');
}
function hof2(f: function(this: number, string): string) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS8020: JSDoc types can only used inside documentation comments.
~~~~~~~~
!!! error TS8020: JSDoc types can only used inside documentation comments.
return f(12, 'hullo');
~~~~~~~~~~~~~~
!!! error TS2554: Expected 1 arguments, but got 2.
}
var whatevs: * = 1001;
~
!!! error TS8020: JSDoc types can only used inside documentation comments.
var ques: ? = 'what';
~
!!! error TS8020: JSDoc types can only used inside documentation comments.
var g: function(number, number): number = (n,m) => n + m;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS8020: JSDoc types can only used inside documentation comments.
var variadic: ...boolean = [true, false, true];
~~~~~~~~~~
!!! error TS8020: JSDoc types can only used inside documentation comments.
var most: !string = 'definite';
~~~~~~~
!!! error TS8020: JSDoc types can only used inside documentation comments.
var weird1: new:string = {};
~~~~~~
!!! error TS2322: Type '{}' is not assignable to type 'string'.
~~~~~~~
!!! error TS8020: JSDoc types can only used inside documentation comments.
var weird2: this:string = {};
~~~~~~
!!! error TS2322: Type '{}' is not assignable to type 'string'.
~~~~~~~
!!! error TS8020: JSDoc types can only used inside documentation comments.
var postfixdef: number! = 101;
~~~~~~~
!!! error TS8020: JSDoc types can only used inside documentation comments.
var postfixopt: number? = undefined;
~~~~~~~~~~
!!! error TS2322: Type 'undefined' is not assignable to type 'number | null'.
~~~~~~~
!!! error TS8020: JSDoc types can only used inside documentation comments.
@@ -0,0 +1,46 @@
//// [jsdocInTypescript.ts]
// grammar error from checker
var ara: Array.<number> = [1,2,3];
function f(x: ?number, y: Array.<number>) {
return x ? x + y[1] : y[0];
}
function hof(ctor: function(new: number, string)) {
return new ctor('hi');
}
function hof2(f: function(this: number, string): string) {
return f(12, 'hullo');
}
var whatevs: * = 1001;
var ques: ? = 'what';
var g: function(number, number): number = (n,m) => n + m;
var variadic: ...boolean = [true, false, true];
var most: !string = 'definite';
var weird1: new:string = {};
var weird2: this:string = {};
var postfixdef: number! = 101;
var postfixopt: number? = undefined;
//// [jsdocInTypescript.js]
"use strict";
// grammar error from checker
var ara = [1, 2, 3];
function f(x, y) {
return x ? x + y[1] : y[0];
}
function hof(ctor) {
return new ctor('hi');
}
function hof2(f) {
return f(12, 'hullo');
}
var whatevs = 1001;
var ques = 'what';
var g = function (n, m) { return n + m; };
var variadic = [true, false, true];
var most = 'definite';
var weird1 = {};
var weird2 = {};
var postfixdef = 101;
var postfixopt = undefined;
@@ -0,0 +1,9 @@
tests/cases/conformance/jsdoc/jsdocInTypescript2.ts(2,27): error TS1109: Expression expected.
==== tests/cases/conformance/jsdoc/jsdocInTypescript2.ts (1 errors) ====
// parse error (blocks grammar errors from checker)
function parse1(n: number=) { }
~
!!! error TS1109: Expression expected.
@@ -0,0 +1,10 @@
//// [jsdocInTypescript2.ts]
// parse error (blocks grammar errors from checker)
function parse1(n: number=) { }
//// [jsdocInTypescript2.js]
// parse error (blocks grammar errors from checker)
function parse1(n) {
if (n === void 0) { n = ; }
}
@@ -1,36 +1,32 @@
=== tests/cases/conformance/jsdoc/jsdocTemplateTag.ts ===
=== tests/cases/conformance/jsdoc/forgot.js ===
/**
* @param {T} a
* @template T
*/
function f<T>(a: T) {
>f : Symbol(f, Decl(jsdocTemplateTag.ts, 0, 0))
>T : Symbol(T, Decl(jsdocTemplateTag.ts, 4, 11))
>a : Symbol(a, Decl(jsdocTemplateTag.ts, 4, 14))
>T : Symbol(T, Decl(jsdocTemplateTag.ts, 4, 11))
function f(a) {
>f : Symbol(f, Decl(forgot.js, 0, 0))
>a : Symbol(a, Decl(forgot.js, 4, 11))
return () => a
>a : Symbol(a, Decl(jsdocTemplateTag.ts, 4, 14))
>a : Symbol(a, Decl(forgot.js, 4, 11))
}
let n = f(1)()
>n : Symbol(n, Decl(jsdocTemplateTag.ts, 7, 3))
>f : Symbol(f, Decl(jsdocTemplateTag.ts, 0, 0))
>n : Symbol(n, Decl(forgot.js, 7, 3))
>f : Symbol(f, Decl(forgot.js, 0, 0))
/**
* @param {T} a
* @template T
* @returns {function(): T}
*/
function g<T>(a: T) {
>g : Symbol(g, Decl(jsdocTemplateTag.ts, 7, 14))
>T : Symbol(T, Decl(jsdocTemplateTag.ts, 14, 11))
>a : Symbol(a, Decl(jsdocTemplateTag.ts, 14, 14))
>T : Symbol(T, Decl(jsdocTemplateTag.ts, 14, 11))
function g(a) {
>g : Symbol(g, Decl(forgot.js, 7, 14))
>a : Symbol(a, Decl(forgot.js, 14, 11))
return () => a
>a : Symbol(a, Decl(jsdocTemplateTag.ts, 14, 14))
>a : Symbol(a, Decl(forgot.js, 14, 11))
}
let s = g('hi')()
>s : Symbol(s, Decl(jsdocTemplateTag.ts, 17, 3))
>g : Symbol(g, Decl(jsdocTemplateTag.ts, 7, 14))
>s : Symbol(s, Decl(forgot.js, 17, 3))
>g : Symbol(g, Decl(forgot.js, 7, 14))
@@ -1,13 +1,11 @@
=== tests/cases/conformance/jsdoc/jsdocTemplateTag.ts ===
=== tests/cases/conformance/jsdoc/forgot.js ===
/**
* @param {T} a
* @template T
*/
function f<T>(a: T) {
function f(a) {
>f : <T>(a: T) => () => T
>T : T
>a : T
>T : T
return () => a
>() => a : () => T
@@ -25,11 +23,9 @@ let n = f(1)()
* @template T
* @returns {function(): T}
*/
function g<T>(a: T) {
function g(a) {
>g : <T>(a: T) => () => T
>T : T
>a : T
>T : T
return () => a
>() => a : () => T
@@ -0,0 +1,29 @@
tests/cases/conformance/jsdoc/f.js(5,15): error TS2304: Cannot find name 'F'.
tests/cases/conformance/jsdoc/f.js(5,15): error TS8010: 'types' can only be used in a .ts file.
tests/cases/conformance/jsdoc/normal.ts(4,12): error TS7006: Parameter 'c' implicitly has an 'any' type.
==== tests/cases/conformance/jsdoc/node.d.ts (0 errors) ====
declare function require(id: string): any;
declare var module: any, exports: any;
==== tests/cases/conformance/jsdoc/f.js (2 errors) ====
var F = function () {
this.x = 1;
};
function f(p: F) { p.x; }
~
!!! error TS2304: Cannot find name 'F'.
~
!!! error TS8010: 'types' can only be used in a .ts file.
==== tests/cases/conformance/jsdoc/normal.ts (1 errors) ====
class C { p: number }
/** @param {C} p */
function g(c) { return c.p }
~
!!! error TS7006: Parameter 'c' implicitly has an 'any' type.
+14
View File
@@ -0,0 +1,14 @@
=== tests/cases/conformance/jsdoc/crash.js ===
/**
* @param {function(new:number, string)} c crashes with correct syntax too
* @return {number}
*/
function sub4(c) {
>sub4 : Symbol(sub4, Decl(crash.js, 0, 0))
>c : Symbol(c, Decl(crash.js, 4, 14))
return new c('hi')
>c : Symbol(c, Decl(crash.js, 4, 14))
}
+16
View File
@@ -0,0 +1,16 @@
=== tests/cases/conformance/jsdoc/crash.js ===
/**
* @param {function(new:number, string)} c crashes with correct syntax too
* @return {number}
*/
function sub4(c) {
>sub4 : (c: new (arg1: string) => number) => number
>c : new (arg1: string) => number
return new c('hi')
>new c('hi') : number
>c : new (arg1: string) => number
>'hi' : "hi"
}
@@ -2,12 +2,11 @@ tests/cases/conformance/classes/members/accessibility/privateInstanceMemberAcces
Property 'foo' is private in type 'Base' but not in type 'Derived'.
tests/cases/conformance/classes/members/accessibility/privateInstanceMemberAccessibility.ts(6,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword.
tests/cases/conformance/classes/members/accessibility/privateInstanceMemberAccessibility.ts(8,22): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword.
tests/cases/conformance/classes/members/accessibility/privateInstanceMemberAccessibility.ts(10,15): error TS1003: Identifier expected.
tests/cases/conformance/classes/members/accessibility/privateInstanceMemberAccessibility.ts(10,21): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword.
tests/cases/conformance/classes/members/accessibility/privateInstanceMemberAccessibility.ts(10,15): error TS2304: Cannot find name 'super'.
tests/cases/conformance/classes/members/accessibility/privateInstanceMemberAccessibility.ts(12,12): error TS1005: ';' expected.
==== tests/cases/conformance/classes/members/accessibility/privateInstanceMemberAccessibility.ts (6 errors) ====
==== tests/cases/conformance/classes/members/accessibility/privateInstanceMemberAccessibility.ts (5 errors) ====
class Base {
private foo: string;
}
@@ -26,9 +25,7 @@ tests/cases/conformance/classes/members/accessibility/privateInstanceMemberAcces
}
z: typeof super.foo; // error
~~~~~
!!! error TS1003: Identifier expected.
~~~
!!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword.
!!! error TS2304: Cannot find name 'super'.
a: this.foo; // error
~
@@ -34,7 +34,6 @@ var Derived = (function (_super) {
function Derived() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.x = _super.prototype.foo; // error
_this.z = _super.prototype.foo; // error
return _this;
}
Derived.prototype.y = function () {
@@ -1,31 +1,19 @@
tests/cases/conformance/jsdoc/foo.js(2,15): error TS1005: '}' expected.
tests/cases/conformance/jsdoc/foo.js(3,19): error TS1005: '}' expected.
tests/cases/conformance/jsdoc/foo.js(4,18): error TS1003: Identifier expected.
tests/cases/conformance/jsdoc/foo.js(4,19): error TS1005: '}' expected.
tests/cases/conformance/jsdoc/badTypeArguments.js(1,15): error TS1099: Type argument list cannot be empty.
tests/cases/conformance/jsdoc/badTypeArguments.js(2,22): error TS1009: Trailing comma not allowed.
==== tests/cases/conformance/jsdoc/foo.js (4 errors) ====
/**
* @param {(x)=>void} x
~~
!!! error TS1005: '}' expected.
* @param {typeof String} y
~~~~~~
!!! error TS1005: '}' expected.
* @param {string & number} z
!!! error TS1003: Identifier expected.
~
!!! error TS1005: '}' expected.
**/
function foo(x, y, z) { }
==== tests/cases/conformance/jsdoc/dummyType.d.ts (0 errors) ====
declare class C<T> { t: T }
==== tests/cases/conformance/jsdoc/skipped.js (0 errors) ====
// @ts-nocheck
/**
* @param {(x)=>void} x
* @param {typeof String} y
* @param {string & number} z
**/
function bar(x, y, z) { }
==== tests/cases/conformance/jsdoc/badTypeArguments.js (2 errors) ====
/** @param {C.<>} x */
~~
!!! error TS1099: Type argument list cannot be empty.
/** @param {C.<number,>} y */
~
!!! error TS1009: Trailing comma not allowed.
function f(x, y) {
return x.t + y.t;
}
var x = f({ t: 1000 }, { t: 3000 });
@@ -88,18 +88,13 @@ tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(170,24): e
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(171,28): error TS1003: Identifier expected.
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(171,32): error TS1005: ',' expected.
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(172,30): error TS1005: ',' expected.
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(172,32): error TS1138: Parameter declaration expected.
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(172,39): error TS1005: ';' expected.
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(172,40): error TS1128: Declaration or statement expected.
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(172,42): error TS2693: 'number' only refers to a type, but is being used as a value here.
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(172,49): error TS1005: ';' expected.
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(175,1): error TS7027: Unreachable code detected.
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(172,32): error TS1003: Identifier expected.
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(175,29): error TS2304: Cannot find name 'm'.
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(175,32): error TS1005: ';' expected.
tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(175,35): error TS2304: Cannot find name 'm'.
==== tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts (65 errors) ====
==== tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts (60 errors) ====
class C {
n: number;
explicitThis(this: this, m: number): number {
@@ -419,20 +414,10 @@ tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(175,35): e
~
!!! error TS1005: ',' expected.
~~~
!!! error TS1138: Parameter declaration expected.
~
!!! error TS1005: ';' expected.
~
!!! error TS1128: Declaration or statement expected.
~~~~~~
!!! error TS2693: 'number' only refers to a type, but is being used as a value here.
~
!!! error TS1005: ';' expected.
!!! error TS1003: Identifier expected.
// can't name parameters 'this' in a lambda.
c.explicitProperty = (this, m) => m + this.n;
~
!!! error TS7027: Unreachable code detected.
~
!!! error TS2304: Cannot find name 'm'.
~~
@@ -350,10 +350,8 @@ function decorated(, C) {
if ( === void 0) { = this; }
return this.n;
}
function initializer() { }
new C();
number;
{
function initializer() {
if ( === void 0) { = new C(); }
return this.n;
}
// can't name parameters 'this' in a lambda.