{
  "metadata": {
    "toolPackage": "@microsoft/api-extractor",
    "toolVersion": "7.52.10",
    "schemaVersion": 1011,
    "oldestForwardsCompatibleVersion": 1001,
    "tsdocConfig": {
      "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json",
      "noStandardTags": true,
      "tagDefinitions": [
        {
          "tagName": "@alpha",
          "syntaxKind": "modifier"
        },
        {
          "tagName": "@beta",
          "syntaxKind": "modifier"
        },
        {
          "tagName": "@defaultValue",
          "syntaxKind": "block"
        },
        {
          "tagName": "@decorator",
          "syntaxKind": "block",
          "allowMultiple": true
        },
        {
          "tagName": "@deprecated",
          "syntaxKind": "block"
        },
        {
          "tagName": "@eventProperty",
          "syntaxKind": "modifier"
        },
        {
          "tagName": "@example",
          "syntaxKind": "block",
          "allowMultiple": true
        },
        {
          "tagName": "@experimental",
          "syntaxKind": "modifier"
        },
        {
          "tagName": "@inheritDoc",
          "syntaxKind": "inline"
        },
        {
          "tagName": "@internal",
          "syntaxKind": "modifier"
        },
        {
          "tagName": "@label",
          "syntaxKind": "inline"
        },
        {
          "tagName": "@link",
          "syntaxKind": "inline",
          "allowMultiple": true
        },
        {
          "tagName": "@override",
          "syntaxKind": "modifier"
        },
        {
          "tagName": "@packageDocumentation",
          "syntaxKind": "modifier"
        },
        {
          "tagName": "@param",
          "syntaxKind": "block",
          "allowMultiple": true
        },
        {
          "tagName": "@privateRemarks",
          "syntaxKind": "block"
        },
        {
          "tagName": "@public",
          "syntaxKind": "modifier"
        },
        {
          "tagName": "@readonly",
          "syntaxKind": "modifier"
        },
        {
          "tagName": "@remarks",
          "syntaxKind": "block"
        },
        {
          "tagName": "@returns",
          "syntaxKind": "block"
        },
        {
          "tagName": "@sealed",
          "syntaxKind": "modifier"
        },
        {
          "tagName": "@see",
          "syntaxKind": "block"
        },
        {
          "tagName": "@throws",
          "syntaxKind": "block",
          "allowMultiple": true
        },
        {
          "tagName": "@typeParam",
          "syntaxKind": "block",
          "allowMultiple": true
        },
        {
          "tagName": "@virtual",
          "syntaxKind": "modifier"
        },
        {
          "tagName": "@betaDocumentation",
          "syntaxKind": "modifier"
        },
        {
          "tagName": "@internalRemarks",
          "syntaxKind": "block"
        },
        {
          "tagName": "@preapproved",
          "syntaxKind": "modifier"
        }
      ],
      "supportForTags": {
        "@alpha": true,
        "@beta": true,
        "@defaultValue": true,
        "@decorator": true,
        "@deprecated": true,
        "@eventProperty": true,
        "@example": true,
        "@experimental": true,
        "@inheritDoc": true,
        "@internal": true,
        "@label": true,
        "@link": true,
        "@override": true,
        "@packageDocumentation": true,
        "@param": true,
        "@privateRemarks": true,
        "@public": true,
        "@readonly": true,
        "@remarks": true,
        "@returns": true,
        "@sealed": true,
        "@see": true,
        "@throws": true,
        "@typeParam": true,
        "@virtual": true,
        "@betaDocumentation": true,
        "@internalRemarks": true,
        "@preapproved": true
      },
      "reportUnsupportedHtmlElements": false
    }
  },
  "kind": "Package",
  "canonicalReference": "@genesislcap/foundation-broadcast-channel!",
  "docComment": "",
  "name": "@genesislcap/foundation-broadcast-channel",
  "preserveMemberOrder": false,
  "members": [
    {
      "kind": "EntryPoint",
      "canonicalReference": "@genesislcap/foundation-broadcast-channel!",
      "name": "",
      "preserveMemberOrder": false,
      "members": [
        {
          "kind": "Function",
          "canonicalReference": "@genesislcap/foundation-broadcast-channel!createTypedBroadcastChannel:function(1)",
          "docComment": "/**\n * Creates a strongly typed broadcast channel.\n *\n * @remarks\n *\n * `registerTypedBroadcastChannel` may be preferred, as it will create and register the channel in the DI.\n *\n * @param name - The channel name.\n *\n * @returns The created TypedBroadcastChannel.\n *\n * @example\n * ```ts\n * const channel = createTypedBroadcastChannel<GenesisResourcesEvents>(GenesisResourcesChannelId);\n * ```\n *\n * @public\n */\n",
          "excerptTokens": [
            {
              "kind": "Content",
              "text": "createTypedBroadcastChannel: <TEventDetailMap extends "
            },
            {
              "kind": "Reference",
              "text": "EventDetailMap",
              "canonicalReference": "@genesislcap/foundation-events!EventDetailMap:type"
            },
            {
              "kind": "Content",
              "text": ">(name: "
            },
            {
              "kind": "Content",
              "text": "string"
            },
            {
              "kind": "Content",
              "text": ") => "
            },
            {
              "kind": "Reference",
              "text": "DefaultTypedBroadcastChannel",
              "canonicalReference": "@genesislcap/foundation-broadcast-channel!DefaultTypedBroadcastChannel:class"
            },
            {
              "kind": "Content",
              "text": "<TEventDetailMap>"
            }
          ],
          "fileUrlPath": "src/broadcast-channel/broadcast-channel.ts",
          "returnTypeTokenRange": {
            "startIndex": 5,
            "endIndex": 7
          },
          "releaseTag": "Public",
          "overloadIndex": 1,
          "parameters": [
            {
              "parameterName": "name",
              "parameterTypeTokenRange": {
                "startIndex": 3,
                "endIndex": 4
              },
              "isOptional": false
            }
          ],
          "typeParameters": [
            {
              "typeParameterName": "TEventDetailMap",
              "constraintTokenRange": {
                "startIndex": 1,
                "endIndex": 2
              },
              "defaultTypeTokenRange": {
                "startIndex": 0,
                "endIndex": 0
              }
            }
          ],
          "name": "createTypedBroadcastChannel"
        },
        {
          "kind": "Class",
          "canonicalReference": "@genesislcap/foundation-broadcast-channel!DefaultTypedBroadcastChannel:class",
          "docComment": "/**\n * Default TypedBroadcastChannel implementation.\n *\n * @public\n */\n",
          "excerptTokens": [
            {
              "kind": "Content",
              "text": "export declare class DefaultTypedBroadcastChannel<TEventDetailMap extends "
            },
            {
              "kind": "Reference",
              "text": "EventDetailMap",
              "canonicalReference": "@genesislcap/foundation-events!EventDetailMap:type"
            },
            {
              "kind": "Content",
              "text": "> extends "
            },
            {
              "kind": "Reference",
              "text": "BroadcastChannel",
              "canonicalReference": "!BroadcastChannel:interface"
            },
            {
              "kind": "Content",
              "text": " implements "
            },
            {
              "kind": "Reference",
              "text": "TypedBroadcastChannel",
              "canonicalReference": "@genesislcap/foundation-broadcast-channel!TypedBroadcastChannel:interface"
            },
            {
              "kind": "Content",
              "text": "<TEventDetailMap>"
            },
            {
              "kind": "Content",
              "text": " "
            }
          ],
          "fileUrlPath": "src/broadcast-channel/broadcast-channel.ts",
          "releaseTag": "Public",
          "typeParameters": [
            {
              "typeParameterName": "TEventDetailMap",
              "constraintTokenRange": {
                "startIndex": 1,
                "endIndex": 2
              },
              "defaultTypeTokenRange": {
                "startIndex": 0,
                "endIndex": 0
              }
            }
          ],
          "isAbstract": false,
          "name": "DefaultTypedBroadcastChannel",
          "preserveMemberOrder": false,
          "members": [
            {
              "kind": "Property",
              "canonicalReference": "@genesislcap/foundation-broadcast-channel!DefaultTypedBroadcastChannel#isMessageType:member",
              "docComment": "/**\n * A type predicate function to narrow down message events based on their 'type' property.\n *\n * @param type - The message type.\n *\n * @param event - The message event.\n */\n",
              "excerptTokens": [
                {
                  "kind": "Content",
                  "text": "isMessageType: "
                },
                {
                  "kind": "Content",
                  "text": "<T extends keyof TEventDetailMap>(type: T, event: "
                },
                {
                  "kind": "Reference",
                  "text": "TypedMessageEvent",
                  "canonicalReference": "@genesislcap/foundation-broadcast-channel!TypedMessageEvent:type"
                },
                {
                  "kind": "Content",
                  "text": "<TEventDetailMap, keyof TEventDetailMap>) => "
                },
                {
                  "kind": "Reference",
                  "text": "event",
                  "canonicalReference": "@genesislcap/foundation-broadcast-channel!~event"
                },
                {
                  "kind": "Content",
                  "text": " is "
                },
                {
                  "kind": "Reference",
                  "text": "TypedMessageEvent",
                  "canonicalReference": "@genesislcap/foundation-broadcast-channel!TypedMessageEvent:type"
                },
                {
                  "kind": "Content",
                  "text": "<TEventDetailMap, T>"
                },
                {
                  "kind": "Content",
                  "text": ";"
                }
              ],
              "isReadonly": false,
              "isOptional": false,
              "releaseTag": "Public",
              "name": "isMessageType",
              "propertyTypeTokenRange": {
                "startIndex": 1,
                "endIndex": 8
              },
              "isStatic": false,
              "isProtected": false,
              "isAbstract": false
            },
            {
              "kind": "Property",
              "canonicalReference": "@genesislcap/foundation-broadcast-channel!DefaultTypedBroadcastChannel#postMessage:member",
              "docComment": "/**\n * Post strongly typed messages.\n */\n",
              "excerptTokens": [
                {
                  "kind": "Content",
                  "text": "postMessage: "
                },
                {
                  "kind": "Reference",
                  "text": "PostMessage",
                  "canonicalReference": "@genesislcap/foundation-broadcast-channel!~PostMessage:type"
                },
                {
                  "kind": "Content",
                  "text": "<TEventDetailMap>"
                },
                {
                  "kind": "Content",
                  "text": ";"
                }
              ],
              "isReadonly": false,
              "isOptional": false,
              "releaseTag": "Public",
              "name": "postMessage",
              "propertyTypeTokenRange": {
                "startIndex": 1,
                "endIndex": 3
              },
              "isStatic": false,
              "isProtected": false,
              "isAbstract": false
            }
          ],
          "extendsTokenRange": {
            "startIndex": 3,
            "endIndex": 4
          },
          "implementsTokenRanges": [
            {
              "startIndex": 5,
              "endIndex": 7
            }
          ]
        },
        {
          "kind": "Variable",
          "canonicalReference": "@genesislcap/foundation-broadcast-channel!logger:var",
          "docComment": "/**\n * @public\n */\n",
          "excerptTokens": [
            {
              "kind": "Content",
              "text": "logger: "
            },
            {
              "kind": "Content",
              "text": "import(\"@genesislcap/foundation-logger\")."
            },
            {
              "kind": "Reference",
              "text": "Logger",
              "canonicalReference": "@genesislcap/foundation-logger!Logger:interface"
            }
          ],
          "fileUrlPath": "src/utils/logger.ts",
          "isReadonly": true,
          "releaseTag": "Public",
          "name": "logger",
          "variableTypeTokenRange": {
            "startIndex": 1,
            "endIndex": 3
          }
        },
        {
          "kind": "Function",
          "canonicalReference": "@genesislcap/foundation-broadcast-channel!registerTypedBroadcastChannel:function(1)",
          "docComment": "/**\n * Creates a dependency injection key for the broadcast channel being registered which is lazily created when injected.\n *\n * @param name - The channel name.\n *\n * @returns The created key.\n *\n * @example\n *\n * In a package's config.ts\n * ```ts\n * export interface GenesisResourcesChannel extends TypedBroadcastChannel<GenesisResourcesEvents> {}\n * ...\n * export const GenesisResourcesChannel = registerTypedBroadcastChannel<GenesisResourcesEvents>(GenesisResourcesChannelId);\n * ```\n *\n * @public\n */\n",
          "excerptTokens": [
            {
              "kind": "Content",
              "text": "registerTypedBroadcastChannel: <TEventDetailMap extends "
            },
            {
              "kind": "Reference",
              "text": "EventDetailMap",
              "canonicalReference": "@genesislcap/foundation-events!EventDetailMap:type"
            },
            {
              "kind": "Content",
              "text": ">(name: "
            },
            {
              "kind": "Content",
              "text": "string"
            },
            {
              "kind": "Content",
              "text": ") => "
            },
            {
              "kind": "Content",
              "text": "import(\"@microsoft/fast-foundation\")."
            },
            {
              "kind": "Reference",
              "text": "InterfaceSymbol",
              "canonicalReference": "@microsoft/fast-foundation!InterfaceSymbol:type"
            },
            {
              "kind": "Content",
              "text": "<"
            },
            {
              "kind": "Reference",
              "text": "TypedBroadcastChannel",
              "canonicalReference": "@genesislcap/foundation-broadcast-channel!TypedBroadcastChannel:interface"
            },
            {
              "kind": "Content",
              "text": "<TEventDetailMap>>"
            }
          ],
          "fileUrlPath": "src/broadcast-channel/broadcast-channel.ts",
          "returnTypeTokenRange": {
            "startIndex": 5,
            "endIndex": 10
          },
          "releaseTag": "Public",
          "overloadIndex": 1,
          "parameters": [
            {
              "parameterName": "name",
              "parameterTypeTokenRange": {
                "startIndex": 3,
                "endIndex": 4
              },
              "isOptional": false
            }
          ],
          "typeParameters": [
            {
              "typeParameterName": "TEventDetailMap",
              "constraintTokenRange": {
                "startIndex": 1,
                "endIndex": 2
              },
              "defaultTypeTokenRange": {
                "startIndex": 0,
                "endIndex": 0
              }
            }
          ],
          "name": "registerTypedBroadcastChannel"
        },
        {
          "kind": "Interface",
          "canonicalReference": "@genesislcap/foundation-broadcast-channel!TypedBroadcastChannel:interface",
          "docComment": "/**\n * A TypedBroadcastChannel for sending and receiving typed messages based on {@link @genesislcap/foundation-events#EventDetailMap} input.\n *\n * @example\n * ```ts\n * export type GenesisResourcesEvents = {\n *   'resources-loaded': ResourceItem[];\n *   'resources-unloaded': void;\n * };\n * ...\n * protected channel: TypedBroadcastChannel<GenesisResourcesEvents>;\n * ```\n *\n * See the {@link registerTypedBroadcastChannel} and {@link createTypedBroadcastChannel} APIs below.\n *\n * @public\n */\n",
          "excerptTokens": [
            {
              "kind": "Content",
              "text": "export interface TypedBroadcastChannel<TEventDetailMap extends "
            },
            {
              "kind": "Reference",
              "text": "EventDetailMap",
              "canonicalReference": "@genesislcap/foundation-events!EventDetailMap:type"
            },
            {
              "kind": "Content",
              "text": "> extends "
            },
            {
              "kind": "Reference",
              "text": "Omit",
              "canonicalReference": "!Omit:type"
            },
            {
              "kind": "Content",
              "text": "<"
            },
            {
              "kind": "Reference",
              "text": "BroadcastChannel",
              "canonicalReference": "!BroadcastChannel:interface"
            },
            {
              "kind": "Content",
              "text": ", 'postMessage' | 'onmessage' | 'onmessageerror'>"
            },
            {
              "kind": "Content",
              "text": " "
            }
          ],
          "fileUrlPath": "src/broadcast-channel/broadcast-channel.ts",
          "releaseTag": "Public",
          "typeParameters": [
            {
              "typeParameterName": "TEventDetailMap",
              "constraintTokenRange": {
                "startIndex": 1,
                "endIndex": 2
              },
              "defaultTypeTokenRange": {
                "startIndex": 0,
                "endIndex": 0
              }
            }
          ],
          "name": "TypedBroadcastChannel",
          "preserveMemberOrder": false,
          "members": [
            {
              "kind": "MethodSignature",
              "canonicalReference": "@genesislcap/foundation-broadcast-channel!TypedBroadcastChannel#isMessageType:member(1)",
              "docComment": "/**\n * A type predicate function to narrow down message events based on their 'type' property.\n *\n * @param type - The message type.\n *\n * @param event - The message event.\n */\n",
              "excerptTokens": [
                {
                  "kind": "Content",
                  "text": "isMessageType<T extends "
                },
                {
                  "kind": "Content",
                  "text": "keyof TEventDetailMap"
                },
                {
                  "kind": "Content",
                  "text": ">(type: "
                },
                {
                  "kind": "Content",
                  "text": "T"
                },
                {
                  "kind": "Content",
                  "text": ", event: "
                },
                {
                  "kind": "Reference",
                  "text": "TypedMessageEvent",
                  "canonicalReference": "@genesislcap/foundation-broadcast-channel!TypedMessageEvent:type"
                },
                {
                  "kind": "Content",
                  "text": "<TEventDetailMap, keyof TEventDetailMap>"
                },
                {
                  "kind": "Content",
                  "text": "): "
                },
                {
                  "kind": "Reference",
                  "text": "event",
                  "canonicalReference": "@genesislcap/foundation-broadcast-channel!~event"
                },
                {
                  "kind": "Content",
                  "text": " is "
                },
                {
                  "kind": "Reference",
                  "text": "TypedMessageEvent",
                  "canonicalReference": "@genesislcap/foundation-broadcast-channel!TypedMessageEvent:type"
                },
                {
                  "kind": "Content",
                  "text": "<TEventDetailMap, T>"
                },
                {
                  "kind": "Content",
                  "text": ";"
                }
              ],
              "isOptional": false,
              "returnTypeTokenRange": {
                "startIndex": 8,
                "endIndex": 12
              },
              "releaseTag": "Public",
              "overloadIndex": 1,
              "parameters": [
                {
                  "parameterName": "type",
                  "parameterTypeTokenRange": {
                    "startIndex": 3,
                    "endIndex": 4
                  },
                  "isOptional": false
                },
                {
                  "parameterName": "event",
                  "parameterTypeTokenRange": {
                    "startIndex": 5,
                    "endIndex": 7
                  },
                  "isOptional": false
                }
              ],
              "typeParameters": [
                {
                  "typeParameterName": "T",
                  "constraintTokenRange": {
                    "startIndex": 1,
                    "endIndex": 2
                  },
                  "defaultTypeTokenRange": {
                    "startIndex": 0,
                    "endIndex": 0
                  }
                }
              ],
              "name": "isMessageType"
            },
            {
              "kind": "PropertySignature",
              "canonicalReference": "@genesislcap/foundation-broadcast-channel!TypedBroadcastChannel#onmessage:member",
              "docComment": "/**\n * On message handler.\n *\n * @example\n *\n * Use the `channel.isMessageType` method to narrow based on message types.\n * ```ts\n * import { GenesisResourcesChannel } from '@genesislcap/foundation-comms';\n * ...\n * @GenesisResourcesChannel protected channel: GenesisResourcesChannel;\n * ...\n * this.channel.onmessage = (ev) => {\n *   if (this.channel.isMessageType('resources-loaded', ev)) {\n *     if (!ev.data.detail.length) {\n *       throw Error('No backend resources available');\n *     }\n *   }\n * };\n * ...\n * this.channel.close();\n * ```\n *\n */\n",
              "excerptTokens": [
                {
                  "kind": "Content",
                  "text": "onmessage: "
                },
                {
                  "kind": "Reference",
                  "text": "OnMessage",
                  "canonicalReference": "@genesislcap/foundation-broadcast-channel!~OnMessage:type"
                },
                {
                  "kind": "Content",
                  "text": "<TEventDetailMap>"
                },
                {
                  "kind": "Content",
                  "text": ";"
                }
              ],
              "isReadonly": false,
              "isOptional": false,
              "releaseTag": "Public",
              "name": "onmessage",
              "propertyTypeTokenRange": {
                "startIndex": 1,
                "endIndex": 3
              }
            },
            {
              "kind": "PropertySignature",
              "canonicalReference": "@genesislcap/foundation-broadcast-channel!TypedBroadcastChannel#onmessageerror:member",
              "docComment": "",
              "excerptTokens": [
                {
                  "kind": "Content",
                  "text": "onmessageerror: "
                },
                {
                  "kind": "Reference",
                  "text": "OnMessageError",
                  "canonicalReference": "@genesislcap/foundation-broadcast-channel!~OnMessageError:type"
                },
                {
                  "kind": "Content",
                  "text": "<TEventDetailMap>"
                },
                {
                  "kind": "Content",
                  "text": ";"
                }
              ],
              "isReadonly": false,
              "isOptional": false,
              "releaseTag": "Public",
              "name": "onmessageerror",
              "propertyTypeTokenRange": {
                "startIndex": 1,
                "endIndex": 3
              }
            },
            {
              "kind": "PropertySignature",
              "canonicalReference": "@genesislcap/foundation-broadcast-channel!TypedBroadcastChannel#postMessage:member",
              "docComment": "/**\n * Post strongly typed messages.\n *\n * @example\n *\n * The event detail map provided to the channel on creation will provide `postMessage` typing.\n * ```ts\n * type GenesisResourcesEvents = {\n *   'resources-loaded': ResourceItem[];\n *   'resources-unloaded': void;\n * };\n * ...\n * channel.postMessage('resources-loaded', this.resources); // ok, as this.resources is an array of ResourceItems.\n * channel.postMessage('resources-loaded'); // not ok, as an array is expected for this message type.\n * channel.postMessage('resources-unloaded'); // ok, as this message type maps to void for its detail.\n * ```\n *\n */\n",
              "excerptTokens": [
                {
                  "kind": "Content",
                  "text": "postMessage: "
                },
                {
                  "kind": "Reference",
                  "text": "PostMessage",
                  "canonicalReference": "@genesislcap/foundation-broadcast-channel!~PostMessage:type"
                },
                {
                  "kind": "Content",
                  "text": "<TEventDetailMap>"
                },
                {
                  "kind": "Content",
                  "text": ";"
                }
              ],
              "isReadonly": false,
              "isOptional": false,
              "releaseTag": "Public",
              "name": "postMessage",
              "propertyTypeTokenRange": {
                "startIndex": 1,
                "endIndex": 3
              }
            }
          ],
          "extendsTokenRanges": [
            {
              "startIndex": 3,
              "endIndex": 7
            }
          ]
        },
        {
          "kind": "TypeAlias",
          "canonicalReference": "@genesislcap/foundation-broadcast-channel!TypedMessageEvent:type",
          "docComment": "/**\n * A TypedMessageEvent for BroadcastChannel transmission.\n *\n * @public\n */\n",
          "excerptTokens": [
            {
              "kind": "Content",
              "text": "export type TypedMessageEvent<TEventDetailMap extends "
            },
            {
              "kind": "Reference",
              "text": "EventDetailMap",
              "canonicalReference": "@genesislcap/foundation-events!EventDetailMap:type"
            },
            {
              "kind": "Content",
              "text": ", T extends "
            },
            {
              "kind": "Content",
              "text": "keyof TEventDetailMap"
            },
            {
              "kind": "Content",
              "text": "> = "
            },
            {
              "kind": "Reference",
              "text": "MessageEvent",
              "canonicalReference": "!MessageEvent:interface"
            },
            {
              "kind": "Content",
              "text": "<{\n    type: T;\n    detail: TEventDetailMap[T];\n}>"
            },
            {
              "kind": "Content",
              "text": ";"
            }
          ],
          "fileUrlPath": "src/broadcast-channel/broadcast-channel.ts",
          "releaseTag": "Public",
          "name": "TypedMessageEvent",
          "typeParameters": [
            {
              "typeParameterName": "TEventDetailMap",
              "constraintTokenRange": {
                "startIndex": 1,
                "endIndex": 2
              },
              "defaultTypeTokenRange": {
                "startIndex": 0,
                "endIndex": 0
              }
            },
            {
              "typeParameterName": "T",
              "constraintTokenRange": {
                "startIndex": 3,
                "endIndex": 4
              },
              "defaultTypeTokenRange": {
                "startIndex": 0,
                "endIndex": 0
              }
            }
          ],
          "typeTokenRange": {
            "startIndex": 5,
            "endIndex": 7
          }
        }
      ]
    }
  ]
}
