Skip to content

Commit fe2851f

Browse files
authored
Add type doc links (#1776)
1 parent dbaf7a9 commit fe2851f

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

.changeset/tricky-paws-greet.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'livekit-client': patch
3+
---
4+
5+
Add docs comments making it clear TokenSource-prefixed exported types shouldn't be used for TokenSource construction

src/room/token-source/TokenSource.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,13 @@ class TokenSourceSandboxTokenServer extends TokenSourceEndpoint {
245245
}
246246

247247
export {
248+
/** The return type of {@link TokenSource.literal} */
248249
type TokenSourceLiteral,
250+
/** The return type of {@link TokenSource.custom} */
249251
type TokenSourceCustom,
252+
/** The return type of {@link TokenSource.endpoint} */
250253
type TokenSourceEndpoint,
254+
/** The return type of {@link TokenSource.sandboxTokenServer} */
251255
type TokenSourceSandboxTokenServer,
252256
decodeTokenPayload,
253257
areTokenSourceFetchOptionsEqual,
@@ -273,7 +277,7 @@ export const TokenSource = {
273277
/**
274278
* TokenSource.endpoint creates a token source that fetches credentials from a given URL using
275279
* the standard endpoint format:
276-
* FIXME: add docs link here in the future!
280+
* @see https://cloud.livekit.io/projects/p_/sandbox/templates/token-server
277281
*/
278282
endpoint(url: string, options: EndpointOptions = {}) {
279283
return new TokenSourceEndpoint(url, options);

0 commit comments

Comments
 (0)