refactor(upgrade): add missing Angular 1 type info
This commit is contained in:
parent
a659259962
commit
79671a6f12
|
@ -23,6 +23,7 @@ export interface IModule {
|
||||||
controller(name: string, type: IInjectable): IModule;
|
controller(name: string, type: IInjectable): IModule;
|
||||||
factory(key: Ng1Token, factoryFn: IInjectable): IModule;
|
factory(key: Ng1Token, factoryFn: IInjectable): IModule;
|
||||||
value(key: Ng1Token, value: any): IModule;
|
value(key: Ng1Token, value: any): IModule;
|
||||||
|
constant(token: Ng1Token, value: any): IModule;
|
||||||
run(a: IInjectable): IModule;
|
run(a: IInjectable): IModule;
|
||||||
}
|
}
|
||||||
export interface ICompileService {
|
export interface ICompileService {
|
||||||
|
@ -42,6 +43,7 @@ export interface IRootScopeService {
|
||||||
$parent: IScope;
|
$parent: IScope;
|
||||||
$root: IScope;
|
$root: IScope;
|
||||||
$watch(expr: any, fn?: (a1?: any, a2?: any) => void): Function;
|
$watch(expr: any, fn?: (a1?: any, a2?: any) => void): Function;
|
||||||
|
$on(event: string, fn?: (event?: any, ...args: any[]) => void): Function;
|
||||||
$destroy(): any;
|
$destroy(): any;
|
||||||
$apply(): any;
|
$apply(): any;
|
||||||
$apply(exp: string): any;
|
$apply(exp: string): any;
|
||||||
|
@ -118,6 +120,7 @@ export type IAugmentedJQuery = Node[] & {
|
||||||
append?: (content: IAugmentedJQuery | string) => IAugmentedJQuery;
|
append?: (content: IAugmentedJQuery | string) => IAugmentedJQuery;
|
||||||
controller?: (name: string) => any;
|
controller?: (name: string) => any;
|
||||||
isolateScope?: () => IScope;
|
isolateScope?: () => IScope;
|
||||||
|
injector?: () => IInjectorService;
|
||||||
};
|
};
|
||||||
export interface IProvider { $get: IInjectable; }
|
export interface IProvider { $get: IInjectable; }
|
||||||
export interface IProvideService {
|
export interface IProvideService {
|
||||||
|
|
|
@ -333,7 +333,7 @@ export class UpgradeAdapter {
|
||||||
.value(NG2_COMPONENT_FACTORY_REF_MAP, componentFactoryRefMap)
|
.value(NG2_COMPONENT_FACTORY_REF_MAP, componentFactoryRefMap)
|
||||||
.config([
|
.config([
|
||||||
'$provide', '$injector',
|
'$provide', '$injector',
|
||||||
(provide: any /** TODO #???? */, ng1Injector: angular.IInjectorService) => {
|
(provide: angular.IProvideService, ng1Injector: angular.IInjectorService) => {
|
||||||
provide.decorator(NG1_ROOT_SCOPE, [
|
provide.decorator(NG1_ROOT_SCOPE, [
|
||||||
'$delegate',
|
'$delegate',
|
||||||
function(rootScopeDelegate: angular.IRootScopeService) {
|
function(rootScopeDelegate: angular.IRootScopeService) {
|
||||||
|
|
Loading…
Reference in New Issue