Skip to content

Commit

Permalink
types updated: OverlayTrigger, TypeAhead -> Typeahead
Browse files Browse the repository at this point in the history
  • Loading branch information
wpdas committed Apr 24, 2024
1 parent 548e8c1 commit 4711bcf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
21 changes: 14 additions & 7 deletions lib/alem-vm/alem-vm.d.ts
Original file line number Diff line number Diff line change
@@ -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 };
Expand Down Expand Up @@ -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: {
Expand Down Expand Up @@ -418,15 +424,15 @@ export declare const clipboard: {
writeText: (text: string) => void;
};

type Call = <R extends {}>(
type Call = (
contractName: string,
methodName: string,
args?: {},
gas?: string | number,
deposit?: string | number,
) => void;

type CallList = <R extends {}>(
type CallList = (
callList: {
contractName: string;
methodName: string;
Expand Down Expand Up @@ -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;

/**
Expand All @@ -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;
Expand All @@ -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;

/**
Expand All @@ -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;
};

/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 4711bcf

Please sign in to comment.