Skip to content

Commit

Permalink
feat(types): support TypeScript 5.3.3 (#17017)
Browse files Browse the repository at this point in the history
  • Loading branch information
ephys committed Jan 30, 2024
1 parent 23cdf1d commit 20eb84f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 24 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -76,7 +76,7 @@
"typedoc-plugin-carbon-ads": "1.6.0",
"typedoc-plugin-mdn-links": "3.1.14",
"typedoc-plugin-missing-exports": "2.2.0",
"typescript": "5.2.2"
"typescript": "5.3.3"
},
"packageManager": "yarn@4.1.0",
"lint-staged": {
Expand Down
2 changes: 2 additions & 0 deletions packages/core/src/decorators/shared/model.ts
Expand Up @@ -99,6 +99,8 @@ export function mergeAttributeOptions(
): Partial<AttributeOptions> {
for (const [optionName, optionValue] of Object.entries(options) as Array<[keyof AttributeOptions, any]>) {
if (existingOptions[optionName] === undefined) {
// eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error -- This error only occurs on TS 5.3+
// @ts-ignore -- this function is very fuzzy in terms of typing due to how generic it is.
existingOptions[optionName] = optionValue;
continue;
}
Expand Down
2 changes: 2 additions & 0 deletions packages/core/src/model-definition.ts
Expand Up @@ -921,6 +921,8 @@ export function mergeModelOptions(
// @ts-expect-error -- typescript doesn't like this merge algorithm.
existingHooks[hookType] = [...existingHooksOfType, optionValue[hookType]];
} else {
// eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error -- This error only occurs on TS 5.3+
// @ts-ignore -- typescript doesn't like this merge algorithm.
existingHooks[hookType] = [...existingHooksOfType, ...optionValue[hookType]];
}
}
Expand Down
26 changes: 3 additions & 23 deletions yarn.lock
Expand Up @@ -2262,7 +2262,7 @@ __metadata:
typedoc-plugin-carbon-ads: "npm:1.6.0"
typedoc-plugin-mdn-links: "npm:3.1.14"
typedoc-plugin-missing-exports: "npm:2.2.0"
typescript: "npm:5.2.2"
typescript: "npm:5.3.3"
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -13379,17 +13379,7 @@ __metadata:
languageName: node
linkType: hard

"typescript@npm:5.2.2":
version: 5.2.2
resolution: "typescript@npm:5.2.2"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 10c0/91ae3e6193d0ddb8656d4c418a033f0f75dec5e077ebbc2bd6d76439b93f35683936ee1bdc0e9cf94ec76863aa49f27159b5788219b50e1cd0cd6d110aa34b07
languageName: node
linkType: hard

"typescript@npm:>=3 < 6, typescript@npm:^5.3.2":
"typescript@npm:5.3.3, typescript@npm:>=3 < 6, typescript@npm:^5.3.2":
version: 5.3.3
resolution: "typescript@npm:5.3.3"
bin:
Expand All @@ -13399,17 +13389,7 @@ __metadata:
languageName: node
linkType: hard

"typescript@patch:typescript@npm%3A5.2.2#optional!builtin<compat/typescript>":
version: 5.2.2
resolution: "typescript@patch:typescript@npm%3A5.2.2#optional!builtin<compat/typescript>::version=5.2.2&hash=f3b441"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 10c0/062c1cee1990e6b9419ce8a55162b8dc917eb87f807e4de0327dbc1c2fa4e5f61bc0dd4e034d38ff541d1ed0479b53bcee8e4de3a4075c51a1724eb6216cb6f5
languageName: node
linkType: hard

"typescript@patch:typescript@npm%3A>=3 < 6#optional!builtin<compat/typescript>, typescript@patch:typescript@npm%3A^5.3.2#optional!builtin<compat/typescript>":
"typescript@patch:typescript@npm%3A5.3.3#optional!builtin<compat/typescript>, typescript@patch:typescript@npm%3A>=3 < 6#optional!builtin<compat/typescript>, typescript@patch:typescript@npm%3A^5.3.2#optional!builtin<compat/typescript>":
version: 5.3.3
resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin<compat/typescript>::version=5.3.3&hash=e012d7"
bin:
Expand Down

0 comments on commit 20eb84f

Please sign in to comment.