fix typescript

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2020-04-12 01:54:48 +01:00
parent 8fdb41412f
commit c044e1a00c

View File

@ -14,8 +14,12 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
interface IParamsObject {
[key: string]: string;
}
function searchParamsToObject(params: URLSearchParams) {
return Object.fromEntries([...params.entries()]);
return <IParamsObject>Object.fromEntries([...params.entries()]);
}
// We want to support some name / value pairs in the fragment
@ -34,7 +38,7 @@ export function parseQsFromFragment(location: Location) {
const result = {
location: decodeURIComponent(hashparts[0]),
params: {},
params: <IParamsObject>{},
};
if (hashparts.length > 1) {