Skip to content

Commit

Permalink
Fix some compiler warnings with newer target settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit0 committed Oct 16, 2024
1 parent add8949 commit 3e2a9a4
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 16 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"prettier": "3.3.3",
"puppeteer": "^23.3.0",
"ts-node": "^10.9.2",
"typescript": "5.6.1-rc",
"typescript": "5.6.3",
"typescript-eslint": "^8.4.0"
},
"files": [
Expand Down
14 changes: 8 additions & 6 deletions src/lib/converter/utils/repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,7 @@ export class GitRepository implements Repository {
*/
export class RepositoryManager {
private cache = new Map<string, Repository | undefined>();
private assumedRepo = new AssumedRepository(
this.basePath,
this.gitRevision,
this.sourceLinkTemplate,
);
private assumedRepo: AssumedRepository;

constructor(
private basePath: string,
Expand All @@ -188,7 +184,13 @@ export class RepositoryManager {
private sourceLinkTemplate: string,
private disableGit: boolean,
private logger: Logger,
) {}
) {
this.assumedRepo = new AssumedRepository(
this.basePath,
this.gitRevision,
this.sourceLinkTemplate,
);
}

/**
* Check whether the given file is placed inside a repository.
Expand Down
2 changes: 1 addition & 1 deletion src/lib/models/reflections/parameter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import type { Serializer, JSONOutput, Deserializer } from "../../serialization";
export class ParameterReflection extends Reflection {
readonly variant = "param";

override parent?: SignatureReflection;
declare parent?: SignatureReflection;

defaultValue?: string;

Expand Down
4 changes: 2 additions & 2 deletions src/lib/models/reflections/signature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ export class SignatureReflection extends Reflection {
super(name, kind, parent);
}

override kind!:
declare kind:
| ReflectionKind.SetSignature
| ReflectionKind.GetSignature
| ReflectionKind.IndexSignature
| ReflectionKind.CallSignature
| ReflectionKind.ConstructorSignature;

override parent!: DeclarationReflection;
declare parent: DeclarationReflection;

/**
* A list of all source files that contributed to this reflection.
Expand Down
2 changes: 1 addition & 1 deletion src/lib/models/reflections/type-parameter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export type VarianceModifier =
export class TypeParameterReflection extends Reflection {
readonly variant = "typeParam";

override parent?: DeclarationReflection | SignatureReflection;
declare parent?: DeclarationReflection | SignatureReflection;

type?: SomeType;

Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"module": "Node16",
"lib": ["es2021"],
"lib": ["es2023"],
"target": "es2021",

// Add our `ts` internal types
Expand Down

0 comments on commit 3e2a9a4

Please sign in to comment.