Improve some null types for strictNullChecks

This commit is contained in:
EvertEt
2022-02-06 19:35:41 +01:00
parent 459cd51ae2
commit 25e1d6c5d6
17 changed files with 37 additions and 37 deletions
+1 -1
View File
@@ -166,7 +166,7 @@ class LineString extends SimpleGeometry {
*
* @param {number} m M.
* @param {boolean} [opt_extrapolate] Extrapolate. Default is `false`.
* @return {import("../coordinate.js").Coordinate} Coordinate.
* @return {import("../coordinate.js").Coordinate|null} Coordinate.
* @api
*/
getCoordinateAtM(m, opt_extrapolate) {
+1 -1
View File
@@ -169,7 +169,7 @@ class MultiLineString extends SimpleGeometry {
* @param {number} m M.
* @param {boolean} [opt_extrapolate] Extrapolate. Default is `false`.
* @param {boolean} [opt_interpolate] Interpolate. Default is `false`.
* @return {import("../coordinate.js").Coordinate} Coordinate.
* @return {import("../coordinate.js").Coordinate|null} Coordinate.
* @api
*/
getCoordinateAtM(m, opt_extrapolate, opt_interpolate) {
+1 -1
View File
@@ -275,7 +275,7 @@ class Polygon extends SimpleGeometry {
* at index `1` and beyond.
*
* @param {number} index Index.
* @return {LinearRing} Linear ring.
* @return {LinearRing|null} Linear ring.
* @api
*/
getLinearRing(index) {
+2 -2
View File
@@ -74,7 +74,7 @@ export function interpolatePoint(
* @param {number} stride Stride.
* @param {number} m M.
* @param {boolean} extrapolate Extrapolate.
* @return {import("../../coordinate.js").Coordinate} Coordinate.
* @return {import("../../coordinate.js").Coordinate|null} Coordinate.
*/
export function lineStringCoordinateAtM(
flatCoordinates,
@@ -147,7 +147,7 @@ export function lineStringCoordinateAtM(
* @param {number} m M.
* @param {boolean} extrapolate Extrapolate.
* @param {boolean} interpolate Interpolate.
* @return {import("../../coordinate.js").Coordinate} Coordinate.
* @return {import("../../coordinate.js").Coordinate|null} Coordinate.
*/
export function lineStringsCoordinateAtM(
flatCoordinates,
+1 -1
View File
@@ -17,7 +17,7 @@ import {rotate} from './transform.js';
* @param {string} font The font.
* @param {Object<string, number>} cache A cache of measured widths.
* @param {number} rotation Rotation to apply to the flatCoordinates to determine whether text needs to be reversed.
* @return {Array<Array<*>>} The result array (or null if `maxAngle` was
* @return {Array<Array<*>>|null} The result array (or null if `maxAngle` was
* exceeded). Entries of the array are x, y, anchorX, angle, chunk.
*/
export function drawTextOnPath(