angular-odata
Version:
Client side OData typescript library for Angular
53 lines (52 loc) • 2.03 kB
TypeScript
import { AnnotationConfig, Parser } from '../types';
import { ODataAnnotatable } from './annotation';
import { ODataSchema } from './schema';
export declare class ODataSchemaElement extends ODataAnnotatable {
name: string;
schema: ODataSchema;
constructor(config: {
annotations?: AnnotationConfig[];
name: string;
}, schema: ODataSchema);
get api(): import("angular-odata").ODataApi;
/**
* Create a nicer looking title.
* Titleize is meant for creating pretty output.
* @param term The term of the annotation to find.
* @returns The titleized string.
*/
titleize(term?: string | RegExp): string;
/**
* Returns a full type of the structured type including the namespace/alias.
* @param alias Use the alias of the namespace instead of the namespace.
* @returns The string representation of the type.
*/
type({ alias }?: {
alias?: boolean;
}): string;
/**
* Returns a boolean indicating if the structured type is of the given type.
* @param type String representation of the type
* @returns True if the callable is type of the given type
*/
isTypeOf(element: ODataSchemaElement): boolean;
/**
* Returns a boolean indicating if the structured type is a subtype of the given type.
* @param type String representation of the type
* @returns True if the callable is type of the given type
*/
isSubtypeOf(element: ODataSchemaElement): boolean;
/**
* Returns a boolean indicating if the structured type is a supertype of the given type.
* @param type String representation of the type
* @returns True if the callable is type of the given type
*/
isSupertypeOf(element: ODataSchemaElement): boolean;
}
export declare class ODataParserSchemaElement<E, P extends Parser<E>> extends ODataSchemaElement {
parser: P;
constructor(config: {
annotations?: AnnotationConfig[];
name: string;
}, schema: ODataSchema, parser: P);
}