Skip to content

Commit ced05b6

Browse files
committed
Make Class.kind be readonly
1 parent 51084b8 commit ced05b6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ export enum Kinds {
88
}
99

1010
export class Initialized {
11-
public kind: typeof Kinds.Initialized = Kinds.Initialized;
11+
readonly kind = Kinds.Initialized;
1212
}
1313

1414
export class Pending {
15-
public kind: typeof Kinds.Pending = Kinds.Pending;
15+
readonly kind = Kinds.Pending;
1616
}
1717

1818
export class Failure<E> {
19-
public kind: typeof Kinds.Failure = Kinds.Failure;
19+
readonly kind = Kinds.Failure;
2020

2121
constructor(public error: E) {
2222
if (error === null || error === undefined) {
@@ -26,7 +26,7 @@ export class Failure<E> {
2626
}
2727

2828
export class Success<D> {
29-
public kind: typeof Kinds.Success = Kinds.Success;
29+
readonly kind = Kinds.Success;
3030

3131
constructor(public data: D) {
3232
if (data === null || data === undefined) {

0 commit comments

Comments
 (0)