Skip to content

Commit 112c2e3

Browse files
committed
Typescript 5.7.2
1 parent becba75 commit 112c2e3

File tree

408 files changed

+1076
-1988
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

408 files changed

+1076
-1988
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ tanstack-table-core.npm.version=^8.20.5
187187
tanstack-virtual-core.npm.version=^3.11.2
188188

189189
# https://www.npmjs.com/package/typescript
190-
typescript.npm.version=^5.4.5
190+
typescript.npm.version=^5.7.2
191191

192192
# https://www.npmjs.com/package/@vercel/ncc
193193
vercel-ncc.npm.version=^0.38.3

kotlin-typescript/karakum/injections/UnionInjection.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,16 @@ const injectCommonUnionParents = (node, context, render) => {
103103
result.push("Node")
104104
}
105105

106+
if (
107+
context.type === karakum.InjectionType.HERITAGE_CLAUSE
108+
&& ts.isUnionTypeNode(node)
109+
&& node.parent
110+
&& ts.isTypeAliasDeclaration(node.parent)
111+
&& node.parent.name.text === "ModuleExportName"
112+
) {
113+
result.push("DeclarationName")
114+
}
115+
106116
if (
107117
context.type === karakum.InjectionType.HERITAGE_CLAUSE
108118
&& ts.isUnionTypeNode(node)
@@ -251,6 +261,7 @@ function decorateUnionInjection(unionInjection) {
251261
inject: (...args) => unionInjection.inject(...args)
252262
?.filter(it => (
253263
it !== "EditorSettingsIndentStyle"
264+
&& it !== "FormatCodeSettingsIndentStyle"
254265
&& it !== "ExternalFileScriptKind"
255266
&& it !== "CompilerOptionsModule"
256267
&& it !== "CompilerOptionsJsx"
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import ts from "typescript";
2+
import * as karakum from "karakum";
3+
4+
export default (node, context) => {
5+
const typeScriptService = context.lookupService(karakum.typeScriptServiceKey)
6+
const getParent = typeScriptService?.getParent.bind(typeScriptService) ?? (node => node.parent)
7+
8+
const property = getParent(node)
9+
if (!property) return null
10+
if (!ts.isPropertySignature(property)) return null
11+
if (!ts.isIdentifier(property.name)) return null
12+
13+
const propertyName = property.name.text
14+
15+
const typeLiteral = getParent(property)
16+
if (!typeLiteral) return null
17+
if (!ts.isTypeLiteralNode(typeLiteral)) return null
18+
19+
const typeReference = getParent(typeLiteral)
20+
if (!ts.isTypeReferenceNode(typeReference)) return null
21+
if (!ts.isIdentifier(typeReference.typeName)) return null
22+
if (typeReference.typeName.text !== "ChangePropertyTypes") return null
23+
24+
const typeAlias = getParent(typeReference)
25+
if (!typeAlias) return null
26+
if (!ts.isTypeAliasDeclaration(typeAlias)) return null
27+
28+
const parentName = typeAlias.name.text
29+
30+
return `${karakum.capitalize(parentName)}${karakum.capitalize(propertyName)}`
31+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import ts from "typescript";
2+
import * as karakum from "karakum";
3+
4+
export default (node, context) => {
5+
const typeScriptService = context.lookupService(karakum.typeScriptServiceKey)
6+
const getParent = typeScriptService?.getParent.bind(typeScriptService) ?? (node => node.parent)
7+
8+
const union = getParent(node)
9+
if (!union) return null
10+
if (!ts.isUnionTypeNode(union)) return null
11+
if (union.types.length < 2) return null
12+
if (union.types[1].kind !== ts.SyntaxKind.UndefinedKeyword) return null
13+
14+
const property = getParent(union)
15+
if (!property) return null
16+
if (!ts.isPropertySignature(property)) return null
17+
if (!ts.isIdentifier(property.name)) return null
18+
19+
const propertyName = property.name.text
20+
21+
const interfaceNode = getParent(property)
22+
if (!interfaceNode) return null
23+
if (!ts.isInterfaceDeclaration(interfaceNode)) return null
24+
25+
const parentName = interfaceNode.name.text
26+
27+
return `${karakum.capitalize(parentName)}${karakum.capitalize(propertyName)}`
28+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import ts from "typescript";
2+
import * as karakum from "karakum";
3+
4+
export default (node, context) => {
5+
const typeScriptService = context.lookupService(karakum.typeScriptServiceKey)
6+
const getParent = typeScriptService?.getParent.bind(typeScriptService) ?? (node => node.parent)
7+
8+
const subProperty = getParent(node)
9+
if (!subProperty) return null
10+
if (!ts.isPropertySignature(subProperty)) return null
11+
if (!ts.isIdentifier(subProperty.name)) return null
12+
13+
const subPropertyName = subProperty.name.text
14+
15+
const typeLiteral = getParent(subProperty)
16+
if (!typeLiteral) return null
17+
if (!ts.isTypeLiteralNode(typeLiteral)) return null
18+
19+
const property = getParent(typeLiteral)
20+
if (!property) return null
21+
if (!ts.isPropertySignature(property)) return null
22+
if (!ts.isIdentifier(property.name)) return null
23+
24+
const propertyName = property.name.text
25+
26+
const interfaceNode = getParent(property)
27+
if (!interfaceNode) return null
28+
if (!ts.isInterfaceDeclaration(interfaceNode)) return null
29+
30+
const parentName = interfaceNode.name.text
31+
32+
return `${karakum.capitalize(parentName)}${karakum.capitalize(propertyName)}${karakum.capitalize(subPropertyName)}`
33+
}

kotlin-typescript/src/jsMain/generated/typescript/ArrowFunction.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
package typescript
44

55
sealed external interface ArrowFunction : Expression, FunctionLikeDeclarationBase, JSDocContainer, LocalsContainer,
6-
FlowContainer, HasJSDoc, HasModifiers, SignatureDeclaration, FunctionLikeDeclaration, FlowStartNode {
6+
FlowContainer, HasJSDoc, HasModifiers, SignatureDeclaration, FunctionLikeDeclaration {
77
override val kind: SyntaxKind.ArrowFunction
88
val modifiers: NodeArray<Modifier>?
99
val equalsGreaterThanToken: EqualsGreaterThanToken

kotlin-typescript/src/jsMain/generated/typescript/BigIntLiteral.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
package typescript
44

5-
sealed external interface BigIntLiteral : LiteralExpression, LiteralToken {
5+
sealed external interface BigIntLiteral : LiteralExpression, PropertyName, PropertyNameLiteral, LiteralToken {
66
override val kind: SyntaxKind.BigIntLiteral
77
}

kotlin-typescript/src/jsMain/generated/typescript/BinaryExpression.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
package typescript
44

5-
sealed external interface BinaryExpression : Expression, Declaration, JSDocContainer, HasJSDoc, FlowArrayMutationNode {
5+
sealed external interface BinaryExpression : Expression, Declaration, JSDocContainer, HasJSDoc {
66
override val kind: SyntaxKind.BinaryExpression
77
val left: Expression
88
val operatorToken: BinaryOperatorToken

kotlin-typescript/src/jsMain/generated/typescript/BindingElement.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package typescript
44

55
sealed external interface BindingElement : NamedDeclaration, FlowContainer, HasExpressionInitializer,
66
VariableLikeDeclaration, ObjectBindingPatternParent, ArrayBindingPatternParent, ArrayBindingElement,
7-
ObjectBindingOrAssignmentElement, FlowAssignmentNode {
7+
ObjectBindingOrAssignmentElement {
88
override val kind: SyntaxKind.BindingElement
99
override val parent: BindingPattern
1010
val propertyName: PropertyName?

kotlin-typescript/src/jsMain/generated/typescript/BufferEncoding.kt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ sealed external interface BufferEncoding {
2626
val binary: BufferEncoding
2727

2828
@seskar.js.JsValue("hex")
29-
val hex: BufferEncoding/*
30-
Duplicated names were generated:
31-
utf8 for "utf-8"
32-
ucs2 for "ucs-2"
33-
*/
29+
val hex: BufferEncoding
30+
/*
31+
Duplicated names were generated:
32+
utf8 for "utf-8"
33+
ucs2 for "ucs-2"
34+
*/
3435
}
3536
}

kotlin-typescript/src/jsMain/generated/typescript/BuildOptions.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ sealed external interface BuildOptions {
66
var dry: Boolean?
77
var force: Boolean?
88
var verbose: Boolean?
9+
var stopBuildOnErrors: Boolean?
910
var incremental: Boolean?
1011
var assumeChangesOnlyAffectDirectDependencies: Boolean?
1112
var declaration: Boolean?

kotlin-typescript/src/jsMain/generated/typescript/Bundle.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,5 @@ package typescript
44

55
sealed external interface Bundle : Node {
66
override val kind: SyntaxKind.Bundle
7-
8-
/** @deprecated */
9-
val prepends: js.array.ReadonlyArray<(BundlePrependsItem)>
107
val sourceFiles: js.array.ReadonlyArray<SourceFile>
118
}

kotlin-typescript/src/jsMain/generated/typescript/CallExpression.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
package typescript
44

55
sealed external interface CallExpression : LeftHandSideExpression, Declaration, HasTypeArguments, SpreadElementParent,
6-
CallLikeExpression, FlowArrayMutationNode, IsCallOrNewExpressionResultPredicate {
6+
CallLikeExpression, IsCallOrNewExpressionResultPredicate {
77
override val kind: SyntaxKind.CallExpression
88
val expression: LeftHandSideExpression
99
val questionDotToken: QuestionDotToken?

kotlin-typescript/src/jsMain/generated/typescript/CompilerOptions.kt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ sealed external interface CompilerOptions {
1212
var allowUnusedLabels: Boolean?
1313
var alwaysStrict: Boolean?
1414
var baseUrl: String?
15+
16+
/** @deprecated */
1517
var charset: String?
1618
var checkJs: Boolean?
1719
var customConditions: js.array.ReadonlyArray<String>?
@@ -31,11 +33,16 @@ sealed external interface CompilerOptions {
3133
var forceConsistentCasingInFileNames: Boolean?
3234
var ignoreDeprecations: String?
3335
var importHelpers: Boolean?
36+
37+
/** @deprecated */
3438
var importsNotUsedAsValues: ImportsNotUsedAsValues?
3539
var inlineSourceMap: Boolean?
3640
var inlineSources: Boolean?
3741
var isolatedModules: Boolean?
42+
var isolatedDeclarations: Boolean?
3843
var jsx: JsxEmit?
44+
45+
/** @deprecated */
3946
var keyofStringsOnly: Boolean?
4047
var lib: js.array.ReadonlyArray<String>?
4148
var locale: String?
@@ -47,29 +54,38 @@ sealed external interface CompilerOptions {
4754
var moduleDetection: ModuleDetectionKind?
4855
var newLine: NewLineKind?
4956
var noEmit: Boolean?
57+
var noCheck: Boolean?
5058
var noEmitHelpers: Boolean?
5159
var noEmitOnError: Boolean?
5260
var noErrorTruncation: Boolean?
5361
var noFallthroughCasesInSwitch: Boolean?
5462
var noImplicitAny: Boolean?
5563
var noImplicitReturns: Boolean?
5664
var noImplicitThis: Boolean?
65+
66+
/** @deprecated */
5767
var noStrictGenericChecks: Boolean?
5868
var noUnusedLocals: Boolean?
5969
var noUnusedParameters: Boolean?
70+
71+
/** @deprecated */
6072
var noImplicitUseStrict: Boolean?
6173
var noPropertyAccessFromIndexSignature: Boolean?
6274
var assumeChangesOnlyAffectDirectDependencies: Boolean?
6375
var noLib: Boolean?
6476
var noResolve: Boolean?
6577
var noUncheckedIndexedAccess: Boolean?
78+
79+
/** @deprecated */
6680
var out: String?
6781
var outDir: String?
6882
var outFile: String?
6983
var paths: MapLike<js.array.ReadonlyArray<String>>?
7084
var preserveConstEnums: Boolean?
7185
var noImplicitOverride: Boolean?
7286
var preserveSymlinks: Boolean?
87+
88+
/** @deprecated */
7389
var preserveValueImports: Boolean?
7490
var project: String?
7591
var reactNamespace: String?
@@ -82,6 +98,7 @@ sealed external interface CompilerOptions {
8298
var removeComments: Boolean?
8399
var resolvePackageJsonExports: Boolean?
84100
var resolvePackageJsonImports: Boolean?
101+
var rewriteRelativeImportExtensions: Boolean?
85102
var rootDir: String?
86103
var rootDirs: js.array.ReadonlyArray<String>?
87104
var skipLibCheck: Boolean?
@@ -93,12 +110,18 @@ sealed external interface CompilerOptions {
93110
var strictBindCallApply: Boolean?
94111
var strictNullChecks: Boolean?
95112
var strictPropertyInitialization: Boolean?
113+
var strictBuiltinIteratorReturn: Boolean?
96114
var stripInternal: Boolean?
115+
116+
/** @deprecated */
97117
var suppressExcessPropertyErrors: Boolean?
118+
119+
/** @deprecated */
98120
var suppressImplicitAnyIndexErrors: Boolean?
99121
var target: ScriptTarget?
100122
var traceResolution: Boolean?
101123
var useUnknownInCatchVariables: Boolean?
124+
var noUncheckedSideEffectImports: Boolean?
102125
var resolveJsonModule: Boolean?
103126
var types: js.array.ReadonlyArray<String>?
104127

kotlin-typescript/src/jsMain/generated/typescript/CompletionEntry.kt

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,29 @@ sealed external interface CompletionEntry {
66
var name: String
77
var kind: ScriptElementKind
88
var kindModifiers: String?
9+
10+
/**
11+
* A string that is used for comparing completion items so that they can be ordered. This
12+
* is often the same as the name but may be different in certain circumstances.
13+
*/
914
var sortText: String
15+
16+
/**
17+
* Text to insert instead of `name`.
18+
* This is used to support bracketed completions; If `name` might be "a-b" but `insertText` would be `["a-b"]`,
19+
* coupled with `replacementSpan` to replace a dotted access with a bracket access.
20+
*/
1021
var insertText: String?
22+
23+
/**
24+
* A string that should be used when filtering a set of
25+
* completion items.
26+
*/
1127
var filterText: String?
28+
29+
/**
30+
* `insertText` should be interpreted as a snippet if true.
31+
*/
1232
var isSnippet: Boolean /* true */?
1333

1434
/**
@@ -17,13 +37,51 @@ sealed external interface CompletionEntry {
1737
* It will be set if the required span differs from the one generated by the default replacement behavior.
1838
*/
1939
var replacementSpan: TextSpan?
40+
41+
/**
42+
* Indicates whether commiting this completion entry will require additional code actions to be
43+
* made to avoid errors. The CompletionEntryDetails will have these actions.
44+
*/
2045
var hasAction: Boolean /* true */?
46+
47+
/**
48+
* Identifier (not necessarily human-readable) identifying where this completion came from.
49+
*/
2150
var source: String?
51+
52+
/**
53+
* Human-readable description of the `source`.
54+
*/
2255
var sourceDisplay: js.array.ReadonlyArray<SymbolDisplayPart>?
56+
57+
/**
58+
* Additional details for the label.
59+
*/
2360
var labelDetails: CompletionEntryLabelDetails?
61+
62+
/**
63+
* If true, this completion should be highlighted as recommended. There will only be one of these.
64+
* This will be set when we know the user should write an expression with a certain type and that type is an enum or constructable class.
65+
* Then either that enum/class or a namespace containing it will be the recommended symbol.
66+
*/
2467
var isRecommended: Boolean /* true */?
68+
69+
/**
70+
* If true, this completion was generated from traversing the name table of an unchecked JS file,
71+
* and therefore may not be accurate.
72+
*/
2573
var isFromUncheckedFile: Boolean /* true */?
74+
75+
/**
76+
* If true, this completion was for an auto-import of a module not yet in the program, but listed
77+
* in the project package.json. Used for telemetry reporting.
78+
*/
2679
var isPackageJsonImport: Boolean /* true */?
80+
81+
/**
82+
* If true, this completion was an auto-import-style completion of an import statement (i.e., the
83+
* module specifier was inserted along with the imported identifier). Used for telemetry reporting.
84+
*/
2785
var isImportStatementCompletion: Boolean /* true */?
2886

2987
/**
@@ -42,4 +100,9 @@ sealed external interface CompletionEntry {
42100
* is an auto-import.
43101
*/
44102
var data: CompletionEntryData?
103+
104+
/**
105+
* If this completion entry is selected, typing a commit character will cause the entry to be accepted.
106+
*/
107+
var commitCharacters: js.array.ReadonlyArray<String>?
45108
}

0 commit comments

Comments
 (0)