Gleap SDK for Capacitor is the easiest way to integrate Gleap into your Ionic apps! Achieve better app quality with comprehensive in-app bug reporting & customer feedback for your web-apps and websites. Many thanks to Stephan Nagel (congrapp) for his work on the Gleap capacitor plugin.
This plugin supports capacitor 7. See the instructions below for earlier capacitor versions.
npm install capacitor-gleap-plugin
npx cap sync
Please install the plugin version from our capacitor-v6 brunch with npm install GleapSDK/Capacitor-SDK#capacitor-v6 --save
if you are using capacitor 6.
Please install the plugin version from our capacitor-v5 brunch with npm install GleapSDK/Capacitor-SDK#capacitor-v5 --save
if you are using capacitor 5.
Please install the plugin version from our capacitor-v4 brunch with npm install GleapSDK/Capacitor-SDK#capacitor-v4 --save
if you are using capacitor 4 or earlier.
initialize(...)
identify(...)
updateContact(...)
clearIdentity()
getIdentity()
isUserIdentified()
log(...)
showSurvey(...)
attachCustomData(...)
setTags(...)
setNetworkLogsBlacklist(...)
setNetworkLogPropsToIgnore(...)
setAiTools(...)
setTicketAttribute(...)
unsetTicketAttribute(...)
clearTicketAttributes()
setCustomData(...)
removeCustomData(...)
clearCustomData()
trackEvent(...)
trackPage(...)
setEventCallback(...)
sendSilentCrashReport(...)
preFillForm(...)
addAttachment(...)
removeAllAttachments()
open()
openNews(...)
openNewsArticle(...)
openHelpCenter(...)
openHelpCenterArticle(...)
openHelpCenterCollection(...)
searchHelpCenter(...)
openFeatureRequests(...)
close()
isOpened()
startFeedbackFlow(...)
startClassicForm(...)
startConversation(...)
openConversation(...)
startBot(...)
showFeedbackButton(...)
setDisableInAppNotifications(...)
setLanguage(...)
disableConsoleLogOverwrite()
enableDebugConsoleLog()
- Interfaces
- Type Aliases
initialize(options: { API_KEY: string; }) => Promise<{ initialized: boolean; }>
Initialize Gleap with an API key
Param | Type |
---|---|
options |
{ API_KEY: string; } |
Returns: Promise<{ initialized: boolean; }>
Since: 7.0.0
identify(options: { userId: string; userHash?: string; name?: string; email?: string; phone?: string; companyId?: string; companyName?: string; avatar?: string; sla?: number; plan?: string; value?: number; customData?: Object; }) => Promise<{ identify: boolean; }>
Set user identity
Param | Type |
---|---|
options |
{ userId: string; userHash?: string; name?: string; email?: string; phone?: string; companyId?: string; companyName?: string; avatar?: string; sla?: number; plan?: string; value?: number; customData?: Object; } |
Returns: Promise<{ identify: boolean; }>
Since: 7.0.0
updateContact(options: { name?: string; email?: string; phone?: string; companyId?: string; companyName?: string; avatar?: string; sla?: number; plan?: string; value?: number; customData?: Object; }) => Promise<{ identify: boolean; }>
Update user properties
Param | Type |
---|---|
options |
{ name?: string; email?: string; phone?: string; companyId?: string; companyName?: string; avatar?: string; sla?: number; plan?: string; value?: number; customData?: Object; } |
Returns: Promise<{ identify: boolean; }>
Since: 13.2.1
clearIdentity() => Promise<{ clearIdentity: boolean; }>
Clear user identity
Returns: Promise<{ clearIdentity: boolean; }>
Since: 7.0.0
getIdentity() => Promise<{ identity: { userId: string; name?: string; email?: string; phone?: string; value?: number; }; }>
Get the current user identity
Returns: Promise<{ identity: { userId: string; name?: string; email?: string; phone?: string; value?: number; }; }>
Since: 8.1.0
isUserIdentified() => Promise<{ isUserIdentified: boolean; }>
User identified status.
Returns: Promise<{ isUserIdentified: boolean; }>
Since: 8.1.0
log(options: { message: string; logLevel?: "ERROR" | "WARNING" | "INFO"; }) => Promise<{ logged: boolean; }>
Submit a custom log message with the given level
Param | Type |
---|---|
options |
{ message: string; logLevel?: 'ERROR' | 'WARNING' | 'INFO'; } |
Returns: Promise<{ logged: boolean; }>
Since: 7.0.0
showSurvey(options: { surveyId: string; format?: "survey" | "survey_full"; }) => Promise<{ opened: boolean; }>
Manually show a survey.
Param | Type |
---|---|
options |
{ surveyId: string; format?: 'survey' | 'survey_full'; } |
Returns: Promise<{ opened: boolean; }>
Since: 8.5.1
attachCustomData(options: { data: any; }) => Promise<{ attachedCustomData: boolean; }>
Add custom data
Param | Type |
---|---|
options |
{ data: any; } |
Returns: Promise<{ attachedCustomData: boolean; }>
Since: 7.0.0
setTags(options: { tags: string[]; }) => Promise<{ tagsSet: boolean; }>
Set tags
Param | Type |
---|---|
options |
{ tags: string[]; } |
Returns: Promise<{ tagsSet: boolean; }>
Since: 8.6.0
setNetworkLogsBlacklist(options: { blacklist: string[]; }) => Promise<{ blacklistSet: boolean; }>
Set network logs blacklist
Param | Type |
---|---|
options |
{ blacklist: string[]; } |
Returns: Promise<{ blacklistSet: boolean; }>
Since: 13.2.1
setNetworkLogPropsToIgnore(options: { propsToIgnore: string[]; }) => Promise<{ propsToIgnoreSet: boolean; }>
Set network logs props to ignore
Param | Type |
---|---|
options |
{ propsToIgnore: string[]; } |
Returns: Promise<{ propsToIgnoreSet: boolean; }>
Since: 13.2.1
setAiTools(options: { tools: { name: string; description: string; response: string; executionType: "auto" | "button"; parameters: { name: string; description: string; type: "string" | "number" | "boolean"; required: boolean; enums?: string[]; }[]; }[]; }) => Promise<{ aiToolsSet: boolean; }>
Sets the AI tools to use
Param | Type |
---|---|
options |
{ tools: { name: string; description: string; response: string; executionType: 'auto' | 'button'; parameters: { name: string; description: string; type: 'string' | 'number' | 'boolean'; required: boolean; enums?: string[]; }[]; }[]; } |
Returns: Promise<{ aiToolsSet: boolean; }>
Since: 13.5.0
setTicketAttribute(options: { key: string; value: string; }) => Promise<{ setTicketAttribute: boolean; }>
Sets the value of a ticket attribute
Param | Type |
---|---|
options |
{ key: string; value: string; } |
Returns: Promise<{ setTicketAttribute: boolean; }>
Since: 13.5.0
unsetTicketAttribute(options: { key: string; }) => Promise<{ unsetTicketAttribute: boolean; }>
Unset a ticket attribute
Param | Type |
---|---|
options |
{ key: string; } |
Returns: Promise<{ unsetTicketAttribute: boolean; }>
Since: 14.1.0
clearTicketAttributes() => Promise<{ clearTicketAttributes: boolean; }>
Clear all ticket attributes
Returns: Promise<{ clearTicketAttributes: boolean; }>
Since: 14.1.0
setCustomData(options: { key: string; value: string; }) => Promise<{ setCustomData: boolean; }>
Set custom data
Param | Type |
---|---|
options |
{ key: string; value: string; } |
Returns: Promise<{ setCustomData: boolean; }>
Since: 7.0.0
removeCustomData(options: { key: string; }) => Promise<{ removedCustomData: boolean; }>
Remove custom data by key
Param | Type |
---|---|
options |
{ key: string; } |
Returns: Promise<{ removedCustomData: boolean; }>
Since: 7.0.0
clearCustomData() => Promise<{ clearedCustomData: boolean; }>
Clear custom data
Returns: Promise<{ clearedCustomData: boolean; }>
Since: 7.0.0
trackEvent(options: { name: string; data?: any; }) => Promise<{ loggedEvent: boolean; }>
Log event to Gleap
Param | Type |
---|---|
options |
{ name: string; data?: any; } |
Returns: Promise<{ loggedEvent: boolean; }>
Since: 8.0.0
trackPage(options: { pageName: string; }) => Promise<{ trackedPage: boolean; }>
Track a page view
Param | Type |
---|---|
options |
{ pageName: string; } |
Returns: Promise<{ trackedPage: boolean; }>
Since: 8.4.1
setEventCallback(callback: GleapEventCallback) => Promise<CallbackID>
Param | Type |
---|---|
callback |
GleapEventCallback |
Returns: Promise<string>
Since: 7.0.0
sendSilentCrashReport(options: { description: string; severity?: "LOW" | "MEDIUM" | "HIGH"; dataExclusion?: { customData: Boolean; metaData: Boolean; attachments: Boolean; consoleLog: Boolean; networkLogs: Boolean; customEventLog: Boolean; screenshot: Boolean; replays: Boolean; }; }) => Promise<{ sentSilentBugReport: boolean; }>
Log event to Gleap
Param | Type |
---|---|
options |
{ description: string; severity?: 'LOW' | 'MEDIUM' | 'HIGH'; dataExclusion?: { customData: Boolean; metaData: Boolean; attachments: Boolean; consoleLog: Boolean; networkLogs: Boolean; customEventLog: Boolean; screenshot: Boolean; replays: Boolean; }; } |
Returns: Promise<{ sentSilentBugReport: boolean; }>
Since: 7.0.0
preFillForm(options: { data: any; }) => Promise<{ preFilledForm: boolean; }>
Prefills the widget's form data
Param | Type |
---|---|
options |
{ data: any; } |
Returns: Promise<{ preFilledForm: boolean; }>
Since: 7.0.0
addAttachment(options: { base64data: string; name: string; }) => Promise<{ attachmentAdded: boolean; }>
Add attachment as bas64 string
Param | Type |
---|---|
options |
{ base64data: string; name: string; } |
Returns: Promise<{ attachmentAdded: boolean; }>
Since: 7.0.0
removeAllAttachments() => Promise<{ allAttachmentsRemoved: boolean; }>
All attachments removed
Returns: Promise<{ allAttachmentsRemoved: boolean; }>
Since: 7.0.0
open() => Promise<{ openedWidget: boolean; }>
Open widget
Returns: Promise<{ openedWidget: boolean; }>
Since: 7.0.0
openNews(options: { showBackButton?: boolean; }) => Promise<{ openedNews: boolean; }>
Open news
Param | Type |
---|---|
options |
{ showBackButton?: boolean; } |
Returns: Promise<{ openedNews: boolean; }>
Since: 8.4.0
openNewsArticle(options: { articleId: string; showBackButton?: boolean; }) => Promise<{ opened: boolean; }>
Open news article
Param | Type |
---|---|
options |
{ articleId: string; showBackButton?: boolean; } |
Returns: Promise<{ opened: boolean; }>
Since: 8.4.0
openHelpCenter(options: { showBackButton?: boolean; }) => Promise<{ opened: boolean; }>
Open help center
Param | Type |
---|---|
options |
{ showBackButton?: boolean; } |
Returns: Promise<{ opened: boolean; }>
Since: 8.4.0
openHelpCenterArticle(options: { articleId: string; showBackButton?: boolean; }) => Promise<{ opened: boolean; }>
Open help center article
Param | Type |
---|---|
options |
{ articleId: string; showBackButton?: boolean; } |
Returns: Promise<{ opened: boolean; }>
Since: 8.4.0
openHelpCenterCollection(options: { collectionId: string; showBackButton?: boolean; }) => Promise<{ opened: boolean; }>
Open help center collection
Param | Type |
---|---|
options |
{ collectionId: string; showBackButton?: boolean; } |
Returns: Promise<{ opened: boolean; }>
Since: 8.4.0
searchHelpCenter(options: { term: string; showBackButton?: boolean; }) => Promise<{ opened: boolean; }>
Search help center
Param | Type |
---|---|
options |
{ term: string; showBackButton?: boolean; } |
Returns: Promise<{ opened: boolean; }>
Since: 8.4.0
openFeatureRequests(options: { showBackButton?: boolean; }) => Promise<{ openedFeatureRequests: boolean; }>
Open feature requests
Param | Type |
---|---|
options |
{ showBackButton?: boolean; } |
Returns: Promise<{ openedFeatureRequests: boolean; }>
Since: 8.4.0
close() => Promise<{ closedWidget: boolean; }>
Close widget
Returns: Promise<{ closedWidget: boolean; }>
Since: 7.0.0
isOpened() => Promise<{ isOpened: boolean; }>
Check widget status code
Returns: Promise<{ isOpened: boolean; }>
Since: 7.0.0
startFeedbackFlow(options: { feedbackFlow?: string; showBackButton?: boolean; }) => Promise<{ startedFeedbackFlow: boolean; }>
Start feedback flow
Param | Type |
---|---|
options |
{ feedbackFlow?: string; showBackButton?: boolean; } |
Returns: Promise<{ startedFeedbackFlow: boolean; }>
Since: 7.0.0
startClassicForm(options: { formId?: string; showBackButton?: boolean; }) => Promise<{ classicFormStarted: boolean; }>
Start a classic form
Param | Type |
---|---|
options |
{ formId?: string; showBackButton?: boolean; } |
Returns: Promise<{ classicFormStarted: boolean; }>
Since: 13.1.0
startConversation(options: { showBackButton?: boolean; }) => Promise<{ conversationStarted: boolean; }>
Start a new conversation
Param | Type |
---|---|
options |
{ showBackButton?: boolean; } |
Returns: Promise<{ conversationStarted: boolean; }>
Since: 13.1.0
openConversation(options: { showBackButton?: boolean; }) => Promise<{ conversationsOpened: boolean; }>
Opens the conversations tab.
Param | Type |
---|---|
options |
{ showBackButton?: boolean; } |
Returns: Promise<{ conversationsOpened: boolean; }>
Since: 13.9.0
startBot(options: { botId?: string; showBackButton?: boolean; }) => Promise<{ startedBot: boolean; }>
Start bot
Param | Type |
---|---|
options |
{ botId?: string; showBackButton?: boolean; } |
Returns: Promise<{ startedBot: boolean; }>
Since: 10.0.3
showFeedbackButton(options: { show?: boolean; }) => Promise<{ feedbackButtonShown: boolean; }>
Show or hide the feedback button.
Param | Type |
---|---|
options |
{ show?: boolean; } |
Returns: Promise<{ feedbackButtonShown: boolean; }>
Since: 8.0.0
setDisableInAppNotifications(options: { disableInAppNotifications?: boolean; }) => Promise<{ inAppNotificationsDisabled: boolean; }>
Disable in app notifications.
Param | Type |
---|---|
options |
{ disableInAppNotifications?: boolean; } |
Returns: Promise<{ inAppNotificationsDisabled: boolean; }>
Since: 8.6.1
setLanguage(options: { languageCode: string; }) => Promise<{ setLanguage: string; }>
Set Language
Param | Type |
---|---|
options |
{ languageCode: string; } |
Returns: Promise<{ setLanguage: string; }>
Since: 7.0.0
disableConsoleLogOverwrite() => Promise<{ consoleLogDisabled: boolean; }>
Disable console log overwrite
Returns: Promise<{ consoleLogDisabled: boolean; }>
Since: 7.0.0
enableDebugConsoleLog() => Promise<{ debugConsoleLogEnabled: boolean; }>
Enable debug console log
Returns: Promise<{ debugConsoleLogEnabled: boolean; }>
Since: 7.0.0
Provides functionality common to all JavaScript objects.
Prop | Type | Description |
---|---|---|
constructor |
Function |
The initial value of Object.prototype.constructor is the standard built-in Object constructor. |
Method | Signature | Description |
---|---|---|
toString | () => string | Returns a string representation of an object. |
toLocaleString | () => string | Returns a date converted to a string using the current locale. |
valueOf | () => Object | Returns the primitive value of the specified object. |
hasOwnProperty | (v: PropertyKey) => boolean | Determines whether an object has a property with the specified name. |
isPrototypeOf | (v: Object) => boolean | Determines whether an object exists in another object's prototype chain. |
propertyIsEnumerable | (v: PropertyKey) => boolean | Determines whether a specified property is enumerable. |
Creates a new function.
Prop | Type |
---|---|
prototype |
any |
length |
number |
arguments |
any |
caller |
Function |
Method | Signature | Description |
---|---|---|
apply | (this: Function, thisArg: any, argArray?: any) => any | Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function. |
call | (this: Function, thisArg: any, ...argArray: any[]) => any | Calls a method of an object, substituting another object for the current object. |
bind | (this: Function, thisArg: any, ...argArray: any[]) => any | For a given function, creates a bound function that has the same body as the original function. The this object of the bound function is associated with the specified object, and has the specified initial parameters. |
toString | () => string | Returns a string representation of a function. |
Prop | Type | Description |
---|---|---|
id |
Identifier |
It is null when a function declaration is a part of the export default function statement |
Prop | Type |
---|---|
type |
'Identifier' |
name |
string |
Prop | Type |
---|---|
id |
Identifier | null |
type |
'FunctionExpression' |
body |
BlockStatement |
Prop | Type |
---|---|
type |
'BlockStatement' |
body |
Statement[] |
innerComments |
Comment[] |
Prop | Type |
---|---|
type |
'ExpressionStatement' |
expression |
Expression |
Prop | Type |
---|---|
ArrayExpression |
ArrayExpression |
ArrowFunctionExpression |
ArrowFunctionExpression |
AssignmentExpression |
AssignmentExpression |
AwaitExpression |
AwaitExpression |
BinaryExpression |
BinaryExpression |
CallExpression |
CallExpression |
ChainExpression |
ChainExpression |
ClassExpression |
ClassExpression |
ConditionalExpression |
ConditionalExpression |
FunctionExpression |
FunctionExpression |
Identifier |
Identifier |
ImportExpression |
ImportExpression |
Literal |
Literal |
LogicalExpression |
LogicalExpression |
MemberExpression |
MemberExpression |
MetaProperty |
MetaProperty |
NewExpression |
NewExpression |
ObjectExpression |
ObjectExpression |
SequenceExpression |
SequenceExpression |
TaggedTemplateExpression |
TaggedTemplateExpression |
TemplateLiteral |
TemplateLiteral |
ThisExpression |
ThisExpression |
UnaryExpression |
UnaryExpression |
UpdateExpression |
UpdateExpression |
YieldExpression |
YieldExpression |
Prop | Type |
---|---|
type |
'ArrayExpression' |
elements |
Array<Expression | SpreadElement | null> |
Prop | Type | Description |
---|---|---|
length |
number |
Gets or sets the length of the array. This is a number one higher than the highest index in the array. |
Method | Signature | Description |
---|---|---|
toString | () => string | Returns a string representation of an array. |
toLocaleString | () => string | Returns a string representation of an array. The elements are converted to string using their toLocalString methods. |
pop | () => T | undefined | Removes the last element from an array and returns it. If the array is empty, undefined is returned and the array is not modified. |
push | (...items: T[]) => number | Appends new elements to the end of an array, and returns the new length of the array. |
concat | (...items: ConcatArray<T>[]) => T[] | Combines two or more arrays. This method returns a new array without modifying any existing arrays. |
concat | (...items: (T | ConcatArray<T>)[]) => T[] | Combines two or more arrays. This method returns a new array without modifying any existing arrays. |
join | (separator?: string | undefined) => string | Adds all the elements of an array into a string, separated by the specified separator string. |
reverse | () => T[] | Reverses the elements in an array in place. This method mutates the array and returns a reference to the same array. |
shift | () => T | undefined | Removes the first element from an array and returns it. If the array is empty, undefined is returned and the array is not modified. |
slice | (start?: number | undefined, end?: number | undefined) => T[] | Returns a copy of a section of an array. For both start and end, a negative index can be used to indicate an offset from the end of the array. For example, -2 refers to the second to last element of the array. |
sort | (compareFn?: ((a: T, b: T) => number) | undefined) => this | Sorts an array in place. This method mutates the array and returns a reference to the same array. |
splice | (start: number, deleteCount?: number | undefined) => T[] | Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. |
splice | (start: number, deleteCount: number, ...items: T[]) => T[] | Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. |
unshift | (...items: T[]) => number | Inserts new elements at the start of an array, and returns the new length of the array. |
indexOf | (searchElement: T, fromIndex?: number | undefined) => number | Returns the index of the first occurrence of a value in an array, or -1 if it is not present. |
lastIndexOf | (searchElement: T, fromIndex?: number | undefined) => number | Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present. |
every | <S extends T>(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any) => this is S[] | Determines whether all the members of an array satisfy the specified test. |
every | (predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any) => boolean | Determines whether all the members of an array satisfy the specified test. |
some | (predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any) => boolean | Determines whether the specified callback function returns true for any element of an array. |
forEach | (callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any) => void | Performs the specified action for each element in an array. |
map | <U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any) => U[] | Calls a defined callback function on each element of an array, and returns an array that contains the results. |
filter | <S extends T>(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any) => S[] | Returns the elements of an array that meet the condition specified in a callback function. |
filter | (predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any) => T[] | Returns the elements of an array that meet the condition specified in a callback function. |
reduce | (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T) => T | Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. |
reduce | (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T) => T | |
reduce | <U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U) => U | Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. |
reduceRight | (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T) => T | Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. |
reduceRight | (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T) => T | |
reduceRight | <U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U) => U | Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. |
Prop | Type |
---|---|
length |
number |
Method | Signature |
---|---|
join | (separator?: string | undefined) => string |
slice | (start?: number | undefined, end?: number | undefined) => T[] |
Prop | Type |
---|---|
type |
'SpreadElement' |
argument |
Expression |
Prop | Type |
---|---|
type |
'ArrowFunctionExpression' |
expression |
boolean |
body |
Expression | BlockStatement |
Prop | Type |
---|---|
type |
'AssignmentExpression' |
operator |
AssignmentOperator |
left |
Pattern |
right |
Expression |
Prop | Type |
---|---|
type |
'ObjectPattern' |
properties |
Array<AssignmentProperty | RestElement> |
Prop | Type |
---|---|
value |
Pattern |
kind |
'init' |
method |
boolean |
Prop | Type |
---|---|
type |
'RestElement' |
argument |
Pattern |
Prop | Type |
---|---|
type |
'ArrayPattern' |
elements |
Array<Pattern | null> |
Prop | Type |
---|---|
type |
'AssignmentPattern' |
left |
Pattern |
right |
Expression |
Prop | Type |
---|---|
type |
'MemberExpression' |
object |
Expression | Super |
property |
Expression | PrivateIdentifier |
computed |
boolean |
optional |
boolean |
Prop | Type |
---|---|
type |
'Super' |
Prop | Type |
---|---|
type |
'PrivateIdentifier' |
name |
string |
Prop | Type |
---|---|
type |
'AwaitExpression' |
argument |
Expression |
Prop | Type |
---|---|
type |
'BinaryExpression' |
operator |
BinaryOperator |
left |
Expression | PrivateIdentifier |
right |
Expression |
Prop | Type |
---|---|
type |
'CallExpression' |
optional |
boolean |
Prop | Type |
---|---|
type |
'NewExpression' |
Prop | Type |
---|---|
type |
'ChainExpression' |
expression |
ChainElement |
Prop | Type |
---|---|
type |
'ClassExpression' |
id |
Identifier | null |
Prop | Type |
---|---|
type |
'ConditionalExpression' |
test |
Expression |
alternate |
Expression |
consequent |
Expression |
Prop | Type |
---|---|
type |
'ImportExpression' |
source |
Expression |
options |
Expression | null |
Prop | Type |
---|---|
type |
'Literal' |
value |
string | number | boolean | null |
raw |
string |
Prop | Type |
---|---|
type |
'Literal' |
value |
RegExp | null |
regex |
{ pattern: string; flags: string; } |
raw |
string |
Prop | Type | Description |
---|---|---|
source |
string |
Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. |
global |
boolean |
Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. |
ignoreCase |
boolean |
Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. |
multiline |
boolean |
Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. |
lastIndex |
number |
Method | Signature | Description |
---|---|---|
exec | (string: string) => RegExpExecArray | null | Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search. |
test | (string: string) => boolean | Returns a Boolean value that indicates whether or not a pattern exists in a searched string. |
compile | () => this |
Prop | Type |
---|---|
index |
number |
input |
string |
Prop | Type |
---|---|
type |
'Literal' |
value |
bigint | null |
bigint |
string |
raw |
string |
Prop | Type |
---|---|
type |
'LogicalExpression' |
operator |
LogicalOperator |
left |
Expression |
right |
Expression |
Prop | Type |
---|---|
type |
'MetaProperty' |
meta |
Identifier |
property |
Identifier |
Prop | Type |
---|---|
type |
'ObjectExpression' |
properties |
Array<Property | SpreadElement> |
Prop | Type |
---|---|
type |
'Property' |
key |
Expression | PrivateIdentifier |
value |
ClassExpression | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | SimpleCallExpression | NewExpression | ChainExpression | ConditionalExpression | FunctionExpression | Identifier | ImportExpression | SimpleLiteral | RegExpLiteral | BigIntLiteral | LogicalExpression | MemberExpression | MetaProperty | ObjectExpression | SequenceExpression | TaggedTemplateExpression | TemplateLiteral | ThisExpression | UnaryExpression | UpdateExpression | YieldExpression | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern |
kind |
'init' | 'get' | 'set' |
method |
boolean |
shorthand |
boolean |
computed |
boolean |
Prop | Type |
---|---|
type |
'SequenceExpression' |
expressions |
Expression[] |
Prop | Type |
---|---|
type |
'TaggedTemplateExpression' |
tag |
Expression |
quasi |
TemplateLiteral |
Prop | Type |
---|---|
type |
'TemplateLiteral' |
quasis |
TemplateElement[] |
expressions |
Expression[] |
Prop | Type |
---|---|
type |
'TemplateElement' |
tail |
boolean |
value |
{ cooked?: string | null; raw: string; } |
Prop | Type |
---|---|
type |
'ThisExpression' |
Prop | Type |
---|---|
type |
'UnaryExpression' |
operator |
UnaryOperator |
prefix |
true |
argument |
Expression |
Prop | Type |
---|---|
type |
'UpdateExpression' |
operator |
UpdateOperator |
argument |
Expression |
prefix |
boolean |
Prop | Type |
---|---|
type |
'YieldExpression' |
argument |
Expression | null |
delegate |
boolean |
Prop | Type |
---|---|
type |
'StaticBlock' |
Prop | Type |
---|---|
type |
'EmptyStatement' |
Prop | Type |
---|---|
type |
'DebuggerStatement' |
Prop | Type |
---|---|
type |
'WithStatement' |
object |
Expression |
body |
Statement |
Prop | Type |
---|---|
type |
'ReturnStatement' |
argument |
Expression | null |
Prop | Type |
---|---|
type |
'LabeledStatement' |
label |
Identifier |
body |
Statement |
Prop | Type |
---|---|
type |
'BreakStatement' |
label |
Identifier | null |
Prop | Type |
---|---|
type |
'ContinueStatement' |
label |
Identifier | null |
Prop | Type |
---|---|
type |
'IfStatement' |
test |
Expression |
consequent |
Statement |
alternate |
Statement | null |
Prop | Type |
---|---|
type |
'SwitchStatement' |
discriminant |
Expression |
cases |
SwitchCase[] |
Prop | Type |
---|---|
type |
'SwitchCase' |
test |
Expression | null |
consequent |
Statement[] |
Prop | Type |
---|---|
type |
'ThrowStatement' |
argument |
Expression |
Prop | Type |
---|---|
type |
'TryStatement' |
block |
BlockStatement |
handler |
CatchClause | null |
finalizer |
BlockStatement | null |
Prop | Type |
---|---|
type |
'CatchClause' |
param |
Pattern | null |
body |
BlockStatement |
Prop | Type |
---|---|
type |
'WhileStatement' |
test |
Expression |
body |
Statement |
Prop | Type |
---|---|
type |
'DoWhileStatement' |
body |
Statement |
test |
Expression |
Prop | Type |
---|---|
type |
'ForStatement' |
init |
Expression | VariableDeclaration | null |
test |
Expression | null |
update |
Expression | null |
body |
Statement |
Prop | Type |
---|---|
type |
'VariableDeclaration' |
declarations |
VariableDeclarator[] |
kind |
'var' | 'let' | 'const' |
Prop | Type |
---|---|
type |
'VariableDeclarator' |
id |
Pattern |
init |
Expression | null |
Prop | Type |
---|---|
type |
'ForInStatement' |
Prop | Type |
---|---|
type |
'ForOfStatement' |
await |
boolean |
Prop | Type | Description |
---|---|---|
id |
Identifier |
It is null when a class declaration is a part of the export default class statement |
Prop | Type |
---|---|
type |
'Line' | 'Block' |
value |
string |
Prop | Type |
---|---|
name |
string |
data |
any |
Method | Signature | Description |
---|---|---|
valueOf | () => boolean | Returns the primitive value of the specified object. |
string | number | symbol
FunctionDeclaration | FunctionExpression | ArrowFunctionExpression
ExpressionStatement | BlockStatement | StaticBlock | EmptyStatement | DebuggerStatement | WithStatement | ReturnStatement | LabeledStatement | BreakStatement | ContinueStatement | IfStatement | SwitchStatement | ThrowStatement | TryStatement | WhileStatement | DoWhileStatement | ForStatement | ForInStatement | ForOfStatement | Declaration
ExpressionMap[keyof ExpressionMap]
"=" | "+=" | "-=" | "*=" | "/=" | "%=" | "**=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=" | "||=" | "&&=" | "??="
Identifier | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | MemberExpression
"==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "**" | "|" | "^" | "&" | "in" | "instanceof"
SimpleCallExpression | NewExpression
SimpleCallExpression | MemberExpression
SimpleLiteral | RegExpLiteral | BigIntLiteral
"||" | "&&" | "??"
"-" | "+" | "!" | "~" | "typeof" | "void" | "delete"
"++" | "--"
FunctionDeclaration | VariableDeclaration | ClassDeclaration
(message: GleapEventMessage | null, err?: any): void
string