Skip to content

Commit

Permalink
docs: add deprecation message (eclipse-thingweb#1310)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpeintner authored and JKRhb committed Aug 12, 2024
1 parent 8996209 commit 9f818d5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions packages/td-tools/src/td-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ export function findPort(td: ThingDescription): number {
return parseInt(returnString);
}

/**
* @deprecated This function will be removed in the future.
*/
export function setContextLanguage(thing: ThingDescription, language: string, forceOverride: boolean): void {
// forceOverride == false -> set @language if no @language set
// forceOverride == true -> set/override @language in any case
Expand Down
10 changes: 8 additions & 2 deletions packages/td-tools/src/td-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ function adjustBooleanField(affordance: AffordanceElement, key: string) {
}
}

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

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

/** Serializes a Thing object into a TD */
/** Serializes a Thing object into a TD
*
* @deprecated This function will be removed in the future.
*/
export function serializeTD(thing: Thing): string {
const copy: Thing = JSON.parse(JSON.stringify(thing));

Expand Down

0 comments on commit 9f818d5

Please sign in to comment.