ng-flex-layout
Version:
Angular Flex-Layout =======
94 lines (89 loc) • 3.59 kB
TypeScript
import { Provider, ComponentRef, DebugElement } from '@angular/core';
declare module 'vitest' {
interface Assertion<T = any> {
toHaveMap(expected: Record<string, string>): void;
}
interface AsymmetricMatchersContaining {
toHaveMap(expected: Record<string, string>): void;
}
interface Assertion<T = any> {
toHaveCssClass(expected: string): void;
}
interface AsymmetricMatchersContaining {
toHaveCssClass(expected: string): void;
}
interface Assertion<T = any> {
toHaveAttributes(expected: Record<string, string>): void;
}
interface AsymmetricMatchersContaining {
toHaveAttributes(expected: Record<string, string>): void;
}
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Exported DOM accessor utility functions
*/
declare const _dom: {
hasStyle: typeof hasStyle;
getDistributedNodes: typeof getDistributedNodes;
getShadowRoot: typeof getShadowRoot;
getText: typeof getText;
getStyle: typeof getStyle;
childNodes: typeof childNodes;
childNodesAsList: typeof childNodesAsList;
hasClass: typeof hasClass;
hasAttribute: typeof hasAttribute;
getAttribute: typeof getAttribute;
hasShadowRoot: typeof hasShadowRoot;
isCommentNode: typeof isCommentNode;
isElementNode: typeof isElementNode;
isPresent: typeof isPresent;
isShadowRoot: typeof isShadowRoot;
tagName: typeof tagName;
lastElementChild: typeof lastElementChild;
};
declare function getStyle(element: any, stylename: string): string;
declare function hasStyle(element: any, styleName: string, styleValue?: string, inlineOnly?: boolean): boolean;
declare function getDistributedNodes(el: HTMLElement): Node[];
declare function getShadowRoot(el: HTMLElement): DocumentFragment;
declare function getText(el: Node): string;
declare function childNodesAsList(el: Node): any[];
declare function hasClass(element: any, className: string): boolean;
declare function hasAttribute(element: any, attributeName: string): boolean;
declare function getAttribute(element: any, attributeName: string): string;
declare function childNodes(el: any): Node[];
declare function hasShadowRoot(node: any): boolean;
declare function isCommentNode(node: Node): boolean;
declare function isElementNode(node: Node): boolean;
declare function isShadowRoot(node: any): boolean;
declare function isPresent(obj: any): boolean;
declare function tagName(element: any): string;
declare function lastElementChild(element: any): Node | null;
type ComponentFactory = () => any;
type FixtureLike = {
componentInstance?: any;
debugElement?: DebugElement;
nativeElement?: any;
location?: {
nativeElement: any;
};
injector?: any;
changeDetectorRef?: {
detectChanges: () => void;
};
detectChanges?: () => void;
[key: string]: any;
};
declare function makeCreateTestComponent(baseOrProviders?: ComponentFactory | Provider[], defaultProviders?: Provider[]): (templateStr: string, styles?: string[], additionalProviders?: Provider[], additionalImports?: any[]) => ComponentRef<{
[x: string]: any;
}> & FixtureLike;
declare function expectNativeEl(fixture: any, instanceOptions?: any): any;
declare function expectEl(el: HTMLElement): any;
declare function queryFor(fixture: any, selector: string): HTMLElement[];
export { _dom, expectEl, expectNativeEl, makeCreateTestComponent, queryFor };