Files
supabase/web/spec/realtime.json
T

10162 lines
212 KiB
JSON

{
"id": 0,
"name": "@supabase/realtime-js",
"kind": 0,
"flags": {},
"originalName": "",
"children": [
{
"id": 222,
"name": "\"RealtimeClient\"",
"kind": 1,
"kindString": "Module",
"flags": {
"isExported": true
},
"originalName": "/home/runner/work/realtime-js/realtime-js/src/RealtimeClient.ts",
"children": [
{
"id": 223,
"name": "RealtimeClient",
"kind": 128,
"kindString": "Class",
"flags": {
"isExported": true
},
"children": [
{
"id": 255,
"name": "constructor",
"kind": 512,
"kindString": "Constructor",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Initializes the Socket"
},
"signatures": [
{
"id": 256,
"name": "new RealtimeClient",
"kind": 16384,
"kindString": "Constructor signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Initializes the Socket"
},
"parameters": [
{
"id": 257,
"name": "endPoint",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The string WebSocket endpoint, ie, \"ws://example.com/socket\", \"wss://example.com\", \"/socket\" (inherited host & protocol)"
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 258,
"name": "options",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true,
"isOptional": true
},
"type": {
"type": "reference",
"id": 334,
"name": "Options"
}
}
],
"type": {
"type": "reference",
"id": 223,
"name": "RealtimeClient"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 67,
"character": 3
}
]
},
{
"id": 224,
"name": "accessToken",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 37,
"character": 13
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "string"
},
{
"type": "intrinsic",
"name": "null"
}
]
},
"defaultValue": "null"
},
{
"id": 225,
"name": "channels",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 38,
"character": 10
}
],
"type": {
"type": "array",
"elementType": {
"type": "reference",
"id": 110,
"name": "RealtimeSubscription"
}
},
"defaultValue": "[]"
},
{
"id": 247,
"name": "conn",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 54,
"character": 6
}
],
"type": {
"type": "union",
"types": [
{
"type": "reference",
"name": "WebSocket"
},
{
"type": "intrinsic",
"name": "null"
}
]
},
"defaultValue": "null"
},
{
"id": 245,
"name": "decode",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 52,
"character": 8
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 244,
"name": "encode",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 51,
"character": 8
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 226,
"name": "endPoint",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 39,
"character": 10
}
],
"type": {
"type": "intrinsic",
"name": "string"
},
"defaultValue": "\"\""
},
{
"id": 227,
"name": "headers",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 40,
"character": 9
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "reflection",
"declaration": {
"id": 228,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 229,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 230,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
]
}
}
]
},
"defaultValue": "DEFAULT_HEADERS"
},
{
"id": 237,
"name": "heartbeatIntervalMs",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 44,
"character": 21
}
],
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "30000"
},
{
"id": 239,
"name": "heartbeatTimer",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 46,
"character": 16
}
],
"type": {
"type": "union",
"types": [
{
"type": "reference",
"typeArguments": [
{
"type": "query",
"queryType": {
"type": "reference",
"name": "setInterval"
}
}
],
"name": "ReturnType"
},
{
"type": "intrinsic",
"name": "undefined"
}
]
},
"defaultValue": "undefined"
},
{
"id": 243,
"name": "logger",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 50,
"character": 8
}
],
"type": {
"type": "reference",
"name": "Function"
},
"defaultValue": "noop"
},
{
"id": 238,
"name": "longpollerTimeout",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 45,
"character": 19
}
],
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "20000"
},
{
"id": 231,
"name": "params",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 41,
"character": 8
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "reflection",
"declaration": {
"id": 232,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 233,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 234,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
]
}
}
]
}
},
{
"id": 240,
"name": "pendingHeartbeatRef",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 47,
"character": 21
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "string"
},
{
"type": "intrinsic",
"name": "null"
}
]
},
"defaultValue": "null"
},
{
"id": 246,
"name": "reconnectAfterMs",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 53,
"character": 18
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 242,
"name": "reconnectTimer",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 49,
"character": 16
}
],
"type": {
"type": "reference",
"id": 30,
"name": "Timer"
}
},
{
"id": 241,
"name": "ref",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 48,
"character": 5
}
],
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "0"
},
{
"id": 248,
"name": "sendBuffer",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 55,
"character": 12
}
],
"type": {
"type": "array",
"elementType": {
"type": "reference",
"name": "Function"
}
},
"defaultValue": "[]"
},
{
"id": 249,
"name": "serializer",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 56,
"character": 12
}
],
"type": {
"type": "reference",
"id": 198,
"name": "Serializer"
},
"defaultValue": "new Serializer()"
},
{
"id": 235,
"name": "timeout",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 42,
"character": 9
}
],
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "DEFAULT_TIMEOUT"
},
{
"id": 236,
"name": "transport",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 43,
"character": 11
}
],
"type": {
"type": "intrinsic",
"name": "any"
},
"defaultValue": "WebSocket"
},
{
"id": 323,
"name": "_appendParams",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 324,
"name": "_appendParams",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 325,
"name": "url",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 326,
"name": "params",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reflection",
"declaration": {
"id": 327,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 328,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 329,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 386,
"character": 44
}
]
}
}
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 386,
"character": 23
}
]
},
{
"id": 330,
"name": "_flushSendBuffer",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 331,
"name": "_flushSendBuffer",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 396,
"character": 26
}
]
},
{
"id": 315,
"name": "_onConnClose",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 316,
"name": "_onConnClose",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 317,
"name": "event",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "any"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 366,
"character": 22
}
]
},
{
"id": 318,
"name": "_onConnError",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 319,
"name": "_onConnError",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 320,
"name": "error",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "Error"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 374,
"character": 22
}
]
},
{
"id": 313,
"name": "_onConnOpen",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 314,
"name": "_onConnOpen",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 354,
"character": 21
}
]
},
{
"id": 332,
"name": "_sendHeartbeat",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 333,
"name": "_sendHeartbeat",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 403,
"character": 24
}
]
},
{
"id": 321,
"name": "_triggerChanError",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 322,
"name": "_triggerChanError",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 380,
"character": 27
}
]
},
{
"id": 292,
"name": "channel",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 293,
"name": "channel",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 294,
"name": "topic",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 295,
"name": "chanParams",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reflection",
"declaration": {
"id": 296,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
}
}
},
"defaultValue": "{}"
}
],
"type": {
"type": "reference",
"id": 110,
"name": "RealtimeSubscription"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 251,
"character": 9
}
]
},
{
"id": 259,
"name": "connect",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 260,
"name": "connect",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Connects the socket."
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 119,
"character": 9
}
]
},
{
"id": 285,
"name": "connectionState",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 286,
"name": "connectionState",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Returns the current state of the socket."
},
"type": {
"type": "union",
"types": [
{
"type": "stringLiteral",
"value": "connecting"
},
{
"type": "stringLiteral",
"value": "open"
},
{
"type": "stringLiteral",
"value": "closing"
},
{
"type": "stringLiteral",
"value": "closed"
}
]
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 220,
"character": 17
}
]
},
{
"id": 261,
"name": "disconnect",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 262,
"name": "disconnect",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Disconnects the socket."
},
"parameters": [
{
"id": 263,
"name": "code",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true,
"isOptional": true
},
"comment": {
"text": "A numeric status code to send on disconnect."
},
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "number"
}
]
}
},
{
"id": 264,
"name": "reason",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true,
"isOptional": true
},
"comment": {
"text": "A custom reason for the disconnect.\n"
},
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "string"
}
]
}
}
],
"type": {
"type": "reference",
"typeArguments": [
{
"type": "reflection",
"declaration": {
"id": 265,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"children": [
{
"id": 267,
"name": "data",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 144,
"character": 40
}
],
"type": {
"type": "intrinsic",
"name": "boolean"
}
},
{
"id": 266,
"name": "error",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 144,
"character": 20
}
],
"type": {
"type": "union",
"types": [
{
"type": "reference",
"name": "Error"
},
{
"type": "intrinsic",
"name": "null"
}
]
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
267,
266
]
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 144,
"character": 13
}
]
}
}
],
"name": "Promise"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 141,
"character": 12
}
]
},
{
"id": 303,
"name": "endPointURL",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 304,
"name": "endPointURL",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Returns the URL of the websocket."
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 302,
"character": 13
}
]
},
{
"id": 287,
"name": "isConnected",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 288,
"name": "isConnected",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Retuns `true` is the connection is open."
},
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 236,
"character": 13
}
]
},
{
"id": 310,
"name": "leaveOpenTopic",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 311,
"name": "leaveOpenTopic",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 312,
"name": "topic",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 344,
"character": 16
}
]
},
{
"id": 268,
"name": "log",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 269,
"name": "log",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Logs the message. Override `this.logger` for specialized logging."
},
"parameters": [
{
"id": 270,
"name": "kind",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 271,
"name": "msg",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 272,
"name": "data",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true,
"isOptional": true
},
"type": {
"type": "intrinsic",
"name": "any"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 169,
"character": 5
}
]
},
{
"id": 305,
"name": "makeRef",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 306,
"name": "makeRef",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Return the next message ref, accounting for overflows"
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 312,
"character": 9
}
]
},
{
"id": 276,
"name": "onClose",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 277,
"name": "onClose",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Registers a callbacks for connection state change events.",
"tags": [
{
"tag": "example",
"text": "\n socket.onOpen(() => console.log(\"Socket closed.\"))\n"
}
]
},
"parameters": [
{
"id": 278,
"name": "callback",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"text": "A function to be called when the event occurs.\n"
},
"type": {
"type": "reference",
"name": "Function"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 191,
"character": 9
}
]
},
{
"id": 300,
"name": "onConnMessage",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 301,
"name": "onConnMessage",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 302,
"name": "rawMessage",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "any"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 272,
"character": 15
}
]
},
{
"id": 279,
"name": "onError",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 280,
"name": "onError",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Registers a callback for connection state change events.",
"tags": [
{
"tag": "example",
"text": "\n socket.onOpen((error) => console.log(\"An error occurred\"))\n"
}
]
},
"parameters": [
{
"id": 281,
"name": "callback",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"text": "A function to be called when the event occurs.\n"
},
"type": {
"type": "reference",
"name": "Function"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 202,
"character": 9
}
]
},
{
"id": 282,
"name": "onMessage",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 283,
"name": "onMessage",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Calls a function any time a message is received.",
"tags": [
{
"tag": "example",
"text": "\n socket.onMessage((message) => console.log(message))\n"
}
]
},
"parameters": [
{
"id": 284,
"name": "callback",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"text": "A function to be called when the event occurs.\n"
},
"type": {
"type": "reference",
"name": "Function"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 213,
"character": 11
}
]
},
{
"id": 273,
"name": "onOpen",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 274,
"name": "onOpen",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Registers a callback for connection state change event.",
"tags": [
{
"tag": "example",
"text": "\n socket.onOpen(() => console.log(\"Socket opened.\"))\n"
}
]
},
"parameters": [
{
"id": 275,
"name": "callback",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"text": "A function to be called when the event occurs.\n"
},
"type": {
"type": "reference",
"name": "Function"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 180,
"character": 8
}
]
},
{
"id": 297,
"name": "push",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 298,
"name": "push",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 299,
"name": "data",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 352,
"name": "Message"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 257,
"character": 6
}
]
},
{
"id": 289,
"name": "remove",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 290,
"name": "remove",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Removes a subscription from the socket."
},
"parameters": [
{
"id": 291,
"name": "channel",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"text": "An open subscription.\n"
},
"type": {
"type": "reference",
"id": 110,
"name": "RealtimeSubscription"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 245,
"character": 8
}
]
},
{
"id": 307,
"name": "setAuth",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 308,
"name": "setAuth",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Sets the JWT access token used for channel subscription authorization and Realtime RLS."
},
"parameters": [
{
"id": 309,
"name": "token",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"text": "A JWT string.\n"
},
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "string"
},
{
"type": "intrinsic",
"name": "null"
}
]
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 328,
"character": 9
}
]
},
{
"id": 250,
"name": "stateChangeCallbacks",
"kind": 2097152,
"kindString": "Object literal",
"flags": {
"isExported": true
},
"children": [
{
"id": 252,
"name": "close",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 64,
"character": 9
}
],
"type": {
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "never"
}
},
"defaultValue": "[]"
},
{
"id": 253,
"name": "error",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 65,
"character": 9
}
],
"type": {
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "never"
}
},
"defaultValue": "[]"
},
{
"id": 254,
"name": "message",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 66,
"character": 11
}
],
"type": {
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "never"
}
},
"defaultValue": "[]"
},
{
"id": 251,
"name": "open",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 63,
"character": 8
}
],
"type": {
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "never"
}
},
"defaultValue": "[]"
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
252,
253,
254,
251
]
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 57,
"character": 22
}
],
"type": {
"type": "intrinsic",
"name": "object"
}
}
],
"groups": [
{
"title": "Constructors",
"kind": 512,
"children": [
255
]
},
{
"title": "Properties",
"kind": 1024,
"children": [
224,
225,
247,
245,
244,
226,
227,
237,
239,
243,
238,
231,
240,
246,
242,
241,
248,
249,
235,
236
]
},
{
"title": "Methods",
"kind": 2048,
"children": [
323,
330,
315,
318,
313,
332,
321,
292,
259,
285,
261,
303,
287,
310,
268,
305,
276,
300,
279,
282,
273,
297,
289,
307
]
},
{
"title": "Object literals",
"kind": 2097152,
"children": [
250
]
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 36,
"character": 35
}
]
},
{
"id": 352,
"name": "Message",
"kind": 4194304,
"kindString": "Type alias",
"flags": {},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 27,
"character": 12
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 353,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"children": [
{
"id": 355,
"name": "event",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 29,
"character": 7
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 356,
"name": "payload",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 30,
"character": 9
}
],
"type": {
"type": "intrinsic",
"name": "any"
}
},
{
"id": 357,
"name": "ref",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 31,
"character": 5
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 354,
"name": "topic",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 28,
"character": 7
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
355,
356,
357,
354
]
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 27,
"character": 14
}
]
}
}
},
{
"id": 334,
"name": "Options",
"kind": 4194304,
"kindString": "Type alias",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 15,
"character": 19
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 335,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"children": [
{
"id": 342,
"name": "decode",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 22,
"character": 8
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 341,
"name": "encode",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 21,
"character": 8
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 344,
"name": "headers",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 24,
"character": 9
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "reflection",
"declaration": {
"id": 345,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 346,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 347,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
]
}
}
]
}
},
{
"id": 338,
"name": "heartbeatIntervalMs",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 18,
"character": 21
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "number"
}
]
}
},
{
"id": 340,
"name": "logger",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 20,
"character": 8
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 339,
"name": "longpollerTimeout",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 19,
"character": 19
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "number"
}
]
}
},
{
"id": 348,
"name": "params",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 25,
"character": 8
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "reflection",
"declaration": {
"id": 349,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 350,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 351,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
]
}
}
]
}
},
{
"id": 343,
"name": "reconnectAfterMs",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 23,
"character": 18
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 337,
"name": "timeout",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 17,
"character": 9
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "number"
}
]
}
},
{
"id": 336,
"name": "transport",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 16,
"character": 11
}
],
"type": {
"type": "reference",
"name": "WebSocket"
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
342,
341,
344,
338,
340,
339,
348,
343,
337,
336
]
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 15,
"character": 21
}
]
}
}
},
{
"id": 358,
"name": "noop",
"kind": 64,
"kindString": "Function",
"flags": {
"isConst": true
},
"signatures": [
{
"id": 359,
"name": "noop",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 34,
"character": 10
}
]
}
],
"groups": [
{
"title": "Classes",
"kind": 128,
"children": [
223
]
},
{
"title": "Type aliases",
"kind": 4194304,
"children": [
352,
334
]
},
{
"title": "Functions",
"kind": 64,
"children": [
358
]
}
],
"sources": [
{
"fileName": "RealtimeClient.ts",
"line": 1,
"character": 0
}
]
},
{
"id": 360,
"name": "\"RealtimePresence\"",
"kind": 1,
"kindString": "Module",
"flags": {
"isExported": true
},
"originalName": "/home/runner/work/realtime-js/realtime-js/src/RealtimePresence.ts",
"children": [
{
"id": 361,
"name": "RealtimePresence",
"kind": 128,
"kindString": "Class",
"flags": {
"isExported": true
},
"children": [
{
"id": 372,
"name": "constructor",
"kind": 512,
"kindString": "Constructor",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Initializes the Presence"
},
"signatures": [
{
"id": 374,
"name": "new RealtimePresence",
"kind": 16384,
"kindString": "Constructor signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Initializes the Presence"
},
"parameters": [
{
"id": 375,
"name": "channel",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The RealtimeSubscription"
},
"type": {
"type": "reference",
"id": 110,
"name": "RealtimeSubscription"
}
},
{
"id": 376,
"name": "opts",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true,
"isOptional": true
},
"comment": {
"shortText": "The options,\n for example `{events: {state: 'state', diff: 'diff'}}`\n"
},
"type": {
"type": "reference",
"name": "PresenceOpts"
}
}
],
"type": {
"type": "reference",
"id": 361,
"name": "RealtimePresence"
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 56,
"character": 3
}
]
},
{
"id": 373,
"name": "channel",
"kind": 1024,
"kindString": "Property",
"flags": {
"isPublic": true,
"isExported": true,
"isConstructorProperty": true
},
"comment": {
"shortText": "The RealtimeSubscription"
},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 64,
"character": 28
}
],
"type": {
"type": "reference",
"id": 110,
"name": "RealtimeSubscription"
}
},
{
"id": 364,
"name": "joinRef",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 47,
"character": 9
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "string"
},
{
"type": "intrinsic",
"name": "null"
}
]
},
"defaultValue": "null"
},
{
"id": 363,
"name": "pendingDiffs",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 46,
"character": 14
}
],
"type": {
"type": "array",
"elementType": {
"type": "reference",
"id": 441,
"name": "RawPresenceDiff"
}
},
"defaultValue": "[]"
},
{
"id": 362,
"name": "state",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 45,
"character": 7
}
],
"type": {
"type": "reference",
"id": 424,
"name": "PresenceState"
}
},
{
"id": 417,
"name": "inPendingSyncState",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 418,
"name": "inPendingSyncState",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 316,
"character": 28
}
]
},
{
"id": 413,
"name": "list",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 414,
"name": "list",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"typeParameter": [
{
"id": 415,
"name": "T",
"kind": 131072,
"kindString": "Type parameter",
"flags": {
"isExported": true
}
}
],
"parameters": [
{
"id": 416,
"name": "by",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true,
"isOptional": true
},
"type": {
"type": "reference",
"id": 445,
"typeArguments": [
{
"type": "typeParameter",
"name": "T",
"default": {
"type": "intrinsic",
"name": "any"
}
}
],
"name": "PresenceChooser"
}
}
],
"type": {
"type": "array",
"elementType": {
"type": "typeParameter",
"name": "T",
"default": {
"type": "intrinsic",
"name": "any"
}
}
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 312,
"character": 6
}
]
},
{
"id": 402,
"name": "onJoin",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 403,
"name": "onJoin",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 404,
"name": "callback",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "PresenceOnJoinCallback"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 300,
"character": 8
}
]
},
{
"id": 405,
"name": "onLeave",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 406,
"name": "onLeave",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 407,
"name": "callback",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "PresenceOnLeaveCallback"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 304,
"character": 9
}
]
},
{
"id": 408,
"name": "onSync",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 409,
"name": "onSync",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 410,
"name": "callback",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reflection",
"declaration": {
"id": 411,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 412,
"name": "__call",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 308,
"character": 18
}
]
}
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 308,
"character": 8
}
]
},
{
"id": 389,
"name": "list",
"kind": 2048,
"kindString": "Method",
"flags": {
"isStatic": true,
"isExported": true
},
"signatures": [
{
"id": 390,
"name": "list",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Returns the array of presences, with selected metadata."
},
"typeParameter": [
{
"id": 391,
"name": "T",
"kind": 131072,
"kindString": "Type parameter",
"flags": {
"isExported": true
}
}
],
"parameters": [
{
"id": 392,
"name": "presences",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 424,
"name": "PresenceState"
}
},
{
"id": 393,
"name": "chooser",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "union",
"types": [
{
"type": "reference",
"id": 445,
"typeArguments": [
{
"type": "typeParameter",
"name": "T",
"default": {
"type": "intrinsic",
"name": "any"
}
}
],
"name": "PresenceChooser"
},
{
"type": "intrinsic",
"name": "undefined"
}
]
}
}
],
"type": {
"type": "array",
"elementType": {
"type": "typeParameter",
"name": "T",
"default": {
"type": "intrinsic",
"name": "any"
}
}
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 234,
"character": 13
}
]
},
{
"id": 394,
"name": "map",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isStatic": true,
"isExported": true
},
"signatures": [
{
"id": 395,
"name": "map",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"typeParameter": [
{
"id": 396,
"name": "T",
"kind": 131072,
"kindString": "Type parameter",
"flags": {
"isExported": true
}
}
],
"parameters": [
{
"id": 397,
"name": "obj",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 424,
"name": "PresenceState"
}
},
{
"id": 398,
"name": "func",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 445,
"typeArguments": [
{
"type": "typeParameter",
"name": "T",
"default": {
"type": "intrinsic",
"name": "any"
}
}
],
"name": "PresenceChooser"
}
}
],
"type": {
"type": "array",
"elementType": {
"type": "typeParameter",
"name": "T",
"default": {
"type": "intrinsic",
"name": "any"
}
}
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 247,
"character": 20
}
]
},
{
"id": 383,
"name": "syncDiff",
"kind": 2048,
"kindString": "Method",
"flags": {
"isStatic": true,
"isExported": true
},
"signatures": [
{
"id": 384,
"name": "syncDiff",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Used to sync a diff of presence join and leave\nevents from the server, as they happen. Like `syncState`, `syncDiff`\naccepts optional `onJoin` and `onLeave` callbacks to react to a user\njoining or leaving from a device."
},
"parameters": [
{
"id": 385,
"name": "state",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 424,
"name": "PresenceState"
}
},
{
"id": 386,
"name": "diff",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "union",
"types": [
{
"type": "reference",
"id": 441,
"name": "RawPresenceDiff"
},
{
"type": "reference",
"id": 428,
"name": "PresenceDiff"
}
]
}
},
{
"id": 387,
"name": "onJoin",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "PresenceOnJoinCallback"
}
},
{
"id": 388,
"name": "onLeave",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "PresenceOnLeaveCallback"
}
}
],
"type": {
"type": "reference",
"id": 424,
"name": "PresenceState"
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 174,
"character": 17
}
]
},
{
"id": 377,
"name": "syncState",
"kind": 2048,
"kindString": "Method",
"flags": {
"isStatic": true,
"isExported": true
},
"signatures": [
{
"id": 378,
"name": "syncState",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Used to sync the list of presences on the server\nwith the client's state. An optional `onJoin` and `onLeave` callback can\nbe provided to react to changes in the client's local presences across\ndisconnects and reconnects with the server."
},
"parameters": [
{
"id": 379,
"name": "currentState",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 424,
"name": "PresenceState"
}
},
{
"id": 380,
"name": "newState",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "union",
"types": [
{
"type": "reference",
"id": 432,
"name": "RawPresenceState"
},
{
"type": "reference",
"id": 424,
"name": "PresenceState"
}
]
}
},
{
"id": 381,
"name": "onJoin",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "PresenceOnJoinCallback"
}
},
{
"id": 382,
"name": "onLeave",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "PresenceOnLeaveCallback"
}
}
],
"type": {
"type": "reference",
"id": 424,
"name": "PresenceState"
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 120,
"character": 18
}
]
},
{
"id": 399,
"name": "transformState",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isStatic": true,
"isExported": true
},
"signatures": [
{
"id": 400,
"name": "transformState",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Remove 'metas' key\nChange 'phx_ref' to 'presence_id'\nRemove 'phx_ref' and 'phx_ref_prev'",
"tags": [
{
"tag": "example",
"text": "\n// returns {\n abc123: [\n { presence_id: '2', user_id: 1 },\n { presence_id: '3', user_id: 2 }\n ]\n}\nRealtimePresence.transformState({\n abc123: {\n metas: [\n { phx_ref: '2', phx_ref_prev: '1' user_id: 1 },\n { phx_ref: '3', user_id: 2 }\n ]\n }\n})\n"
}
]
},
"parameters": [
{
"id": 401,
"name": "state",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "union",
"types": [
{
"type": "reference",
"id": 432,
"name": "RawPresenceState"
},
{
"type": "reference",
"id": 424,
"name": "PresenceState"
}
]
}
}
],
"type": {
"type": "reference",
"id": 424,
"name": "PresenceState"
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 275,
"character": 31
}
]
},
{
"id": 365,
"name": "caller",
"kind": 2097152,
"kindString": "Object literal",
"flags": {
"isExported": true
},
"children": [
{
"id": 366,
"name": "onJoin",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 367,
"name": "onJoin",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 53,
"character": 10
}
]
},
{
"id": 368,
"name": "onLeave",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 369,
"name": "onLeave",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 54,
"character": 11
}
]
},
{
"id": 370,
"name": "onSync",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 371,
"name": "onSync",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 55,
"character": 10
}
]
}
],
"groups": [
{
"title": "Functions",
"kind": 64,
"children": [
366,
368,
370
]
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 48,
"character": 8
}
],
"type": {
"type": "intrinsic",
"name": "object"
}
}
],
"groups": [
{
"title": "Constructors",
"kind": 512,
"children": [
372
]
},
{
"title": "Properties",
"kind": 1024,
"children": [
373,
364,
363,
362
]
},
{
"title": "Methods",
"kind": 2048,
"children": [
417,
413,
402,
405,
408,
389,
394,
383,
377,
399
]
},
{
"title": "Object literals",
"kind": 2097152,
"children": [
365
]
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 44,
"character": 37
}
]
},
{
"id": 419,
"name": "Presence",
"kind": 4194304,
"kindString": "Type alias",
"flags": {},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 14,
"character": 13
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 420,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"indexSignature": [
{
"id": 422,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {},
"parameters": [
{
"id": 423,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "any"
}
}
],
"children": [
{
"id": 421,
"name": "presence_id",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 15,
"character": 13
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
421
]
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 14,
"character": 15
}
]
}
}
},
{
"id": 445,
"name": "PresenceChooser",
"kind": 4194304,
"kindString": "Type alias",
"flags": {},
"typeParameter": [
{
"id": 446,
"name": "T",
"kind": 131072,
"kindString": "Type parameter",
"flags": {}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 42,
"character": 20
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 447,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"signatures": [
{
"id": 448,
"name": "__call",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"parameters": [
{
"id": 449,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 450,
"name": "presences",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "intrinsic",
"name": "any"
}
}
],
"type": {
"type": "typeParameter",
"name": "T"
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 42,
"character": 25
}
]
}
}
},
{
"id": 428,
"name": "PresenceDiff",
"kind": 4194304,
"kindString": "Type alias",
"flags": {},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 21,
"character": 17
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 429,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"children": [
{
"id": 430,
"name": "joins",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 22,
"character": 7
}
],
"type": {
"type": "reference",
"id": 424,
"name": "PresenceState"
}
},
{
"id": 431,
"name": "leaves",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 23,
"character": 8
}
],
"type": {
"type": "reference",
"id": 424,
"name": "PresenceState"
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
430,
431
]
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 21,
"character": 19
}
]
}
}
},
{
"id": 424,
"name": "PresenceState",
"kind": 4194304,
"kindString": "Type alias",
"flags": {},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 19,
"character": 18
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 425,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"indexSignature": [
{
"id": 426,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {},
"parameters": [
{
"id": 427,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "array",
"elementType": {
"type": "reference",
"id": 419,
"name": "Presence"
}
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 19,
"character": 20
}
]
}
}
},
{
"id": 441,
"name": "RawPresenceDiff",
"kind": 4194304,
"kindString": "Type alias",
"flags": {},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 37,
"character": 20
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 442,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"children": [
{
"id": 443,
"name": "joins",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 38,
"character": 7
}
],
"type": {
"type": "reference",
"id": 432,
"name": "RawPresenceState"
}
},
{
"id": 444,
"name": "leaves",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 39,
"character": 8
}
],
"type": {
"type": "reference",
"id": 432,
"name": "RawPresenceState"
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
443,
444
]
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 37,
"character": 22
}
]
}
}
},
{
"id": 432,
"name": "RawPresenceState",
"kind": 4194304,
"kindString": "Type alias",
"flags": {},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 26,
"character": 21
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 433,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"indexSignature": [
{
"id": 434,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {},
"parameters": [
{
"id": 435,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "reference",
"id": 485,
"typeArguments": [
{
"type": "stringLiteral",
"value": "metas"
},
{
"type": "array",
"elementType": {
"type": "reflection",
"declaration": {
"id": 436,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"indexSignature": [
{
"id": 439,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {},
"parameters": [
{
"id": 440,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "any"
}
}
],
"children": [
{
"id": 437,
"name": "phx_ref",
"kind": 32,
"kindString": "Variable",
"flags": {
"isOptional": true
},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 30,
"character": 13
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "string"
}
]
}
},
{
"id": 438,
"name": "phx_ref_prev",
"kind": 32,
"kindString": "Variable",
"flags": {
"isOptional": true
},
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 31,
"character": 18
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "string"
}
]
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
437,
438
]
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 28,
"character": 12
}
]
}
}
}
],
"name": "Record"
}
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 26,
"character": 23
}
]
}
}
}
],
"groups": [
{
"title": "Classes",
"kind": 128,
"children": [
361
]
},
{
"title": "Type aliases",
"kind": 4194304,
"children": [
419,
445,
428,
424,
441,
432
]
}
],
"sources": [
{
"fileName": "RealtimePresence.ts",
"line": 1,
"character": 0
}
]
},
{
"id": 109,
"name": "\"RealtimeSubscription\"",
"kind": 1,
"kindString": "Module",
"flags": {
"isExported": true
},
"originalName": "/home/runner/work/realtime-js/realtime-js/src/RealtimeSubscription.ts",
"children": [
{
"id": 110,
"name": "RealtimeSubscription",
"kind": 128,
"kindString": "Class",
"flags": {
"isExported": true
},
"children": [
{
"id": 118,
"name": "constructor",
"kind": 512,
"kindString": "Constructor",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 125,
"name": "new RealtimeSubscription",
"kind": 16384,
"kindString": "Constructor signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 126,
"name": "topic",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 127,
"name": "params",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reflection",
"declaration": {
"id": 128,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 129,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 130,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "unknown"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 17,
"character": 18
}
]
}
},
"defaultValue": "{}"
},
{
"id": 131,
"name": "socket",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 223,
"name": "RealtimeClient"
}
}
],
"type": {
"type": "reference",
"id": 110,
"name": "RealtimeSubscription"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 13,
"character": 25
}
]
},
{
"id": 111,
"name": "bindings",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 7,
"character": 10
}
],
"type": {
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "any"
}
},
"defaultValue": "[]"
},
{
"id": 115,
"name": "joinPush",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 11,
"character": 10
}
],
"type": {
"type": "reference",
"id": 44,
"name": "Push"
}
},
{
"id": 114,
"name": "joinedOnce",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 10,
"character": 12
}
],
"type": {
"type": "intrinsic",
"name": "boolean"
},
"defaultValue": "false"
},
{
"id": 120,
"name": "params",
"kind": 1024,
"kindString": "Property",
"flags": {
"isPublic": true,
"isExported": true,
"isConstructorProperty": true
},
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 17,
"character": 17
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 121,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 122,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 123,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "unknown"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 17,
"character": 18
}
]
}
}
},
{
"id": 117,
"name": "pushBuffer",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 13,
"character": 12
}
],
"type": {
"type": "array",
"elementType": {
"type": "reference",
"id": 44,
"name": "Push"
}
},
"defaultValue": "[]"
},
{
"id": 116,
"name": "rejoinTimer",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 12,
"character": 13
}
],
"type": {
"type": "reference",
"id": 30,
"name": "Timer"
}
},
{
"id": 124,
"name": "socket",
"kind": 1024,
"kindString": "Property",
"flags": {
"isPublic": true,
"isExported": true,
"isConstructorProperty": true
},
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 18,
"character": 17
}
],
"type": {
"type": "reference",
"id": 223,
"name": "RealtimeClient"
}
},
{
"id": 113,
"name": "state",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 9,
"character": 7
}
],
"type": {
"type": "reference",
"id": 9,
"name": "CHANNEL_STATES"
},
"defaultValue": "CHANNEL_STATES.closed"
},
{
"id": 112,
"name": "timeout",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 8,
"character": 9
}
],
"type": {
"type": "intrinsic",
"name": "number"
}
},
{
"id": 119,
"name": "topic",
"kind": 1024,
"kindString": "Property",
"flags": {
"isPublic": true,
"isExported": true,
"isConstructorProperty": true
},
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 16,
"character": 16
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 150,
"name": "canPush",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 151,
"name": "canPush",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 97,
"character": 9
}
]
},
{
"id": 187,
"name": "isClosed",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 188,
"name": "isClosed",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 202,
"character": 10
}
]
},
{
"id": 189,
"name": "isErrored",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 190,
"name": "isErrored",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 205,
"character": 11
}
]
},
{
"id": 191,
"name": "isJoined",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 192,
"name": "isJoined",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 208,
"character": 10
}
]
},
{
"id": 193,
"name": "isJoining",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 194,
"name": "isJoining",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 211,
"character": 11
}
]
},
{
"id": 195,
"name": "isLeaving",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 196,
"name": "isLeaving",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 214,
"character": 11
}
]
},
{
"id": 171,
"name": "isMember",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 172,
"name": "isMember",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 173,
"name": "topic",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 158,
"character": 10
}
]
},
{
"id": 174,
"name": "joinRef",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 175,
"name": "joinRef",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 162,
"character": 9
}
]
},
{
"id": 147,
"name": "off",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 148,
"name": "off",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 149,
"name": "event",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 93,
"character": 5
}
]
},
{
"id": 143,
"name": "on",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 144,
"name": "on",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 145,
"name": "event",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 146,
"name": "callback",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "Function"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 89,
"character": 4
}
]
},
{
"id": 137,
"name": "onClose",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 138,
"name": "onClose",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 139,
"name": "callback",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "Function"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 81,
"character": 9
}
]
},
{
"id": 140,
"name": "onError",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 141,
"name": "onError",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 142,
"name": "callback",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "Function"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 85,
"character": 9
}
]
},
{
"id": 166,
"name": "onMessage",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 167,
"name": "onMessage",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Overridable message hook",
"text": "Receives all events for specialized message handling before dispatching to the channel callbacks.\nMust return the payload, modified or unmodified.\n"
},
"parameters": [
{
"id": 168,
"name": "event",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 169,
"name": "payload",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "any"
}
},
{
"id": 170,
"name": "ref",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true,
"isOptional": true
},
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "string"
}
]
}
}
],
"type": {
"type": "intrinsic",
"name": "any"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 154,
"character": 11
}
]
},
{
"id": 152,
"name": "push",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 153,
"name": "push",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 154,
"name": "event",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 15,
"name": "CHANNEL_EVENTS"
}
},
{
"id": 155,
"name": "payload",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "any"
}
},
{
"id": 156,
"name": "timeout",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "this.timeout"
}
],
"type": {
"type": "reference",
"id": 44,
"name": "Push"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 101,
"character": 6
}
]
},
{
"id": 176,
"name": "rejoin",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 177,
"name": "rejoin",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 178,
"name": "timeout",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "this.timeout"
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 166,
"character": 8
}
]
},
{
"id": 132,
"name": "rejoinUntilConnected",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 133,
"name": "rejoinUntilConnected",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 64,
"character": 22
}
]
},
{
"id": 184,
"name": "replyEventName",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 185,
"name": "replyEventName",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 186,
"name": "ref",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 198,
"character": 16
}
]
},
{
"id": 134,
"name": "subscribe",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 135,
"name": "subscribe",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 136,
"name": "timeout",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "this.timeout"
}
],
"type": {
"type": "reference",
"id": 44,
"name": "Push"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 71,
"character": 11
}
]
},
{
"id": 179,
"name": "trigger",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 180,
"name": "trigger",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 181,
"name": "event",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 182,
"name": "payload",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true,
"isOptional": true
},
"type": {
"type": "intrinsic",
"name": "any"
}
},
{
"id": 183,
"name": "ref",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true,
"isOptional": true
},
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "string"
}
]
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 175,
"character": 9
}
]
},
{
"id": 163,
"name": "unsubscribe",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 164,
"name": "unsubscribe",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Leaves the channel",
"text": "Unsubscribes from server events, and instructs channel to terminate on server.\nTriggers onClose() hooks.\n\nTo receive leave acknowledgements, use the a `receive` hook to bind to the server ack, ie:\nchannel.unsubscribe().receive(\"ok\", () => alert(\"left!\") )\n"
},
"parameters": [
{
"id": 165,
"name": "timeout",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "this.timeout"
}
],
"type": {
"type": "reference",
"id": 44,
"name": "Push"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 129,
"character": 13
}
]
},
{
"id": 157,
"name": "updateJoinPayload",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 158,
"name": "updateJoinPayload",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 159,
"name": "payload",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reflection",
"declaration": {
"id": 160,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 161,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 162,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "unknown"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 116,
"character": 28
}
]
}
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 116,
"character": 19
}
]
}
],
"groups": [
{
"title": "Constructors",
"kind": 512,
"children": [
118
]
},
{
"title": "Properties",
"kind": 1024,
"children": [
111,
115,
114,
120,
117,
116,
124,
113,
112,
119
]
},
{
"title": "Methods",
"kind": 2048,
"children": [
150,
187,
189,
191,
193,
195,
171,
174,
147,
143,
137,
140,
166,
152,
176,
132,
184,
134,
179,
163,
157
]
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 6,
"character": 41
}
]
}
],
"groups": [
{
"title": "Classes",
"kind": 128,
"children": [
110
]
}
],
"sources": [
{
"fileName": "RealtimeSubscription.ts",
"line": 1,
"character": 0
}
]
},
{
"id": 525,
"name": "\"index\"",
"kind": 1,
"kindString": "Module",
"flags": {
"isExported": true
},
"originalName": "/home/runner/work/realtime-js/realtime-js/src/index.ts",
"sources": [
{
"fileName": "index.ts",
"line": 1,
"character": 0
}
]
},
{
"id": 3,
"name": "\"lib/constants\"",
"kind": 1,
"kindString": "Module",
"flags": {
"isExported": true
},
"originalName": "/home/runner/work/realtime-js/realtime-js/src/lib/constants.ts",
"children": [
{
"id": 15,
"name": "CHANNEL_EVENTS",
"kind": 4,
"kindString": "Enumeration",
"flags": {
"isExported": true
},
"children": [
{
"id": 21,
"name": "access_token",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 32,
"character": 14
}
],
"defaultValue": "\"access_token\""
},
{
"id": 16,
"name": "close",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 27,
"character": 7
}
],
"defaultValue": "\"phx_close\""
},
{
"id": 17,
"name": "error",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 28,
"character": 7
}
],
"defaultValue": "\"phx_error\""
},
{
"id": 18,
"name": "join",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 29,
"character": 6
}
],
"defaultValue": "\"phx_join\""
},
{
"id": 20,
"name": "leave",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 31,
"character": 7
}
],
"defaultValue": "\"phx_leave\""
},
{
"id": 19,
"name": "reply",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 30,
"character": 7
}
],
"defaultValue": "\"phx_reply\""
}
],
"groups": [
{
"title": "Enumeration members",
"kind": 16,
"children": [
21,
16,
17,
18,
20,
19
]
}
],
"sources": [
{
"fileName": "lib/constants.ts",
"line": 26,
"character": 26
}
]
},
{
"id": 9,
"name": "CHANNEL_STATES",
"kind": 4,
"kindString": "Enumeration",
"flags": {
"isExported": true
},
"children": [
{
"id": 10,
"name": "closed",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 19,
"character": 8
}
],
"defaultValue": "\"closed\""
},
{
"id": 11,
"name": "errored",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 20,
"character": 9
}
],
"defaultValue": "\"errored\""
},
{
"id": 12,
"name": "joined",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 21,
"character": 8
}
],
"defaultValue": "\"joined\""
},
{
"id": 13,
"name": "joining",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 22,
"character": 9
}
],
"defaultValue": "\"joining\""
},
{
"id": 14,
"name": "leaving",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 23,
"character": 9
}
],
"defaultValue": "\"leaving\""
}
],
"groups": [
{
"title": "Enumeration members",
"kind": 16,
"children": [
10,
11,
12,
13,
14
]
}
],
"sources": [
{
"fileName": "lib/constants.ts",
"line": 18,
"character": 26
}
]
},
{
"id": 4,
"name": "SOCKET_STATES",
"kind": 4,
"kindString": "Enumeration",
"flags": {
"isExported": true
},
"children": [
{
"id": 8,
"name": "closed",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 15,
"character": 8
}
],
"defaultValue": "3"
},
{
"id": 7,
"name": "closing",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 14,
"character": 9
}
],
"defaultValue": "2"
},
{
"id": 5,
"name": "connecting",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 12,
"character": 12
}
],
"defaultValue": "0"
},
{
"id": 6,
"name": "open",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 13,
"character": 6
}
],
"defaultValue": "1"
}
],
"groups": [
{
"title": "Enumeration members",
"kind": 16,
"children": [
8,
7,
5,
6
]
}
],
"sources": [
{
"fileName": "lib/constants.ts",
"line": 11,
"character": 25
}
]
},
{
"id": 22,
"name": "TRANSPORTS",
"kind": 4,
"kindString": "Enumeration",
"flags": {
"isExported": true
},
"children": [
{
"id": 23,
"name": "websocket",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 36,
"character": 11
}
],
"defaultValue": "\"websocket\""
}
],
"groups": [
{
"title": "Enumeration members",
"kind": 16,
"children": [
23
]
}
],
"sources": [
{
"fileName": "lib/constants.ts",
"line": 35,
"character": 22
}
]
},
{
"id": 27,
"name": "DEFAULT_TIMEOUT",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isConst": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 7,
"character": 28
}
],
"type": {
"type": "unknown",
"name": "10000"
},
"defaultValue": "10000"
},
{
"id": 26,
"name": "VSN",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isConst": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 5,
"character": 16
}
],
"type": {
"type": "intrinsic",
"name": "string"
},
"defaultValue": "\"1.0.0\""
},
{
"id": 28,
"name": "WS_CLOSE_NORMAL",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isConst": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 9,
"character": 28
}
],
"type": {
"type": "unknown",
"name": "1000"
},
"defaultValue": "1000"
},
{
"id": 24,
"name": "DEFAULT_HEADERS",
"kind": 2097152,
"kindString": "Object literal",
"flags": {
"isExported": true,
"isConst": true
},
"children": [
{
"id": 25,
"name": "X-Client-Info",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/constants.ts",
"line": 3,
"character": 48
}
],
"type": {
"type": "intrinsic",
"name": "string"
},
"defaultValue": "`realtime-js/${version}`"
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
25
]
}
],
"sources": [
{
"fileName": "lib/constants.ts",
"line": 3,
"character": 28
}
],
"type": {
"type": "intrinsic",
"name": "object"
}
}
],
"groups": [
{
"title": "Enumerations",
"kind": 4,
"children": [
15,
9,
4,
22
]
},
{
"title": "Variables",
"kind": 32,
"children": [
27,
26,
28
]
},
{
"title": "Object literals",
"kind": 2097152,
"children": [
24
]
}
],
"sources": [
{
"fileName": "lib/constants.ts",
"line": 1,
"character": 0
}
]
},
{
"id": 43,
"name": "\"lib/push\"",
"kind": 1,
"kindString": "Module",
"flags": {
"isExported": true
},
"originalName": "/home/runner/work/realtime-js/realtime-js/src/lib/push.ts",
"children": [
{
"id": 44,
"name": "Push",
"kind": 128,
"kindString": "Class",
"flags": {
"isExported": true
},
"children": [
{
"id": 57,
"name": "constructor",
"kind": 512,
"kindString": "Constructor",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Initializes the Push"
},
"signatures": [
{
"id": 65,
"name": "new Push",
"kind": 16384,
"kindString": "Constructor signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Initializes the Push"
},
"parameters": [
{
"id": 66,
"name": "channel",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The Channel"
},
"type": {
"type": "reference",
"id": 110,
"name": "RealtimeSubscription"
}
},
{
"id": 67,
"name": "event",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The event, for example `\"phx_join\"`"
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 68,
"name": "payload",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The payload, for example `{user_id: 123}`"
},
"type": {
"type": "reflection",
"declaration": {
"id": 69,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 70,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 71,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "unknown"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 29,
"character": 19
}
]
}
},
"defaultValue": "{}"
},
{
"id": 72,
"name": "timeout",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The push timeout in milliseconds\n"
},
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "DEFAULT_TIMEOUT"
}
],
"type": {
"type": "reference",
"id": 44,
"name": "Push"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 16,
"character": 32
}
]
},
{
"id": 58,
"name": "channel",
"kind": 1024,
"kindString": "Property",
"flags": {
"isPublic": true,
"isExported": true,
"isConstructorProperty": true
},
"comment": {
"shortText": "The Channel"
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 27,
"character": 18
}
],
"type": {
"type": "reference",
"id": 110,
"name": "RealtimeSubscription"
}
},
{
"id": 59,
"name": "event",
"kind": 1024,
"kindString": "Property",
"flags": {
"isPublic": true,
"isExported": true,
"isConstructorProperty": true
},
"comment": {
"shortText": "The event, for example `\"phx_join\"`"
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 28,
"character": 16
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 60,
"name": "payload",
"kind": 1024,
"kindString": "Property",
"flags": {
"isPublic": true,
"isExported": true,
"isConstructorProperty": true
},
"comment": {
"shortText": "The payload, for example `{user_id: 123}`"
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 29,
"character": 18
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 61,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 62,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 63,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "unknown"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 29,
"character": 19
}
]
}
}
},
{
"id": 52,
"name": "recHooks",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 12,
"character": 10
}
],
"type": {
"type": "array",
"elementType": {
"type": "reflection",
"declaration": {
"id": 53,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"children": [
{
"id": 55,
"name": "callback",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 14,
"character": 12
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 54,
"name": "status",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 13,
"character": 10
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
55,
54
]
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 12,
"character": 11
}
]
}
}
},
"defaultValue": "[]"
},
{
"id": 48,
"name": "receivedResp",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 8,
"character": 14
}
],
"type": {
"type": "union",
"types": [
{
"type": "reflection",
"declaration": {
"id": 49,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"children": [
{
"id": 51,
"name": "response",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 10,
"character": 12
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 50,
"name": "status",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 9,
"character": 10
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
51,
50
]
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 8,
"character": 15
}
]
}
},
{
"type": "intrinsic",
"name": "null"
}
]
},
"defaultValue": "null"
},
{
"id": 47,
"name": "ref",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 7,
"character": 5
}
],
"type": {
"type": "intrinsic",
"name": "string"
},
"defaultValue": "\"\""
},
{
"id": 56,
"name": "refEvent",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 16,
"character": 10
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "string"
},
{
"type": "intrinsic",
"name": "null"
}
]
},
"defaultValue": "null"
},
{
"id": 45,
"name": "sent",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 5,
"character": 6
}
],
"type": {
"type": "intrinsic",
"name": "boolean"
},
"defaultValue": "false"
},
{
"id": 64,
"name": "timeout",
"kind": 1024,
"kindString": "Property",
"flags": {
"isPublic": true,
"isExported": true,
"isConstructorProperty": true
},
"comment": {
"shortText": "The push timeout in milliseconds\n"
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 30,
"character": 18
}
],
"type": {
"type": "intrinsic",
"name": "number"
}
},
{
"id": 46,
"name": "timeoutTimer",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 6,
"character": 14
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "number"
},
{
"type": "intrinsic",
"name": "undefined"
}
]
},
"defaultValue": "undefined"
},
{
"id": 96,
"name": "_cancelRefEvent",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 97,
"name": "_cancelRefEvent",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 98,
"character": 25
}
]
},
{
"id": 98,
"name": "_cancelTimeout",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 99,
"name": "_cancelTimeout",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 105,
"character": 24
}
]
},
{
"id": 106,
"name": "_hasReceived",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 107,
"name": "_hasReceived",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 108,
"name": "status",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "null"
},
{
"type": "intrinsic",
"name": "false"
},
{
"type": "intrinsic",
"name": "true"
}
]
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 122,
"character": 22
}
]
},
{
"id": 100,
"name": "_matchReceive",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 101,
"name": "_matchReceive",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 102,
"name": "__namedParameters",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"originalName": "__0",
"type": {
"type": "reflection",
"declaration": {
"id": 103,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"children": [
{
"id": 105,
"name": "response",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 112,
"character": 12
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 104,
"name": "status",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/push.ts",
"line": 111,
"character": 10
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
105,
104
]
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 110,
"character": 24
}
]
}
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 110,
"character": 23
}
]
},
{
"id": 94,
"name": "destroy",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 95,
"name": "destroy",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 93,
"character": 9
}
]
},
{
"id": 84,
"name": "receive",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 85,
"name": "receive",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 86,
"name": "status",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 87,
"name": "callback",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "Function"
}
}
],
"type": {
"type": "unknown",
"name": "this"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 61,
"character": 9
}
]
},
{
"id": 73,
"name": "resend",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 74,
"name": "resend",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 75,
"name": "timeout",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "number"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 33,
"character": 8
}
]
},
{
"id": 76,
"name": "send",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 77,
"name": "send",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 43,
"character": 6
}
]
},
{
"id": 88,
"name": "startTimeout",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 89,
"name": "startTimeout",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 70,
"character": 14
}
]
},
{
"id": 90,
"name": "trigger",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 91,
"name": "trigger",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 92,
"name": "status",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 93,
"name": "response",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "any"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 89,
"character": 9
}
]
},
{
"id": 78,
"name": "updatePayload",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 79,
"name": "updatePayload",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 80,
"name": "payload",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reflection",
"declaration": {
"id": 81,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"indexSignature": [
{
"id": 82,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 83,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "unknown"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 57,
"character": 24
}
]
}
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 57,
"character": 15
}
]
}
],
"groups": [
{
"title": "Constructors",
"kind": 512,
"children": [
57
]
},
{
"title": "Properties",
"kind": 1024,
"children": [
58,
59,
60,
52,
48,
47,
56,
45,
64,
46
]
},
{
"title": "Methods",
"kind": 2048,
"children": [
96,
98,
106,
100,
94,
84,
73,
76,
88,
90,
78
]
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 4,
"character": 25
}
]
}
],
"groups": [
{
"title": "Classes",
"kind": 128,
"children": [
44
]
}
],
"sources": [
{
"fileName": "lib/push.ts",
"line": 1,
"character": 0
}
]
},
{
"id": 197,
"name": "\"lib/serializer\"",
"kind": 1,
"kindString": "Module",
"flags": {
"isExported": true
},
"originalName": "/home/runner/work/realtime-js/realtime-js/src/lib/serializer.ts",
"children": [
{
"id": 198,
"name": "Serializer",
"kind": 128,
"kindString": "Class",
"flags": {
"isExported": true
},
"children": [
{
"id": 199,
"name": "HEADER_LENGTH",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 5,
"character": 15
}
],
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "1"
},
{
"id": 204,
"name": "_binaryDecode",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 205,
"name": "_binaryDecode",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 206,
"name": "buffer",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "ArrayBuffer"
}
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 207,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"children": [
{
"id": 210,
"name": "event",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 33,
"character": 9
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 211,
"name": "payload",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 34,
"character": 11
}
],
"type": {
"type": "intrinsic",
"name": "object"
}
},
{
"id": 208,
"name": "ref",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 31,
"character": 7
}
],
"type": {
"type": "intrinsic",
"name": "null"
}
},
{
"id": 209,
"name": "topic",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 32,
"character": 9
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
210,
211,
208,
209
]
}
]
}
}
}
],
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 19,
"character": 23
}
]
},
{
"id": 212,
"name": "_decodeBroadcast",
"kind": 2048,
"kindString": "Method",
"flags": {
"isPrivate": true,
"isExported": true
},
"signatures": [
{
"id": 213,
"name": "_decodeBroadcast",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 214,
"name": "buffer",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "ArrayBuffer"
}
},
{
"id": 215,
"name": "view",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "DataView"
}
},
{
"id": 216,
"name": "decoder",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "TextDecoder"
}
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 217,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"children": [
{
"id": 220,
"name": "event",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 33,
"character": 9
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 221,
"name": "payload",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 34,
"character": 11
}
],
"type": {
"type": "intrinsic",
"name": "object"
}
},
{
"id": 218,
"name": "ref",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 31,
"character": 7
}
],
"type": {
"type": "intrinsic",
"name": "null"
}
},
{
"id": 219,
"name": "topic",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 32,
"character": 9
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
220,
221,
218,
219
]
}
],
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 30,
"character": 4
}
]
}
}
}
],
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 26,
"character": 26
}
]
},
{
"id": 200,
"name": "decode",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 201,
"name": "decode",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 202,
"name": "rawPayload",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "union",
"types": [
{
"type": "reference",
"name": "ArrayBuffer"
},
{
"type": "intrinsic",
"name": "string"
}
]
}
},
{
"id": 203,
"name": "callback",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "Function"
}
}
],
"type": {
"type": "intrinsic",
"name": "any"
}
}
],
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 7,
"character": 8
}
]
}
],
"groups": [
{
"title": "Properties",
"kind": 1024,
"children": [
199
]
},
{
"title": "Methods",
"kind": 2048,
"children": [
204,
212,
200
]
}
],
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 4,
"character": 31
}
]
}
],
"groups": [
{
"title": "Classes",
"kind": 128,
"children": [
198
]
}
],
"sources": [
{
"fileName": "lib/serializer.ts",
"line": 1,
"character": 0
}
]
},
{
"id": 29,
"name": "\"lib/timer\"",
"kind": 1,
"kindString": "Module",
"flags": {
"isExported": true
},
"originalName": "/home/runner/work/realtime-js/realtime-js/src/lib/timer.ts",
"children": [
{
"id": 30,
"name": "Timer",
"kind": 128,
"kindString": "Class",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Creates a timer that accepts a `timerCalc` function to perform calculated timeout retries, such as exponential backoff.",
"tags": [
{
"tag": "example",
"text": "\n let reconnectTimer = new Timer(() => this.connect(), function(tries){\n return [1000, 5000, 10000][tries - 1] || 10000\n })\n reconnectTimer.scheduleTimeout() // fires after 1000\n reconnectTimer.scheduleTimeout() // fires after 5000\n reconnectTimer.reset()\n reconnectTimer.scheduleTimeout() // fires after 1000\n"
}
]
},
"children": [
{
"id": 33,
"name": "constructor",
"kind": 512,
"kindString": "Constructor",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 36,
"name": "new Timer",
"kind": 16384,
"kindString": "Constructor signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 37,
"name": "callback",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 38,
"name": "timerCalc",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"name": "Function"
}
}
],
"type": {
"type": "reference",
"id": 30,
"name": "Timer"
}
}
],
"sources": [
{
"fileName": "lib/timer.ts",
"line": 15,
"character": 19
}
]
},
{
"id": 34,
"name": "callback",
"kind": 1024,
"kindString": "Property",
"flags": {
"isPublic": true,
"isExported": true,
"isConstructorProperty": true
},
"sources": [
{
"fileName": "lib/timer.ts",
"line": 17,
"character": 29
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 31,
"name": "timer",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/timer.ts",
"line": 14,
"character": 7
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "number"
},
{
"type": "intrinsic",
"name": "undefined"
}
]
},
"defaultValue": "undefined"
},
{
"id": 35,
"name": "timerCalc",
"kind": 1024,
"kindString": "Property",
"flags": {
"isPublic": true,
"isExported": true,
"isConstructorProperty": true
},
"sources": [
{
"fileName": "lib/timer.ts",
"line": 17,
"character": 57
}
],
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 32,
"name": "tries",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/timer.ts",
"line": 15,
"character": 7
}
],
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "0"
},
{
"id": 39,
"name": "reset",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 40,
"name": "reset",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "lib/timer.ts",
"line": 22,
"character": 7
}
]
},
{
"id": 41,
"name": "scheduleTimeout",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 42,
"name": "scheduleTimeout",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "void"
}
}
],
"sources": [
{
"fileName": "lib/timer.ts",
"line": 28,
"character": 17
}
]
}
],
"groups": [
{
"title": "Constructors",
"kind": 512,
"children": [
33
]
},
{
"title": "Properties",
"kind": 1024,
"children": [
34,
31,
35,
32
]
},
{
"title": "Methods",
"kind": 2048,
"children": [
39,
41
]
}
],
"sources": [
{
"fileName": "lib/timer.ts",
"line": 13,
"character": 26
}
]
}
],
"groups": [
{
"title": "Classes",
"kind": 128,
"children": [
30
]
}
],
"sources": [
{
"fileName": "lib/timer.ts",
"line": 1,
"character": 0
}
]
},
{
"id": 451,
"name": "\"lib/transformers\"",
"kind": 1,
"kindString": "Module",
"flags": {
"isExported": true
},
"originalName": "/home/runner/work/realtime-js/realtime-js/src/lib/transformers.ts",
"children": [
{
"id": 452,
"name": "PostgresTypes",
"kind": 4,
"kindString": "Enumeration",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Helpers to convert the change Payload into native JS types."
},
"children": [
{
"id": 453,
"name": "abstime",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 9,
"character": 9
}
],
"defaultValue": "\"abstime\""
},
{
"id": 454,
"name": "bool",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 10,
"character": 6
}
],
"defaultValue": "\"bool\""
},
{
"id": 455,
"name": "date",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 11,
"character": 6
}
],
"defaultValue": "\"date\""
},
{
"id": 456,
"name": "daterange",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 12,
"character": 11
}
],
"defaultValue": "\"daterange\""
},
{
"id": 457,
"name": "float4",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 13,
"character": 8
}
],
"defaultValue": "\"float4\""
},
{
"id": 458,
"name": "float8",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 14,
"character": 8
}
],
"defaultValue": "\"float8\""
},
{
"id": 459,
"name": "int2",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 15,
"character": 6
}
],
"defaultValue": "\"int2\""
},
{
"id": 460,
"name": "int4",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 16,
"character": 6
}
],
"defaultValue": "\"int4\""
},
{
"id": 461,
"name": "int4range",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 17,
"character": 11
}
],
"defaultValue": "\"int4range\""
},
{
"id": 462,
"name": "int8",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 18,
"character": 6
}
],
"defaultValue": "\"int8\""
},
{
"id": 463,
"name": "int8range",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 19,
"character": 11
}
],
"defaultValue": "\"int8range\""
},
{
"id": 464,
"name": "json",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 20,
"character": 6
}
],
"defaultValue": "\"json\""
},
{
"id": 465,
"name": "jsonb",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 21,
"character": 7
}
],
"defaultValue": "\"jsonb\""
},
{
"id": 466,
"name": "money",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 22,
"character": 7
}
],
"defaultValue": "\"money\""
},
{
"id": 467,
"name": "numeric",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 23,
"character": 9
}
],
"defaultValue": "\"numeric\""
},
{
"id": 468,
"name": "oid",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 24,
"character": 5
}
],
"defaultValue": "\"oid\""
},
{
"id": 469,
"name": "reltime",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 25,
"character": 9
}
],
"defaultValue": "\"reltime\""
},
{
"id": 470,
"name": "text",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 26,
"character": 6
}
],
"defaultValue": "\"text\""
},
{
"id": 471,
"name": "time",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 27,
"character": 6
}
],
"defaultValue": "\"time\""
},
{
"id": 472,
"name": "timestamp",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 28,
"character": 11
}
],
"defaultValue": "\"timestamp\""
},
{
"id": 473,
"name": "timestamptz",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 29,
"character": 13
}
],
"defaultValue": "\"timestamptz\""
},
{
"id": 474,
"name": "timetz",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 30,
"character": 8
}
],
"defaultValue": "\"timetz\""
},
{
"id": 475,
"name": "tsrange",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 31,
"character": 9
}
],
"defaultValue": "\"tsrange\""
},
{
"id": 476,
"name": "tstzrange",
"kind": 16,
"kindString": "Enumeration member",
"flags": {
"isExported": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 32,
"character": 11
}
],
"defaultValue": "\"tstzrange\""
}
],
"groups": [
{
"title": "Enumeration members",
"kind": 16,
"children": [
453,
454,
455,
456,
457,
458,
459,
460,
461,
462,
463,
464,
465,
466,
467,
468,
469,
470,
471,
472,
473,
474,
475,
476
]
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 8,
"character": 25
}
]
},
{
"id": 483,
"name": "BaseValue",
"kind": 4194304,
"kindString": "Type alias",
"flags": {},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 42,
"character": 14
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "null"
},
{
"type": "intrinsic",
"name": "string"
},
{
"type": "intrinsic",
"name": "number"
},
{
"type": "intrinsic",
"name": "boolean"
}
]
}
},
{
"id": 477,
"name": "Columns",
"kind": 4194304,
"kindString": "Type alias",
"flags": {},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 35,
"character": 12
}
],
"type": {
"type": "array",
"elementType": {
"type": "reflection",
"declaration": {
"id": 478,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"children": [
{
"id": 481,
"name": "flags",
"kind": 32,
"kindString": "Variable",
"flags": {
"isOptional": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 38,
"character": 7
}
],
"type": {
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "string"
}
}
},
{
"id": 479,
"name": "name",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 36,
"character": 6
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 480,
"name": "type",
"kind": 32,
"kindString": "Variable",
"flags": {},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 37,
"character": 6
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 482,
"name": "type_modifier",
"kind": 32,
"kindString": "Variable",
"flags": {
"isOptional": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 39,
"character": 15
}
],
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "intrinsic",
"name": "number"
}
]
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
481,
479,
480,
482
]
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 35,
"character": 14
}
]
}
}
}
},
{
"id": 485,
"name": "Record",
"kind": 4194304,
"kindString": "Type alias",
"flags": {},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 45,
"character": 11
}
],
"type": {
"type": "reflection",
"declaration": {
"id": 486,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"indexSignature": [
{
"id": 487,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {},
"parameters": [
{
"id": 488,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "reference",
"id": 484,
"name": "RecordValue"
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 45,
"character": 13
}
]
}
}
},
{
"id": 484,
"name": "RecordValue",
"kind": 4194304,
"kindString": "Type alias",
"flags": {},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 43,
"character": 16
}
],
"type": {
"type": "union",
"types": [
{
"type": "reference",
"id": 483,
"name": "BaseValue"
},
{
"type": "array",
"elementType": {
"type": "reference",
"id": 483,
"name": "BaseValue"
}
}
]
}
},
{
"id": 502,
"name": "convertCell",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true,
"isConst": true
},
"comment": {
"shortText": "If the value of the cell is `null`, returns null.\nOtherwise converts the string value to the correct type.",
"tags": [
{
"tag": "example",
"text": "convertCell('bool', 't')\n//=> true"
},
{
"tag": "example",
"text": "convertCell('int8', '10')\n//=> 10"
},
{
"tag": "example",
"text": "convertCell('_int4', '{1,2,3,4}')\n//=> [1,2,3,4]\n"
}
]
},
"signatures": [
{
"id": 503,
"name": "convertCell",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "If the value of the cell is `null`, returns null.\nOtherwise converts the string value to the correct type.",
"tags": [
{
"tag": "example",
"text": "convertCell('bool', 't')\n//=> true"
},
{
"tag": "example",
"text": "convertCell('int8', '10')\n//=> 10"
},
{
"tag": "example",
"text": "convertCell('_int4', '{1,2,3,4}')\n//=> [1,2,3,4]\n"
}
]
},
"parameters": [
{
"id": 504,
"name": "type",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"shortText": "A postgres column type"
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 505,
"name": "value",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 484,
"name": "RecordValue"
}
}
],
"type": {
"type": "reference",
"id": 484,
"name": "RecordValue"
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 118,
"character": 24
}
]
},
{
"id": 489,
"name": "convertChangeData",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true,
"isConst": true
},
"comment": {
"shortText": "Takes an array of columns and an object of string values then converts each string value\nto its mapped type.",
"tags": [
{
"tag": "example",
"text": "convertChangeData([{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], {first_name: 'Paul', age:'33'}, {})\n//=>{ first_name: 'Paul', age: 33 }\n"
}
]
},
"signatures": [
{
"id": 490,
"name": "convertChangeData",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Takes an array of columns and an object of string values then converts each string value\nto its mapped type.",
"tags": [
{
"tag": "example",
"text": "convertChangeData([{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], {first_name: 'Paul', age:'33'}, {})\n//=>{ first_name: 'Paul', age: 33 }\n"
}
]
},
"parameters": [
{
"id": 491,
"name": "columns",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 477,
"name": "Columns"
}
},
{
"id": 492,
"name": "record",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {},
"type": {
"type": "reference",
"id": 485,
"name": "Record"
}
},
{
"id": 493,
"name": "options",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The map of various options that can be applied to the mapper"
},
"type": {
"type": "reflection",
"declaration": {
"id": 494,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {
"isExported": true
},
"children": [
{
"id": 495,
"name": "skipTypes",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isOptional": true
},
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 64,
"character": 22
}
],
"type": {
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "string"
}
}
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
495
]
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 64,
"character": 10
}
]
}
},
"defaultValue": "{}"
}
],
"type": {
"type": "reference",
"id": 485,
"name": "Record"
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 61,
"character": 30
}
]
},
{
"id": 496,
"name": "convertColumn",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true,
"isConst": true
},
"comment": {
"shortText": "Converts the value of an individual column.",
"returns": "Useless information\n",
"tags": [
{
"tag": "example",
"text": "convertColumn('age', [{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], {first_name: 'Paul', age: '33'}, [])\n//=> 33"
},
{
"tag": "example",
"text": "convertColumn('age', [{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], {first_name: 'Paul', age: '33'}, ['int4'])\n//=> \"33\"\n"
}
]
},
"signatures": [
{
"id": 497,
"name": "convertColumn",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Converts the value of an individual column.",
"returns": "Useless information\n",
"tags": [
{
"tag": "example",
"text": "convertColumn('age', [{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], {first_name: 'Paul', age: '33'}, [])\n//=> 33"
},
{
"tag": "example",
"text": "convertColumn('age', [{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], {first_name: 'Paul', age: '33'}, ['int4'])\n//=> \"33\"\n"
}
]
},
"parameters": [
{
"id": 498,
"name": "columnName",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The column that you want to convert"
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 499,
"name": "columns",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 477,
"name": "Columns"
}
},
{
"id": 500,
"name": "record",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The map of string values"
},
"type": {
"type": "reference",
"id": 485,
"name": "Record"
}
},
{
"id": 501,
"name": "skipTypes",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"comment": {
"shortText": "An array of types that should not be converted"
},
"type": {
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "string"
}
}
}
],
"type": {
"type": "reference",
"id": 484,
"name": "RecordValue"
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 88,
"character": 26
}
]
},
{
"id": 506,
"name": "noop",
"kind": 64,
"kindString": "Function",
"flags": {
"isConst": true
},
"signatures": [
{
"id": 507,
"name": "noop",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"parameters": [
{
"id": 508,
"name": "value",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "reference",
"id": 484,
"name": "RecordValue"
}
}
],
"type": {
"type": "reference",
"id": 484,
"name": "RecordValue"
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 162,
"character": 10
}
]
},
{
"id": 518,
"name": "toArray",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true,
"isConst": true
},
"comment": {
"shortText": "Converts a Postgres Array into a native JS array",
"tags": [
{
"tag": "example",
"text": "toArray('{}', 'int4')\n//=> []"
},
{
"tag": "example",
"text": "toArray('{\"[2021-01-01,2021-12-31)\",\"(2021-01-01,2021-12-32]\"}', 'daterange')\n//=> ['[2021-01-01,2021-12-31)', '(2021-01-01,2021-12-32]']"
},
{
"tag": "example",
"text": "toArray([1,2,3,4], 'int4')\n//=> [1,2,3,4]\n"
}
]
},
"signatures": [
{
"id": 519,
"name": "toArray",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Converts a Postgres Array into a native JS array",
"tags": [
{
"tag": "example",
"text": "toArray('{}', 'int4')\n//=> []"
},
{
"tag": "example",
"text": "toArray('{\"[2021-01-01,2021-12-31)\",\"(2021-01-01,2021-12-32]\"}', 'daterange')\n//=> ['[2021-01-01,2021-12-31)', '(2021-01-01,2021-12-32]']"
},
{
"tag": "example",
"text": "toArray([1,2,3,4], 'int4')\n//=> [1,2,3,4]\n"
}
]
},
"parameters": [
{
"id": 520,
"name": "value",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 484,
"name": "RecordValue"
}
},
{
"id": 521,
"name": "type",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "reference",
"id": 484,
"name": "RecordValue"
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 206,
"character": 20
}
]
},
{
"id": 509,
"name": "toBoolean",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true,
"isConst": true
},
"signatures": [
{
"id": 510,
"name": "toBoolean",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 511,
"name": "value",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 484,
"name": "RecordValue"
}
}
],
"type": {
"type": "reference",
"id": 484,
"name": "RecordValue"
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 165,
"character": 22
}
]
},
{
"id": 515,
"name": "toJson",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true,
"isConst": true
},
"signatures": [
{
"id": 516,
"name": "toJson",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 517,
"name": "value",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 484,
"name": "RecordValue"
}
}
],
"type": {
"type": "reference",
"id": 484,
"name": "RecordValue"
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 184,
"character": 19
}
]
},
{
"id": 512,
"name": "toNumber",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true,
"isConst": true
},
"signatures": [
{
"id": 513,
"name": "toNumber",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"parameters": [
{
"id": 514,
"name": "value",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 484,
"name": "RecordValue"
}
}
],
"type": {
"type": "reference",
"id": 484,
"name": "RecordValue"
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 175,
"character": 21
}
]
},
{
"id": 522,
"name": "toTimestampString",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true,
"isConst": true
},
"comment": {
"shortText": "Fixes timestamp to be ISO-8601. Swaps the space between the date and time for a 'T'\nSee https://github.com/supabase/supabase/issues/18",
"tags": [
{
"tag": "example",
"text": "toTimestampString('2019-09-10 00:00:00')\n//=> '2019-09-10T00:00:00'\n"
}
]
},
"signatures": [
{
"id": 523,
"name": "toTimestampString",
"kind": 4096,
"kindString": "Call signature",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Fixes timestamp to be ISO-8601. Swaps the space between the date and time for a 'T'\nSee https://github.com/supabase/supabase/issues/18",
"tags": [
{
"tag": "example",
"text": "toTimestampString('2019-09-10 00:00:00')\n//=> '2019-09-10T00:00:00'\n"
}
]
},
"parameters": [
{
"id": 524,
"name": "value",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isExported": true
},
"type": {
"type": "reference",
"id": 484,
"name": "RecordValue"
}
}
],
"type": {
"type": "reference",
"id": 484,
"name": "RecordValue"
}
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 241,
"character": 30
}
]
}
],
"groups": [
{
"title": "Enumerations",
"kind": 4,
"children": [
452
]
},
{
"title": "Type aliases",
"kind": 4194304,
"children": [
483,
477,
485,
484
]
},
{
"title": "Functions",
"kind": 64,
"children": [
502,
489,
496,
506,
518,
509,
515,
512,
522
]
}
],
"sources": [
{
"fileName": "lib/transformers.ts",
"line": 1,
"character": 0
}
]
},
{
"id": 1,
"name": "\"lib/version\"",
"kind": 1,
"kindString": "Module",
"flags": {
"isExported": true
},
"originalName": "/home/runner/work/realtime-js/realtime-js/src/lib/version.ts",
"children": [
{
"id": 2,
"name": "version",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true,
"isConst": true
},
"sources": [
{
"fileName": "lib/version.ts",
"line": 2,
"character": 20
}
],
"type": {
"type": "stringLiteral",
"value": "0.0.0"
},
"defaultValue": "\"0.0.0\""
}
],
"groups": [
{
"title": "Variables",
"kind": 32,
"children": [
2
]
}
],
"sources": [
{
"fileName": "lib/version.ts",
"line": 1,
"character": 0
}
]
}
],
"groups": [
{
"title": "Modules",
"kind": 1,
"children": [
222,
360,
109,
525,
3,
43,
197,
29,
451,
1
]
}
]
}