getSelection may return null but type definition does not reflect this
Author: trrkCreated Sep 26, 2025Updated Sep 26, 2025
I noticed that getSelection can return null in the implementation, but the type definition in index.d.ts does not reflect this possibility.
Source code (shows possible null return): https://github.com/jspreadsheet/ce/blob/7668cf06a067476f430b5f10cacda77c989fdd3f/src/utils/selection.js#L672
Type definition (does not include null in its type): https://github.com/jspreadsheet/ce/blob/7668cf06a067476f430b5f10cacda77c989fdd3f/dist/index.d.ts#L1720
The type definition should be updated to indicate that getSelection may return null. For example:
getSelection: () => [number, number, number, number] | null;Source: jspreadsheet/ce