Skip to content

Commit

Permalink
fixing findOne result type
Browse files Browse the repository at this point in the history
  • Loading branch information
fxOne committed Jul 12, 2023
1 parent c1ba974 commit 7133abe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ export abstract class Container<
* return node.getType() === 'Shape'
* })
*/
findOne<ChildNode extends Node = Node>(selector: string | Function) {
findOne<ChildNode extends Node = Node>(selector: string | Function): ChildNode | undefined {
var result = this._generalFind<ChildNode>(selector, true);
return result.length > 0 ? result[0] : undefined;
}
Expand Down

0 comments on commit 7133abe

Please sign in to comment.