Skip to content

Commit

Permalink
all: updated dependencies & enabled noImplicitOverride (ts)
Browse files Browse the repository at this point in the history
  • Loading branch information
Luluno01 committed Oct 9, 2023
1 parent 79280b7 commit e6816b7
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 26 deletions.
34 changes: 17 additions & 17 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@unlib-js/unreliable",
"version": "1.1.2",
"version": "1.1.3",
"description": "Management wrapper for unreliable resources, e.g., another process",
"main": "build/index.js",
"scripts": {
Expand All @@ -14,8 +14,8 @@
"author": "Untitled",
"license": "ISC",
"devDependencies": {
"@types/node": "^16.10.2",
"typescript": "^4.4.3"
"@types/node": "^20.8.3",
"typescript": "^5.2.2"
},
"repository": {
"url": "https://github.com/unlib-js/unreliable.git"
Expand Down
4 changes: 2 additions & 2 deletions src/Daemon.h.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ export interface DaemonOptions {
}

export class StartFailureError extends Error {
name = 'StartFailureError'
public readonly cause: any
public override name = 'StartFailureError'
public override readonly cause: any
public readonly nthAttempt: number
public readonly retryIn: number
constructor(cause: any, nthAttempt: number, retryIn: number, msg?: string) {
Expand Down
2 changes: 1 addition & 1 deletion src/Unreliable.h.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export interface UnreliableMeta {
}

export class UnreliableDeathError<U, R> extends Error {
public name = 'UnreliableDeathError'
public override name = 'UnreliableDeathError'
public readonly unreliable: U
public readonly reason: R
constructor(unreliable: U, reason: R, msg?: string) {
Expand Down
6 changes: 3 additions & 3 deletions src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { setTimeout as sleep } from 'timers/promises'


class FakeProcess extends Unreliable<EventEmitter> {
static meta: UnreliableMeta = {
public static override meta: UnreliableMeta = {
states: {
init: 'init',
starting: 'starting',
Expand All @@ -31,7 +31,7 @@ class FakeProcess extends Unreliable<EventEmitter> {

public life: number = 0

protected async _createAndCheck() {
protected override async _createAndCheck() {
const { life } = this
if (life < 5000) throw new Error
const it = new EventEmitter
Expand All @@ -40,7 +40,7 @@ class FakeProcess extends Unreliable<EventEmitter> {
return it
}

protected _stop() {
protected override _stop() {
this.it!.emit('exit')
}
}
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
// "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
// "noPropertyAccessFromIndexSignature": true, /* Require undeclared properties from index signatures to use element accesses. */
"noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */

/* Module Resolution Options */
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
Expand Down

0 comments on commit e6816b7

Please sign in to comment.