Skip to content

Commit

Permalink
chore: remove unneeded null annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
Keyrxng committed Aug 21, 2024
1 parent b46b77d commit 27f7980
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class Logs {
return metadata;
}

public ok(log: string, metadata?: Metadata): LogReturn | null {
public ok(log: string, metadata?: Metadata): LogReturn {
metadata = this._addDiagnosticInformation(metadata);
return this._log({
level: LOG_LEVEL.INFO,
Expand All @@ -57,7 +57,7 @@ export class Logs {
});
}

public info(log: string, metadata?: Metadata): LogReturn | null {
public info(log: string, metadata?: Metadata): LogReturn {
metadata = this._addDiagnosticInformation(metadata);
return this._log({
level: LOG_LEVEL.INFO,
Expand All @@ -68,7 +68,7 @@ export class Logs {
});
}

public error(log: string, metadata?: Metadata): LogReturn | null {
public error(log: string, metadata?: Metadata): LogReturn {
metadata = this._addDiagnosticInformation(metadata);
return this._log({
level: LOG_LEVEL.ERROR,
Expand All @@ -79,7 +79,7 @@ export class Logs {
});
}

public debug(log: string, metadata?: Metadata): LogReturn | null {
public debug(log: string, metadata?: Metadata): LogReturn {
metadata = this._addDiagnosticInformation(metadata);
return this._log({
level: LOG_LEVEL.DEBUG,
Expand All @@ -90,7 +90,7 @@ export class Logs {
});
}

public fatal(log: string, metadata?: Metadata): LogReturn | null {
public fatal(log: string, metadata?: Metadata): LogReturn {
if (!metadata) {
metadata = Logs.convertErrorsIntoObjects(new Error(log)) as Metadata;
const stack = metadata.stack as string[];
Expand All @@ -115,7 +115,7 @@ export class Logs {
});
}

public verbose(log: string, metadata?: Metadata): LogReturn | null {
public verbose(log: string, metadata?: Metadata): LogReturn {
metadata = this._addDiagnosticInformation(metadata);
return this._log({
level: LOG_LEVEL.VERBOSE,
Expand Down

0 comments on commit 27f7980

Please sign in to comment.