Skip to content

Commit de02be9

Browse files
Copilotfregante
andcommitted
Use safer array access method with .at(0)
Co-authored-by: fregante <1402241+fregante@users.noreply.github.com>
1 parent ae26811 commit de02be9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

add-examples-to-dts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ let examplesAdded = 0;
2828
* Add example URLs to a JSDocable node (e.g., variable statement or type alias)
2929
*/
3030
function addExamplesToNode(node: JSDocableNode, urlExamples: string[]): void {
31-
const jsDoc = node.getJsDocs()[0];
31+
const jsDoc = node.getJsDocs().at(0);
3232

3333
if (jsDoc) {
3434
// Add @example tags to existing JSDoc

0 commit comments

Comments
 (0)