UNPKG

@tldraw/utils

Version:

tldraw infinite canvas SDK (private utilities).

8 lines (7 loc) 877 B
{ "version": 3, "sources": ["../../src/lib/warn.ts"], "sourcesContent": ["const usedWarnings = new Set<string>()\n\n/** @internal */\nexport function warnDeprecatedGetter(name: string) {\n\twarnOnce(\n\t\t`Using '${name}' is deprecated and will be removed in the near future. Please refactor to use 'get${name[0].toLocaleUpperCase()}${name.slice(\n\t\t\t1\n\t\t)}' instead.`\n\t)\n}\n\n/** @internal */\nexport function warnOnce(message: string) {\n\tif (usedWarnings.has(message)) return\n\n\tusedWarnings.add(message)\n\tconsole.warn(`[tldraw] ${message}`)\n}\n"], "mappings": "AAAA,MAAM,eAAe,oBAAI,IAAY;AAG9B,SAAS,qBAAqB,MAAc;AAClD;AAAA,IACC,UAAU,IAAI,sFAAsF,KAAK,CAAC,EAAE,kBAAkB,CAAC,GAAG,KAAK;AAAA,MACtI;AAAA,IACD,CAAC;AAAA,EACF;AACD;AAGO,SAAS,SAAS,SAAiB;AACzC,MAAI,aAAa,IAAI,OAAO,EAAG;AAE/B,eAAa,IAAI,OAAO;AACxB,UAAQ,KAAK,YAAY,OAAO,EAAE;AACnC;", "names": [] }