Skip to content

Commit 6babfbe

Browse files
authored
Merge pull request #3 from SMBCheeky/dev
Remove log method variants constraints for logTag - it does not work as intended
2 parents 930487a + 120333a commit 6babfbe

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@smbcheeky/error-object",
33
"description": "Create errors that can be both thrown and returned. Make error handling easier for both JavaScript and TypeScript.",
4-
"version": "1.1.0",
4+
"version": "1.1.1",
55
"main": "dist/index.js",
66
"module": "dist/index.mjs",
77
"types": "dist/index.d.ts",

playground/yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"@jridgewell/sourcemap-codec" "^1.4.10"
2929

3030
"@smbcheeky/error-object@file:..":
31-
version "1.0.1"
31+
version "1.1.1"
3232
resolved "file:.."
3333

3434
"@tsconfig/node10@^1.0.7":

src/index.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -287,20 +287,20 @@ export class ErrorObject extends Error {
287287
);
288288
}
289289

290-
log<V extends string>(logTag: V & (string extends V ? never : V)) {
291-
return this._log<V>(logTag, 'log');
290+
log(logTag: string) {
291+
return this._log(logTag, 'log');
292292
}
293293

294-
debugLog<V extends string>(logTag: V & (string extends V ? never : V)) {
295-
return this._log<V>(logTag, 'debug');
294+
debugLog(logTag: string) {
295+
return this._log(logTag, 'debug');
296296
}
297297

298-
verboseLog<V extends string>(logTag: V & (string extends V ? never : V)) {
299-
return this._log<V>(logTag, 'verbose');
298+
verboseLog(logTag: string) {
299+
return this._log(logTag, 'verbose');
300300
}
301301

302-
private _log<V extends string>(
303-
logTag: V & (string extends V ? never : V),
302+
private _log(
303+
logTag: string,
304304
logLevel: 'log' | 'debug' | 'verbose',
305305
) {
306306
const logForThis =

0 commit comments

Comments
 (0)