Back to Fluentui

React Conformance.Api

packages/react-conformance/etc/react-conformance.api.md

4.40.2-hotfix22.4 KB
Original Source

API Report File for "@fluentui/react-conformance"

Do not edit this file. It is a report generated by API Extractor.

ts

import { ComponentDoc } from 'react-docgen-typescript';
import * as React_2 from 'react';
import { render } from '@testing-library/react';
import * as ts from 'typescript';

// @public (undocumented)
export type BaseConformanceTest<TProps = {}> = (testInfo: IsConformantOptions<TProps>) => void;

// @public (undocumented)
export type ConformanceTest<TProps = {}> = (testInfo: IsConformantOptions<TProps>, componentInfo: ComponentDoc, tsProgram: ts.Program) => void;

// @public (undocumented)
export function isConformant<TProps = {}>(...testInfo: Partial<IsConformantOptions<TProps>>[]): void;

// @public (undocumented)
export interface IsConformantOptions<TProps = {}> {
    Component: React_2.ComponentType<TProps>;
    componentPath: string;
    disabledTests?: string[];
    disableTypeTests?: boolean;
    displayName: string;
    elementRefName?: string;
    extraTests?: TestObject<TProps>;
    getTargetElement?: (renderResult: ReturnType<typeof render>, attr: keyof React_2.AllHTMLAttributes<HTMLElement> | 'ref' | `data-${string}`) => HTMLElement;
    isInternal?: boolean;
    primarySlot?: keyof TProps | 'root';
    renderOptions?: Parameters<typeof render>[1];
    requiredProps?: Partial<TProps>;
    testOptions?: TestOptions;
    tsConfig?: Partial<{
        configName: string;
        configDir: string;
    }>;
    // @deprecated (undocumented)
    tsconfigDir?: string;
    useDefaultExport?: boolean;
}

// @public (undocumented)
export interface TestObject<TProps = {}> {
    // (undocumented)
    [key: string]: BaseConformanceTest<TProps> | ConformanceTest<TProps>;
}

// @public
export interface TestOptions {
    // (undocumented)
    'component-has-static-classname'?: {
        prefix?: string;
    };
    // (undocumented)
    'consistent-callback-args'?: {
        legacyCallbacks?: string[];
    };
    // (undocumented)
    'consistent-callback-names'?: {
        ignoreProps?: string[];
    };
    // (undocumented)
    'has-static-classnames'?: {
        props: {
            [key: string]: string | {};
        };
        expectedClassNames?: {
            [key: string]: string;
        };
        getPortalElement?: (renderResult: ReturnType<typeof render>) => HTMLElement;
    }[];
}

// (No @packageDocumentation comment for this package)