@@ -6,15 +6,14 @@ import {clamp, smoothstep} from '../../util/util';
66import type Projection from './projection' ;
77import type Transform from '../transform' ;
88
9- export default function getProjectionAdjustments ( transform : Transform , withoutRotation ?: boolean ) : Array < number > {
9+ export default function getProjectionAdjustments ( transform : Transform , withoutRotation ?: boolean ) : number [ ] {
1010 const interpT = getProjectionInterpolationT ( transform . projection , transform . zoom , transform . width , transform . height ) ;
1111 const matrix = getShearAdjustment ( transform . projection , transform . zoom , transform . center , interpT , withoutRotation ) ;
1212
1313 const scaleAdjustment = getScaleAdjustment ( transform ) ;
1414 mat4 . scale ( matrix , matrix , [ scaleAdjustment , scaleAdjustment , 1 ] ) ;
1515
16- // @ts -expect-error - TS2322 - Type 'mat4' is not assignable to type 'number[]'.
17- return matrix ;
16+ return matrix as number [ ] ;
1817}
1918
2019export function getScaleAdjustment ( transform : Transform ) : number {
@@ -26,12 +25,12 @@ export function getScaleAdjustment(transform: Transform): number {
2625 return scaleAdjustment ;
2726}
2827
29- export function getProjectionAdjustmentInverted ( transform : Transform ) : Array < number > {
28+ export function getProjectionAdjustmentInverted ( transform : Transform ) : number [ ] {
3029 const m = getProjectionAdjustments ( transform , true ) ;
31- // @ts -expect-error - TS2322 - Type 'mat2' is not assignable to type 'number[]'.
32- return mat2 . invert ( [ ] as any , [
30+ return mat2 . invert ( [ ] as unknown as mat2 , [
3331 m [ 0 ] , m [ 1 ] ,
34- m [ 4 ] , m [ 5 ] ] ) ;
32+ m [ 4 ] , m [ 5 ] ]
33+ ) as number [ ] ;
3534}
3635
3736export function getProjectionInterpolationT (
0 commit comments