import Vnmf from './index' type VnmfGetDerivedStateFromProps = /** * Returns an update to a component's state based on its new props and old state. * * Note: its presence prevents any of the deprecated lifecycle methods from being invoked */ (nextProps: Readonly

, prevState: S) => Partial | null interface VnmfStaticLifecycle { getDerivedStateFromProps?: VnmfGetDerivedStateFromProps } interface VnmfNewLifecycle { /** * Runs before React applies the result of `render` to the document, and * returns an object to be given to componentDidUpdate. Useful for saving * things such as scroll position before `render` causes changes to it. * * Note: the presence of getSnapshotBeforeUpdate prevents any of the deprecated * lifecycle events from running. */ getSnapshotBeforeUpdate?(prevProps: Readonly

, prevState: Readonly): SS | null /** * Called immediately after updating occurs. Not called for the initial render. * * The snapshot is only present if getSnapshotBeforeUpdate is present and returns non-null. */ componentDidUpdate?(prevProps: Readonly

, prevState: Readonly, snapshot?: SS): void } declare module './index' { interface PageNotFoundObject { /** * There is no path to the page */ path: string /** * Open the page that does not exist query */ query: Record /** * Is the first page launched this time? (For example, come in from sharing and wait ,The first page is the sharing page of the developer configuration ) */ isEntryPage: boolean } interface PageScrollObject { /** * The page of the page is rolling in the vertical direction (unit px) */ scrollTop: number } interface PageResizeObject { size: { windowWidth: number windowHeight: number } } interface ShareAppMessageObject { /** * Forwarding event source * `button`:Forwarding button on the page * `menu`:Forward the menu in the upper right corner * * @since 1.2.4 */ from?: 'button' | 'menu' | string /** * if `from` Value `button`,but `target` It triggers this forwarding incident `button`,Otherwise `undefined` * * @since 1.2.4 */ target?: object /** * Page contains `` Component ,Back to the current `` of url * * @since 1.6.4 */ webViewUrl?: string } interface ShareAppMessageReturn { /** * Forward the title ,Default The current applet name */ title?: string /** * Forwarding path ,Must / The complete path at the beginning ,Declars to the current page path */ path?: string /** * Custom picture path ,Can be a local file path 、Code package file path or network picture path * support PNGand JPG * Display the length and width ratio of the picture is 5:4 * Screenshot by default * * @since 1.5.0 */ imageUrl?: string } interface TabItemTapObject { /** * Clicked tabItemSerial number ,from 0 start */ index: string /** * Clicked tabItemPage path */ pagePath: string /** * Clicked tabItemButton text */ text: string } interface AddToFavoritesObject { /** * Page contains web-viewComponent ,Back to the current web-viewof url */ webviewUrl: string } interface AddToFavoritesReturnObject { /** * Custom title */ title?: string /** * Custom picture ,Display the length and width ratio of the picture 1:1 */ imageUrl?: string /** * customize queryField */ query?: string } interface ShareTimelineReturnObject { /** * Custom title */ title?: string /** * Custom page paths carry parameters */ query?: string /** * Custom picture path ,Can be local files or online pictures 。support PNG and JPG,Display the length and width ratio of the picture is 1:1 */ imageUrl?: string } interface ComponentLifecycle extends VnmfNewLifecycle { componentWillMount?(): void componentDidMount?(): void componentWillReceiveProps?(nextProps: Readonly

, nextContext: any): void shouldComponentUpdate?(nextProps: Readonly

, nextState: Readonly, nextContext: any): boolean componentWillUpdate?(nextProps: Readonly

, nextState: Readonly, nextContext: any): void componentWillUnmount?(): void componentDidCatch?(err: string): void componentDidShow?(): void componentDidHide?(): void componentDidNotFound?(opt: PageNotFoundObject): void } interface VnmfStatic { PageNotFoundObject: PageNotFoundObject PageScrollObject: PageScrollObject ShareAppMessageObject: ShareAppMessageObject ShareAppMessageReturn: ShareAppMessageReturn TabItemTapObject: TabItemTapObject AddToFavoritesObject: AddToFavoritesObject AddToFavoritesReturnObject: AddToFavoritesReturnObject ShareTimelineReturnObject: ShareTimelineReturnObject } }