diff --git a/projects/angular-odata/src/lib/models/model.ts b/projects/angular-odata/src/lib/models/model.ts index 09c0832c..69ea57f7 100644 --- a/projects/angular-odata/src/lib/models/model.ts +++ b/projects/angular-odata/src/lib/models/model.ts @@ -26,6 +26,7 @@ import { ODataModelEventType, ODataModelEventEmitter, ModelFieldOptions, + ModelInterface, } from './options'; import { EdmType, ParserOptions } from '../types'; import { ODataEntityAnnotations } from '../annotations'; @@ -778,6 +779,12 @@ export class ODataModel { //#endregion // Cast + cast( + type: string, ModelType?: typeof ODataModel + ): ODataModel & ModelInterface; + cast>( + type: string, ModelType?: typeof ODataModel + ): M; cast(type: string, ModelType?: typeof ODataModel) { //: ODataModel { const resource = this.resource(); diff --git a/projects/angular-odata/src/lib/schema/enum-type.ts b/projects/angular-odata/src/lib/schema/enum-type.ts index 84a68cbf..0af3f8d0 100644 --- a/projects/angular-odata/src/lib/schema/enum-type.ts +++ b/projects/angular-odata/src/lib/schema/enum-type.ts @@ -81,7 +81,7 @@ export class ODataEnumType extends ODataParserSchemaElement< return this.parser.unpack(value); } - pack(value: string | number) { + pack(value: string | number | number[]) { return this.parser.pack(value); } }