From ed2a61dabfb914148048c2755a6b9cc0133cfd02 Mon Sep 17 00:00:00 2001 From: danielpeintner Date: Tue, 23 Jul 2024 10:45:26 +0200 Subject: [PATCH] docs: add deprecation message --- packages/td-tools/src/td-helpers.ts | 3 +++ packages/td-tools/src/td-parser.ts | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/td-tools/src/td-helpers.ts b/packages/td-tools/src/td-helpers.ts index 3efa4ec77..bc95aee72 100644 --- a/packages/td-tools/src/td-helpers.ts +++ b/packages/td-tools/src/td-helpers.ts @@ -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 diff --git a/packages/td-tools/src/td-parser.ts b/packages/td-tools/src/td-parser.ts index 03d24dba0..13f0bfb1e 100644 --- a/packages/td-tools/src/td-parser.ts +++ b/packages/td-tools/src/td-parser.ts @@ -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\`\`\``); @@ -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));