Skip to content

Commit

Permalink
Add support for readonly properties (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fryuni authored May 29, 2022
1 parent 8c59f47 commit 4411f8b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion 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 @@ -44,6 +44,6 @@
"**/*.ts"
],
"dependencies": {
"@croct/json": "^1.0.0"
"@croct/json": "^1.1"
}
}
6 changes: 3 additions & 3 deletions src/logger.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {JsonCompatibleObject} from '@croct/json';
import {ReadonlyJsonCompatibleObject} from '@croct/json';

/**
* Additional information about the log message.
*/
export type LogDetails = JsonCompatibleObject;
export type LogDetails = ReadonlyJsonCompatibleObject;

/**
* The severity of the log message.
Expand Down Expand Up @@ -48,7 +48,7 @@ export type Log<D extends LogDetails = LogDetails> = {
* The log message.
*/
message: string,
} & (JsonCompatibleObject extends D ? {details?: D} : {details: D});
} & (LogDetails extends D ? {details?: D} : {details: D});

/**
* A common interface for loggers.
Expand Down

0 comments on commit 4411f8b

Please sign in to comment.