@thisisagile/easy
Advanced tools
Comparing version 1.21.6 to 1.21.7
@@ -17,1 +17,2 @@ import { Enum } from '../types'; | ||
} | ||
export declare const isHttpStatus: (s?: unknown) => s is HttpStatus; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.HttpStatus = void 0; | ||
exports.isHttpStatus = exports.HttpStatus = void 0; | ||
const types_1 = require("../types"); | ||
@@ -25,2 +25,4 @@ class HttpStatus extends types_1.Enum { | ||
HttpStatus.BadGateway = new HttpStatus('Bad gateway', 502); | ||
const isHttpStatus = (s) => types_1.isAn(s, 'id', 'status'); | ||
exports.isHttpStatus = isHttpStatus; | ||
//# sourceMappingURL=HttpStatus.js.map |
@@ -10,8 +10,8 @@ import { Id } from './Id'; | ||
constructor(name: string, id?: Id, code?: string); | ||
get isValid(): boolean; | ||
static all<E extends Enum>(): List<E>; | ||
static byId<E extends Enum>(id: Id, alt?: Get<E>): E; | ||
equals<E extends Enum | Id>(other: E): boolean; | ||
get isValid(): boolean; | ||
toString(): string; | ||
} | ||
export declare const isEnum: (e?: unknown) => e is Enum; |
@@ -14,2 +14,5 @@ "use strict"; | ||
} | ||
get isValid() { | ||
return Is_1.isDefined(this.id); | ||
} | ||
static all() { | ||
@@ -29,5 +32,2 @@ return Meta_1.meta(this) | ||
} | ||
get isValid() { | ||
return Is_1.isDefined(this.id); | ||
} | ||
toString() { | ||
@@ -34,0 +34,0 @@ return this.id.toString(); |
{ | ||
"name": "@thisisagile/easy", | ||
"version": "1.21.6", | ||
"version": "1.21.7", | ||
"description": "Straightforward library for building domain-driven microservice architectures", | ||
@@ -5,0 +5,0 @@ "author": "Sander Hoogendoorn", |
@@ -1,2 +0,2 @@ | ||
import { Enum } from '../types'; | ||
import { Enum, isAn } from '../types'; | ||
@@ -24,1 +24,3 @@ export class HttpStatus extends Enum { | ||
} | ||
export const isHttpStatus = (s?: unknown): s is HttpStatus => isAn<HttpStatus>(s, 'id', 'status'); |
@@ -12,2 +12,6 @@ import { Id } from './Id'; | ||
get isValid(): boolean { | ||
return isDefined(this.id); | ||
} | ||
static all<E extends Enum>(): List<E> { | ||
@@ -31,6 +35,2 @@ return meta(this) | ||
get isValid(): boolean { | ||
return isDefined(this.id); | ||
} | ||
toString(): string { | ||
@@ -37,0 +37,0 @@ return this.id.toString(); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
185008
2907