mirror of https://github.com/vector-im/riot-web
Update dependency typescript to v5.6.2 (#71)
* Update dependency typescript to v5.6.2 * Fix TS errors --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Florian Duros <florian.duros@ormaz.fr>pull/28192/head
parent
34d1875534
commit
81192f6989
|
@ -235,7 +235,7 @@
|
|||
"stylelint-config-standard": "^36.0.0",
|
||||
"stylelint-scss": "^6.0.0",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "5.5.4",
|
||||
"typescript": "5.6.2",
|
||||
"web-streams-polyfill": "^4.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
|
|
@ -32,7 +32,7 @@ export const parseGeoUri = (uri: string): GeolocationCoordinates | undefined =>
|
|||
return;
|
||||
}
|
||||
|
||||
return {
|
||||
const geoCoords = {
|
||||
latitude: latitude!,
|
||||
longitude: longitude!,
|
||||
altitude: parse(coords[2]),
|
||||
|
@ -41,4 +41,9 @@ export const parseGeoUri = (uri: string): GeolocationCoordinates | undefined =>
|
|||
heading: null,
|
||||
speed: null,
|
||||
};
|
||||
|
||||
return {
|
||||
toJSON: () => geoCoords,
|
||||
...geoCoords,
|
||||
};
|
||||
};
|
||||
|
|
|
@ -110,19 +110,20 @@ export const makeGeolocationPosition = ({
|
|||
}: {
|
||||
timestamp?: number;
|
||||
coords?: Partial<GeolocationCoordinates>;
|
||||
}): GeolocationPosition => ({
|
||||
timestamp: timestamp ?? 1647256791840,
|
||||
coords: {
|
||||
accuracy: 1,
|
||||
latitude: 54.001927,
|
||||
longitude: -8.253491,
|
||||
altitude: null,
|
||||
altitudeAccuracy: null,
|
||||
heading: null,
|
||||
speed: null,
|
||||
...coords,
|
||||
},
|
||||
});
|
||||
}): GeolocationPosition =>
|
||||
({
|
||||
timestamp: timestamp ?? 1647256791840,
|
||||
coords: {
|
||||
accuracy: 1,
|
||||
latitude: 54.001927,
|
||||
longitude: -8.253491,
|
||||
altitude: null,
|
||||
altitudeAccuracy: null,
|
||||
heading: null,
|
||||
speed: null,
|
||||
...coords,
|
||||
},
|
||||
}) as unknown as GeolocationPosition;
|
||||
|
||||
/**
|
||||
* Creates a basic mock of Geolocation
|
||||
|
|
|
@ -38,6 +38,7 @@ describe("parseGeoUri", () => {
|
|||
altitudeAccuracy: null,
|
||||
heading: null,
|
||||
speed: null,
|
||||
toJSON: expect.any(Function),
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -50,6 +51,7 @@ describe("parseGeoUri", () => {
|
|||
altitudeAccuracy: null,
|
||||
heading: null,
|
||||
speed: null,
|
||||
toJSON: expect.any(Function),
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -62,6 +64,7 @@ describe("parseGeoUri", () => {
|
|||
altitudeAccuracy: null,
|
||||
heading: null,
|
||||
speed: null,
|
||||
toJSON: expect.any(Function),
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -74,6 +77,7 @@ describe("parseGeoUri", () => {
|
|||
altitudeAccuracy: null,
|
||||
heading: null,
|
||||
speed: null,
|
||||
toJSON: expect.any(Function),
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -86,6 +90,7 @@ describe("parseGeoUri", () => {
|
|||
altitudeAccuracy: null,
|
||||
heading: null,
|
||||
speed: null,
|
||||
toJSON: expect.any(Function),
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -98,6 +103,7 @@ describe("parseGeoUri", () => {
|
|||
altitudeAccuracy: null,
|
||||
heading: null,
|
||||
speed: null,
|
||||
toJSON: expect.any(Function),
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -110,6 +116,7 @@ describe("parseGeoUri", () => {
|
|||
altitudeAccuracy: null,
|
||||
heading: null,
|
||||
speed: null,
|
||||
toJSON: expect.any(Function),
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -122,6 +129,7 @@ describe("parseGeoUri", () => {
|
|||
altitudeAccuracy: null,
|
||||
heading: null,
|
||||
speed: null,
|
||||
toJSON: expect.any(Function),
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -134,6 +142,7 @@ describe("parseGeoUri", () => {
|
|||
altitudeAccuracy: null,
|
||||
heading: null,
|
||||
speed: null,
|
||||
toJSON: expect.any(Function),
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9246,10 +9246,10 @@ typed-array-length@^1.0.6:
|
|||
is-typed-array "^1.1.13"
|
||||
possible-typed-array-names "^1.0.0"
|
||||
|
||||
typescript@5.5.4:
|
||||
version "5.5.4"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba"
|
||||
integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==
|
||||
typescript@5.6.2:
|
||||
version "5.6.2"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.2.tgz#d1de67b6bef77c41823f822df8f0b3bcff60a5a0"
|
||||
integrity sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==
|
||||
|
||||
ua-parser-js@^1.0.2:
|
||||
version "1.0.38"
|
||||
|
|
Loading…
Reference in New Issue