Skip to content

Commit

Permalink
Export Stanza class
Browse files Browse the repository at this point in the history
  • Loading branch information
jcbrand committed Apr 1, 2024
1 parent d6cb600 commit 31f9199
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import Websocket from './websocket.js';
import WorkerWebsocket from './worker-websocket.js';
import log from './log.js';
import { ElementType, ErrorCondition, LOG_LEVELS, NS, Status, XHTML } from './constants.js';
import { stx, toStanza } from './stanza.js';
import { stx, toStanza, Stanza } from './stanza.js';

/**
* A container for all Strophe library functions.
Expand Down Expand Up @@ -185,4 +185,4 @@ globalThis.$msg = $msg;
globalThis.$pres = $pres;
globalThis.Strophe = Strophe;

export { Builder, $build, $iq, $msg, $pres, Strophe, stx, toStanza };
export { Builder, $build, $iq, $msg, $pres, Strophe, Stanza, stx, toStanza };
2 changes: 1 addition & 1 deletion src/stanza.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function toStanza(string, throwErrorIfInvalidNS) {
* A Stanza represents a XML element used in XMPP (commonly referred to as
* stanzas).
*/
class Stanza {
export class Stanza {
/**
* @param { string[] } strings
* @param { any[] } values
Expand Down
3 changes: 2 additions & 1 deletion src/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ export const Strophe: {
*/
SECONDARY_TIMEOUT: number;
};
import { Stanza } from './stanza.js';
import { stx } from './stanza.js';
import { toStanza } from './stanza.js';
import * as shims from './shims.js';
Expand All @@ -220,5 +221,5 @@ import SASLMechanism from './sasl.js';
import { Status } from './constants.js';
import TimedHandler from './timed-handler.js';
import * as utils from './utils.js';
export { Builder, $build, $iq, $msg, $pres, stx, toStanza };
export { Builder, $build, $iq, $msg, $pres, Stanza, stx, toStanza };
//# sourceMappingURL=index.d.ts.map
3 changes: 1 addition & 2 deletions src/types/stanza.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function stx(strings: string[], ...values: any[]): Stanza;
* A Stanza represents a XML element used in XMPP (commonly referred to as
* stanzas).
*/
declare class Stanza {
export class Stanza {
/**
* @param { string[] } strings
* @param { any[] } values
Expand All @@ -35,5 +35,4 @@ declare class Stanza {
tree(): Element;
node: any;
}
export {};
//# sourceMappingURL=stanza.d.ts.map

0 comments on commit 31f9199

Please sign in to comment.