Skip to content

Commit a7e74f8

Browse files
committed
chore: update to typescript 5.5
1 parent 4de221b commit a7e74f8

File tree

7 files changed

+869
-167
lines changed

7 files changed

+869
-167
lines changed

package-lock.json

+862-157
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.2.9",
2+
"version": "0.2.10",
33
"type": "module",
44
"name": "unwritten",
55
"description": "unwritten is a cli tool that auto generates documentation from your JavaScript or TypeScript project by utilizing TSDoc or JSDoc comments.",
@@ -66,10 +66,10 @@
6666
"cac": "^6.7.14",
6767
"minimatch": "^9.0.4",
6868
"tinyhighlight": "^0.3.2",
69-
"typescript": "^5.4.5"
69+
"typescript": "^5.5.2"
7070
},
7171
"devDependencies": {
72-
"@schoero/configs": "^1.0.16",
72+
"@schoero/configs": "^1.0.19",
7373
"@types/minimatch": "^5.1.2",
7474
"@types/node": "^20.14.6",
7575
"changelogen": "^0.5.5",

src/interpreter/ast/entities/interface.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import type { PartialByKey } from "unwritten:type-definitions/utils";
3232

3333
export const createInterfaceEntity = (ctx: InterpreterContext, symbol: Symbol): InterfaceEntity | MergedInterfaceEntity => withCachedEntity(ctx, symbol, () => withLockedSymbol(ctx, symbol, () => {
3434

35-
const interfaceDeclarations = symbol.getDeclarations()?.filter(declaration => isInterfaceDeclaration(ctx, declaration)) as InterfaceDeclaration[] | undefined;
35+
const interfaceDeclarations = symbol.getDeclarations()?.filter(declaration => isInterfaceDeclaration(ctx, declaration));
3636

3737
assert(interfaceDeclarations && interfaceDeclarations.length > 0, "Interface declarations not found");
3838

src/utils/override.ts

-3
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,12 @@ export function override<Original extends AnyObject, Overrides extends AnyObject
1919
for(const originalKey in original){
2020
if(typeof original[originalKey] === "object" && typeof overrides[originalKey] === "object"){
2121
if(Array.isArray(original[originalKey]) || Array.isArray(overrides[originalKey])){
22-
// @ts-expect-error - TS type inference is not working here
2322
result[originalKey] = overrides[originalKey];
2423
} else {
25-
// @ts-expect-error - TS type inference is not working here
2624
result[originalKey] = override(original[originalKey], overrides[originalKey]);
2725
}
2826
} else {
2927
if(overrides[originalKey] !== undefined){
30-
// @ts-expect-error - TS type inference is not working here
3128
result[originalKey] = overrides[originalKey];
3229
} else {
3330
// @ts-expect-error - TS type inference is not working here

src/utils/template.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function findCommonIndentation(content: string, eol: string = EOL) {
3636
).filter(tab => tab !== undefined);
3737

3838

39-
const tabsInSpaces = tabs.map(tab => tab! * TABS_IN_SPACES);
39+
const tabsInSpaces = tabs.map(tab => tab * TABS_IN_SPACES);
4040
const indentations = [...spaces, ...tabsInSpaces] as number[];
4141

4242
if(indentations.length <= 0){

tests/utils/compile.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export function compile(code: CompilerInput | string, tsconfig?: ts.CompilerOpti
9999
const compiledSourceFiles = program.getSourceFiles();
100100
const fileSymbols = compiledSourceFiles.map(
101101
file => checker.getSymbolAtLocation(file)
102-
).filter(sourceFileSymbol => !!sourceFileSymbol) as ts.Symbol[];
102+
).filter(sourceFileSymbol => !!sourceFileSymbol);
103103

104104
// File
105105
const file = compiledSourceFiles.find(file => file.fileName === entryFilePath);

tests/utils/virtual-fs.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export function readdirSync(path: string, options?: { recursive?: boolean; }) {
7272
if(isFile(object[key])){
7373
return [key];
7474
} else {
75-
const subDirectory = object[key] as VirtualFS;
75+
const subDirectory = object[key];
7676
const subDirectoryContent = readObject(subDirectory)
7777
.map(subDirectoryKey => `${key}/${subDirectoryKey}`);
7878
return [

0 commit comments

Comments
 (0)