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
/** * Creates new QRCamera from frontal camera * @example * const canvas = new QRCanvas(); * const camera = frontalCamera(); */exportasyncfunctionfrontalCamera(player: HTMLVideoElement): Promise<QRCamera>
Example directive is perfectly valid JS code, and has always been. However, JSR doesn't highlight it -- and even worse, doesn't even add line-breaks. JSR needs this:
@example
```js
const canvas = new QRCanvas();
const camera = frontalCamera();
```
It's unreasonable to require all jsdoc code example to be replaced by this flavored markdown just because you can't fix your code.
The text was updated successfully, but these errors were encountered:
In our docs, we state that we support jsdoc-style comments and related standards. On the case of examples, we align more with TSDoc than JSDoc, since its much simpler and clearer than an ambiguous than having just free-lying code, especially since many of the examples also have some text in it.
We won't be changing this behaviour because besides being complex (and potentially expensive from a computation perspective since all jsdoc examples would need to tried to be parsed to see if they are valid code), it would potentially break existing examples.
Consider this JS/ts code:
Example directive is perfectly valid JS code, and has always been. However, JSR doesn't highlight it -- and even worse, doesn't even add line-breaks. JSR needs this:
It's unreasonable to require all jsdoc code example to be replaced by this flavored markdown just because you can't fix your code.
The text was updated successfully, but these errors were encountered: