shallow-render
Version:
Shallow rendering test utility for Angular
15 lines (14 loc) • 847 B
TypeScript
import { EventEmitter, OutputEmitterRef } from '@angular/core';
import { CustomError } from '../models/custom-error';
export type KeysOfType<TObject, TPropertyType> = {
[K in keyof TObject]: TObject[K] extends TPropertyType ? K : never;
}[keyof TObject];
export type PickByType<TObject, TPropertyType> = Pick<TObject, KeysOfType<TObject, TPropertyType>>;
export type OutputTypes = EventEmitter<any> | OutputEmitterRef<any>;
export declare class PropertyNotMarkedAsOutputError extends CustomError {
constructor(key: string | symbol | number, component: any);
}
export declare class PropertyNotAnEventEmitterOrSignalOutputError extends CustomError {
constructor(key: string | symbol | number, component: any);
}
export declare const outputProxy: <TComponent extends Object>(component: TComponent) => PickByType<TComponent, OutputTypes>;