1
- import { Inject , InjectionToken , Provider } from '@angular/core' ;
1
+ import { Inject , InjectionToken , Provider } from '@angular/core' ;
2
2
3
3
/**
4
4
* Guard to make sure we have single initialization of forRoot
@@ -29,17 +29,17 @@ export namespace CacheMechanism {
29
29
* Boolean to indicate whether to use cached language value
30
30
* @type {InjectionToken<boolean> }
31
31
*/
32
- export const USE_CACHED_LANG = new InjectionToken ( 'USE_CACHED_LANG' ) ;
32
+ export const USE_CACHED_LANG = new InjectionToken < boolean > ( 'USE_CACHED_LANG' ) ;
33
33
/**
34
34
* Cache mechanism type
35
35
* @type {InjectionToken<CacheMechanism> }
36
36
*/
37
- export const CACHE_MECHANISM = new InjectionToken ( 'CACHE_MECHANISM' ) ;
37
+ export const CACHE_MECHANISM = new InjectionToken < CacheMechanism > ( 'CACHE_MECHANISM' ) ;
38
38
/**
39
39
* Cache name
40
40
* @type {InjectionToken<string> }
41
41
*/
42
- export const CACHE_NAME = new InjectionToken ( 'CACHE_NAME' ) ;
42
+ export const CACHE_NAME = new InjectionToken < string > ( 'CACHE_NAME' ) ;
43
43
44
44
/**
45
45
* Type for default language function
@@ -51,13 +51,13 @@ export type DefaultLanguageFunction = (languages: string[], cachedLang?: string,
51
51
* Function for calculating default language
52
52
* @type {InjectionToken<DefaultLanguageFunction> }
53
53
*/
54
- export const DEFAULT_LANG_FUNCTION = new InjectionToken ( 'DEFAULT_LANG_FUNCTION' ) ;
54
+ export const DEFAULT_LANG_FUNCTION = new InjectionToken < DefaultLanguageFunction > ( 'DEFAULT_LANG_FUNCTION' ) ;
55
55
56
56
/**
57
57
* Boolean to indicate whether prefix should be set for single language scenarios
58
58
* @type {InjectionToken<boolean> }
59
59
*/
60
- export const ALWAYS_SET_PREFIX = new InjectionToken ( 'ALWAYS_SET_PREFIX' ) ;
60
+ export const ALWAYS_SET_PREFIX = new InjectionToken < boolean > ( 'ALWAYS_SET_PREFIX' ) ;
61
61
62
62
/**
63
63
* Config interface for LocalizeRouter
0 commit comments