Migrated all service providers to typescript

This commit is contained in:
Alejandro Celaya
2020-08-23 09:03:44 +02:00
parent 2eba607874
commit e193a692e8
10 changed files with 32 additions and 21 deletions

View File

@@ -1,11 +1,12 @@
import axios from 'axios';
import Bottle from 'bottlejs';
import { useStateFlagTimeout } from '../helpers/hooks';
import Storage from './Storage';
import ColorGenerator from './ColorGenerator';
import buildShlinkApiClient from './ShlinkApiClientBuilder';
const provideServices = (bottle) => {
bottle.constant('localStorage', global.localStorage);
const provideServices = (bottle: Bottle) => {
bottle.constant('localStorage', (global as any).localStorage);
bottle.service('Storage', Storage, 'localStorage');
bottle.service('ColorGenerator', ColorGenerator, 'Storage');