aboutsummaryrefslogtreecommitdiffstats
path: root/svg.js.d.ts
diff options
context:
space:
mode:
authorGlandos <bugs-github@antipoul.fr>2021-11-05 10:12:50 +0100
committerGitHub <noreply@github.com>2021-11-05 10:12:50 +0100
commitb0916dc1836251d36536d42ccd1c75a18d213abd (patch)
tree9add1c7a66ed45900a7c9e45cc85899c5e1c3838 /svg.js.d.ts
parentfc17a7594c638f3b3e6a65976826589ec2f89a07 (diff)
downloadsvg.js-b0916dc1836251d36536d42ccd1c75a18d213abd.tar.gz
svg.js-b0916dc1836251d36536d42ccd1c75a18d213abd.zip
findOne can return null
This can be a breaking change. But it will also fix the contract of the method.
Diffstat (limited to 'svg.js.d.ts')
-rw-r--r--svg.js.d.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/svg.js.d.ts b/svg.js.d.ts
index bfcd199..1d970b4 100644
--- a/svg.js.d.ts
+++ b/svg.js.d.ts
@@ -33,7 +33,7 @@ declare module "@svgdotjs/svg.js" {
function dispatch(node: Node | Window, event: Event, data?: object, options?: object): Event
function find(query: QuerySelector): List<Element>
- function findOne(query: QuerySelector): Element
+ function findOne(query: QuerySelector): Element | null
function getWindow(): Window;
function registerWindow(win: Window, doc: Document): void;
@@ -990,7 +990,7 @@ declare module "@svgdotjs/svg.js" {
// prototype extend Selector in selector.js
find(query: string): List<Element>
- findOne(query: string): Dom
+ findOne(query: string): Dom | null
// prototype method register in data.js
data(a: string): object | string | number