UNPKG

@wdio/browser-runner

Version:
67 lines 2.88 kB
import type { StencilEnvironment } from '../../../stencil/index.d.ts'; import type { NewSpecPageOptions } from '@stencil/core/internal'; /** * Creates a new spec page for unit testing * @param opts the options to apply to the spec page that influence its configuration and operation * @returns the created spec page */ export declare function render(opts: NewSpecPageOptions): StencilEnvironment; /** * Helper method to wait until all Stencil components are rendered */ export declare function waitForChanges(documentElement?: HTMLElement): Promise<void>; /** * A set of flags used for bitwise calculations against {@link ComponentRuntimeMeta#$flags$}. * * These flags should only be used in conjunction with {@link ComponentRuntimeMeta#$flags$}. * They should _not_ be used for calculations against other fields/numbers */ export declare const enum CMP_FLAGS { /** * Used to determine if a component is using the shadow DOM. * e.g. `shadow: true | {}` is set on the `@Component()` decorator */ shadowDomEncapsulation = 1, /** * Used to determine if a component is using scoped stylesheets * e.g. `scoped: true` is set on the `@Component()` decorator */ scopedCssEncapsulation = 2, /** * Used to determine if a component does not use the shadow DOM _and_ has `<slot/>` tags in its markup. */ hasSlotRelocation = 4, /** * Determines if a shim for the shadow DOM is necessary. * * The shim should only be needed if a component requires {@link shadowDomEncapsulation} and if any output * target-specific criteria are met. Refer to this flag's usage to determine each output target's criteria. */ needsShadowDomShim = 8, /** * Determines if `delegatesFocus` is enabled for a component that uses the shadow DOM. * e.g. `shadow: { delegatesFocus: true }` is set on the `@Component()` decorator */ shadowDelegatesFocus = 16, /** * Determines if `mode` is set on the `@Component()` decorator */ hasMode = 32, /** * Determines if styles must be scoped due to either: * 1. A component is using scoped stylesheets ({@link scopedCssEncapsulation}) * 2. A component is using the shadow DOM _and_ the output target's rules for requiring a shadow DOM shim have been * met ({@link needsShadowDomShim}) */ needsScopedEncapsulation = 10 } /** * Transform metadata about a component from the compiler to a compact form for * use at runtime. * * @param compilerMeta component metadata gathered during compilation * @param includeMethods include methods in the component's members or not * @returns a compact format for component metadata, intended for runtime use */ export declare const formatComponentRuntimeMeta: (compilerMeta: any, includeMethods: boolean) => any; //# sourceMappingURL=stencil.d.ts.map