Skip to content

Commit 274bf4a

Browse files
docs: add deprecation message (#1310)
1 parent 15c5af7 commit 274bf4a

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

packages/td-tools/src/td-helpers.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ export function findPort(td: ThingDescription): number {
4343
return parseInt(returnString);
4444
}
4545

46+
/**
47+
* @deprecated This function will be removed in the future.
48+
*/
4649
export function setContextLanguage(thing: ThingDescription, language: string, forceOverride: boolean): void {
4750
// forceOverride == false -> set @language if no @language set
4851
// forceOverride == true -> set/override @language in any case

packages/td-tools/src/td-parser.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ function adjustBooleanField(affordance: AffordanceElement, key: string) {
5555
}
5656
}
5757

58-
/** Parses a TD into a Thing object */
58+
/** Parses a TD into a Thing object
59+
*
60+
* @deprecated This function will be removed in the future.
61+
*/
5962
export function parseTD(td: string, normalize?: boolean): Thing {
6063
logDebug(`parseTD() parsing\n\`\`\`\n${td}\n\`\`\``);
6164

@@ -220,7 +223,10 @@ export function parseTD(td: string, normalize?: boolean): Thing {
220223
return thing;
221224
}
222225

223-
/** Serializes a Thing object into a TD */
226+
/** Serializes a Thing object into a TD
227+
*
228+
* @deprecated This function will be removed in the future.
229+
*/
224230
export function serializeTD(thing: Thing): string {
225231
const copy: Thing = JSON.parse(JSON.stringify(thing));
226232

0 commit comments

Comments
 (0)