You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** * A thing that does stuff * @template {any[]} [T=import('foo').Something] * @param {T} values Stuff. */functiondoStuff(values){}
Invoking prettier will result in this:
/** * A thing that does stuff * @template {any[]} [T=import('foo').Something] Default is `import('foo').Something` * @param {T} values Stuff. */functiondoStuff(values){}
But if we invoke prettier again, we get this:
/** * A thing that does stuff * @template {any[]} [T=import('foo').Something] Default is `import('foo').Something` Default is `import('foo').Something` * @param {T} values Stuff. */functiondoStuff(values){}
And again:
/** * A thing that does stuff * @template {any[]} [T=import('foo').Something] Default is `import('foo').Something` Default is `import('foo').Something` Default is `import('foo').Something` * @param {T} values Stuff. */functiondoStuff(values){}
(linebreaks will be added to the description of values as well)
This does not happen if we do, e.g.,:
/** * @typedef {import('foo').Something} Something *//** * A thing that does stuff * @template {any[]} [T=Something] * @param {T} values Stuff. */functiondoStuff(values){}
This results in:
/** * A thing that does stuff * @template {any[]} [T=Something] Default is `Something` * @param {T} values Stuff. */functiondoStuff(values){}
Subsequent prettier invocations will not cause Default is Something to be repeated.
This may be difficult to reproduce and I'm still trying to isolate it. It may only apply to docstrings for a class (not a function), or if @implements is present.
The text was updated successfully, but these errors were encountered:
Given:
Invoking prettier will result in this:
But if we invoke prettier again, we get this:
And again:
(linebreaks will be added to the description of
values
as well)This does not happen if we do, e.g.,:
This results in:
Subsequent prettier invocations will not cause
Default is Something
to be repeated.This may be difficult to reproduce and I'm still trying to isolate it. It may only apply to docstrings for a class (not a function), or if
@implements
is present.The text was updated successfully, but these errors were encountered: