mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Type updates for TS 4.1
TS 4.1 changes the name of some DOM types. This PR updates those names.
This commit is contained in:
parent
f621a2d639
commit
6704aeed49
@ -3,7 +3,7 @@ import "baidumap-web-sdk";
|
||||
class TestFixture {
|
||||
// document: http://lbsyun.baidu.com/index.php?title=jspopular3.0
|
||||
createMap(container: string | HTMLElement) {
|
||||
navigator.geolocation.getCurrentPosition((position: Position) => {
|
||||
navigator.geolocation.getCurrentPosition((position: GeolocationPosition) => {
|
||||
const point = new BMap.Point(position.coords.longitude, position.coords.latitude);
|
||||
const map = new BMap.Map(container);
|
||||
map.centerAndZoom(point, 15);
|
||||
|
||||
1
types/baidumap-web-sdk/index.d.ts
vendored
1
types/baidumap-web-sdk/index.d.ts
vendored
@ -3,6 +3,7 @@
|
||||
// Definitions by: Codemonk <http://www.youxianxueche.com/>
|
||||
// ipcjs <https://github.com/ipcjs>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// Minimum TypeScript Version: 4.1
|
||||
|
||||
/* *****************************************************************************
|
||||
Copyright [Codemonk] [Codemonk@live.cn]
|
||||
|
||||
@ -3,7 +3,7 @@ import "bmapgl";
|
||||
class TestFixture {
|
||||
// document: http://lbsyun.baidu.com/index.php?title=jspopularGL
|
||||
createMap(container: string | HTMLElement) {
|
||||
navigator.geolocation.getCurrentPosition((position: Position) => {
|
||||
navigator.geolocation.getCurrentPosition((position: GeolocationPosition) => {
|
||||
const point = new BMapGL.Point(position.coords.longitude, position.coords.latitude);
|
||||
const map = new BMapGL.Map(container);
|
||||
map.centerAndZoom(point, 15);
|
||||
|
||||
1
types/bmapgl/index.d.ts
vendored
1
types/bmapgl/index.d.ts
vendored
@ -2,6 +2,7 @@
|
||||
// Project: http://lbsyun.baidu.com/index.php?title=jspopularGL
|
||||
// Definitions by: Junior2ran <http://github.com/Junior2ran>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// Minimum TypeScript Version: 4.1
|
||||
|
||||
/* *****************************************************************************
|
||||
Copyright [Junior2ran] [hdr01@126.com]
|
||||
|
||||
@ -9,10 +9,10 @@ if(isInit){
|
||||
alert("Functionality not available");
|
||||
}
|
||||
|
||||
function success_callback(position: Position): void {
|
||||
function success_callback(position: GeolocationPosition): void {
|
||||
geo_position_js.showMap(position.coords.latitude, position.coords.longitude);
|
||||
}
|
||||
|
||||
function error_callback(positionError: PositionError): void {
|
||||
function error_callback(positionError: GeolocationPositionError): void {
|
||||
console.log(positionError.code);
|
||||
}
|
||||
|
||||
5
types/google.geolocation/index.d.ts
vendored
5
types/google.geolocation/index.d.ts
vendored
@ -1,11 +1,12 @@
|
||||
// Type definitions for Google Geolocation 0.4.8
|
||||
// Project: https://code.google.com/p/geo-location-javascript/
|
||||
// Definitions by: Vincent Bortone <https://github.com/vbortone>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// Minimum TypeScript Version: 4.1
|
||||
|
||||
interface GeolocationStatic {
|
||||
init(): boolean;
|
||||
getCurrentPosition(success: (position: Position) => void, error?: (positionError: PositionError) => void, opts?: PositionOptions): void;
|
||||
getCurrentPosition(success: (position: GeolocationPosition) => void, error?: (positionError: GeolocationPositionError) => void, opts?: PositionOptions): void;
|
||||
showMap(latitude: number, longitude: number): void;
|
||||
}
|
||||
|
||||
|
||||
5
types/pkijs/index.d.ts
vendored
5
types/pkijs/index.d.ts
vendored
@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/PeculiarVentures/PKI.js
|
||||
// Definitions by: Stepan Miroshin <https://github.com/microshine>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
// Minimum TypeScript Version: 4.1
|
||||
|
||||
/// <reference types="asn1js" />
|
||||
/// <reference types="pvutils" />
|
||||
@ -662,8 +663,8 @@ declare module "pkijs/src/CryptoEngine" {
|
||||
verify(algorithm: string | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, signature: BufferSource, data: BufferSource): Promise<boolean>;
|
||||
wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier): Promise<ArrayBuffer>;
|
||||
decrypt(algorithm: string | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
|
||||
deriveBits(algorithm: string | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;
|
||||
deriveKey(algorithm: string | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, extractable: boolean, keyUsages: string[]): Promise<CryptoKey>;
|
||||
deriveBits(algorithm: string | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;
|
||||
deriveKey(algorithm: string | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: string[]): Promise<CryptoKey>;
|
||||
digest(algorithm: AlgorithmIdentifier, data: BufferSource): Promise<ArrayBuffer>;
|
||||
encrypt(algorithm: string | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
|
||||
}
|
||||
|
||||
5
types/rx-dom/index.d.ts
vendored
5
types/rx-dom/index.d.ts
vendored
@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/Reactive-Extensions/RxJS-DOM
|
||||
// Definitions by: oliver Weichhold <https://github.com/oliverw>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
// Minimum TypeScript Version: 4.1
|
||||
|
||||
import * as Rx from 'rx';
|
||||
|
||||
@ -132,8 +133,8 @@ declare module 'rx' {
|
||||
|
||||
// Geolocation
|
||||
namespace geolocation {
|
||||
function getCurrentPosition(geolocationOptions?: GeolocationOptions): Rx.Observable<Position>;
|
||||
function watchPosition(geolocationOptions?: GeolocationOptions): Rx.Observable<Position>;
|
||||
function getCurrentPosition(geolocationOptions?: GeolocationOptions): Rx.Observable<GeolocationPosition>;
|
||||
function watchPosition(geolocationOptions?: GeolocationOptions): Rx.Observable<GeolocationPosition>;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user