diff options
author | Glandos <bugs-github@antipoul.fr> | 2021-11-05 10:12:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-05 10:12:50 +0100 |
commit | b0916dc1836251d36536d42ccd1c75a18d213abd (patch) | |
tree | 9add1c7a66ed45900a7c9e45cc85899c5e1c3838 | |
parent | fc17a7594c638f3b3e6a65976826589ec2f89a07 (diff) | |
download | svg.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.
-rw-r--r-- | svg.js.d.ts | 4 |
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
|