diff --git a/lib/alem-vm/alem-vm.d.ts b/lib/alem-vm/alem-vm.d.ts index 29042bb..de15839 100644 --- a/lib/alem-vm/alem-vm.d.ts +++ b/lib/alem-vm/alem-vm.d.ts @@ -1,7 +1,7 @@ // ALEM Items: export type ChildrenProps = { - children: JSX.Element | JSX.Element[] | string | number; + children: JSX.Element | ReactElement | JSX.Element[] | string | number; }; export type ModuleResponseData = { response: any; forCallId: number }; @@ -285,8 +285,14 @@ export declare interface BosContext { networkId: NetworkId; } +/** + * Widget's Props. This is the props the Widget (stateful components) receives. + */ export declare var props: any; +/** + * Widget's Context + */ export declare var context: BosContext; export declare const Widget: (params: { @@ -418,7 +424,7 @@ export declare const clipboard: { writeText: (text: string) => void; }; -type Call = ( +type Call = ( contractName: string, methodName: string, args?: {}, @@ -426,7 +432,7 @@ type Call = ( deposit?: string | number, ) => void; -type CallList = ( +type CallList = ( callList: { contractName: string; methodName: string; @@ -744,6 +750,7 @@ export declare const OverlayTrigger: (params: { * The content that will be displayed in the overlay. */ overlay: any; + children: JSX.Element | ReactElement | JSX.Element[] | string | number; }) => React.ReactNode; /** @@ -768,7 +775,7 @@ export declare const InfiniteScroll: (params: { * * Know more: https://docs.near.org/bos/api/builtin-components#typeahead */ -export declare const TypeAhead: (params: { +export declare const Typeahead: (params: { options: string[]; multiple?: boolean; placeholder?: string; @@ -780,7 +787,7 @@ export declare const TypeAhead: (params: { */ export declare const Tooltip: (params: { id?: string; - children: JSX.Element | ReactElement; + children: JSX.Element | ReactElement | JSX.Element[] | string | number; }) => React.ReactNode; /** @@ -798,8 +805,8 @@ export declare const VM: { * Know more: https://docs.near.org/bos/api/state */ export declare const State: { - init: (defaultValue: {}) => void; - update: (updatedValues: {}) => void; + init: (defaultValue?: {}) => void; + update: (updatedValues?: {}) => void; }; /** diff --git a/package.json b/package.json index df7b400..4de05db 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "alem", "description": "Create web3 applications for NEAR BOS with a focus on performance and friendly development.", - "version": "1.0.0-beta.30", + "version": "1.0.0-beta.31", "main": "main.js", "types": "index.d.ts", "author": "Wenderson Pires - wendersonpires.near",