@asyncapi/react-component
Version:
A React component for AsyncAPI specification.
21 lines • 747 B
TypeScript
import React, { Component } from 'react';
import { AsyncAPIDocumentInterface } from '@asyncapi/parser';
import { ErrorObject, PropsSchema } from '../../types';
import { ConfigInterface } from '../../config';
export interface AsyncApiProps {
schema: PropsSchema;
config?: Partial<ConfigInterface>;
}
interface AsyncAPIState {
asyncapi?: AsyncAPIDocumentInterface;
error?: ErrorObject;
}
declare class AsyncApiComponent extends Component<AsyncApiProps, AsyncAPIState> {
state: AsyncAPIState;
componentDidMount(): Promise<void>;
componentDidUpdate(prevProps: AsyncApiProps): Promise<void>;
render(): React.JSX.Element;
private parseSchema;
}
export default AsyncApiComponent;
//# sourceMappingURL=AsyncApi.d.ts.map