Improve Typescript types definitions (#1333)

This commit is contained in:
Maxim 2021-02-08 22:54:10 +03:00 committed by Xiaoji Chen
parent 9484e93459
commit 1335567775
7 changed files with 23 additions and 19 deletions

View File

@ -53,7 +53,7 @@
"mjolnir.js": "^2.5.0",
"prop-types": "^15.7.2",
"resize-observer-polyfill": "^1.5.1",
"viewport-mercator-project": "^6.2.3 || ^7.0.1"
"viewport-mercator-project": "^6.2.3 || ^7.0.2"
},
"devDependencies": {
"@babel/plugin-proposal-class-properties": "^7.4.4",

View File

@ -47,7 +47,7 @@ export default class Mapbox {
height: number;
constructor(props: MapboxProps);
finalize();
setProps(props: MapboxProps);
finalize(): Mapbox;
setProps(props: MapboxProps): Mapbox;
getMap(): any;
}

View File

@ -1,3 +1,3 @@
import type {ViewState} from '../mapbox/mapbox';
export function checkVisibilityConstraints(props: ViewState, constraints?: any);
export function checkVisibilityConstraints(props: ViewState, constraints?: any): boolean;

View File

@ -56,5 +56,5 @@ export default class MapController {
setOptions(options: any): void;
toggleEvents(eventNames: Array<string>, enabled: boolean);
toggleEvents(eventNames: Array<string>, enabled: boolean): void;
}

1
src/utils/set-rtl-text-plugin.d.ts vendored Normal file
View File

@ -0,0 +1 @@
export default function setRTLTextPlugin(pluginURL: string, callback?: (error: Error) => void, deferred?: boolean): void

3
src/utils/transition/index.d.ts vendored Normal file
View File

@ -0,0 +1,3 @@
export {default as TransitionInterpolator} from './transition-interpolator';
export {default as ViewportFlyToInterpolator} from './viewport-fly-to-interpolator';
export {default as LinearInterpolator} from './linear-interpolator';

View File

@ -1059,10 +1059,10 @@
core-js-pure "^3.0.0"
regenerator-runtime "^0.13.4"
"@babel/runtime@^7.0.0", "@babel/runtime@^7.8.4":
version "7.9.6"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.9.6.tgz#a9102eb5cadedf3f31d08a9ecf294af7827ea29f"
integrity sha512-64AF1xY3OAkFHqOb9s4jpgk1Mm5vDZ4L3acHvAml+53nO1XbXLuDodsVpO4OIUsmemlUHMxNdYMNJmsvOwLrvQ==
"@babel/runtime@^7.0.0", "@babel/runtime@^7.12.0", "@babel/runtime@^7.8.4":
version "7.12.13"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.13.tgz#0a21452352b02542db0ffb928ac2d3ca7cb6d66d"
integrity sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==
dependencies:
regenerator-runtime "^0.13.4"
@ -1941,12 +1941,12 @@
resolved "https://registry.yarnpkg.com/@mapbox/whoots-js/-/whoots-js-3.1.0.tgz#497c67a1cef50d1a2459ba60f315e448d2ad87fe"
integrity sha512-Es6WcD0nO5l+2BOQS4uLfNPYQaNDfbot3X1XUoloz+x0mPDS3eeORZJl06HXjwBG1fOGwCRnzK88LMdxKRrd6Q==
"@math.gl/web-mercator@^3.1.3":
version "3.1.3"
resolved "https://registry.yarnpkg.com/@math.gl/web-mercator/-/web-mercator-3.1.3.tgz#3a6b2aeb6c68b331f26269c2fa1905cacc40e84b"
integrity sha512-aU+3upxkdA9yObA7EudfEKfN/QH4o5impyc7s/a34J2hZKPsihgREphxnKzl2RknXD/KoL7MnQv589LToAJGMQ==
"@math.gl/web-mercator@^3.2.0":
version "3.4.2"
resolved "https://registry.yarnpkg.com/@math.gl/web-mercator/-/web-mercator-3.4.2.tgz#72c7c7e698bcf8d1d1d60c0ec4c5a4698c9b960e"
integrity sha512-Az/WI8vxbqnrTEcYgqDQ3CgCRoFA2a4XT9mkjVrT7iIlfrUF5lrIXcmpljjKvoFNBldKrng7hFSeHHM2ghgSrg==
dependencies:
"@babel/runtime" "^7.0.0"
"@babel/runtime" "^7.12.0"
gl-matrix "^3.0.0"
"@mrmlnc/readdir-enhanced@^2.2.1":
@ -10534,12 +10534,12 @@ verror@1.10.0:
core-util-is "1.0.2"
extsprintf "^1.2.0"
"viewport-mercator-project@^6.2.3 || ^7.0.1":
version "7.0.1"
resolved "https://registry.yarnpkg.com/viewport-mercator-project/-/viewport-mercator-project-7.0.1.tgz#9d7248072f2cbb122f93b63d2b346a5763b8d79a"
integrity sha512-WKTuTL7o6WKdPQ+gmZhlXL7UpSdCdPUjxkDTBd/3AayBdAFSQGHxsqdbmPBvmoGwvo9KWo/30HTkNo/Z7ORJpw==
"viewport-mercator-project@^6.2.3 || ^7.0.2":
version "7.0.2"
resolved "https://registry.yarnpkg.com/viewport-mercator-project/-/viewport-mercator-project-7.0.2.tgz#8b37ae5614be139010631fde14d1583cf742abaf"
integrity sha512-gH0pBO4Y5McGCPaKulkpL9MPDg+wtOSXtndwh0467T/WLMerfBi7EkHYw1pp9HE2VeqFqUaAfot98cQPGaIjEA==
dependencies:
"@math.gl/web-mercator" "^3.1.3"
"@math.gl/web-mercator" "^3.2.0"
vm-browserify@^1.0.1:
version "1.1.2"