Suggestion: Convert runtime deprecation notice to TS `@deprecated` annotation
EdricChan03 opened this issue ยท comments
Edric Chan commented
Imo, converting the following console.warn
deprecation notice to use TSDoc's @deprecated
annotation would probably help surface the deprecation notice to end users without having to use it in the first place:
The function's code is stripped in the resulting generated type definitions, so it's hard to tell that it's actually deprecated:
// ...
declare function writable<T>(key: string, initialValue: T, options?: Options<T>): Writable<T>;
declare function persisted<T>(key: string, initialValue: T, options?: Options<T>): Writable<T>;
export { persisted, writable };
Something like the following should persist in the resulting definitions file:
/** @deprecated Use `persisted` instead */
export function writable(...)
Joshua Nussbaum commented
github-actions commented
๐ This issue has been resolved in version 0.6.0 ๐
The release is available on:
Your semantic-release bot ๐ฆ๐