refactor: remove ts2dart annotations
This commit is contained in:
@ -9,8 +9,8 @@
|
||||
import {BaseException, unimplemented} from '../facade/exceptions';
|
||||
import {stringify} from '../facade/lang';
|
||||
|
||||
const _THROW_IF_NOT_FOUND = /*@ts2dart_const*/ new Object();
|
||||
export const THROW_IF_NOT_FOUND = /*@ts2dart_const*/ _THROW_IF_NOT_FOUND;
|
||||
const _THROW_IF_NOT_FOUND = new Object();
|
||||
export const THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;
|
||||
|
||||
class _NullInjector implements Injector {
|
||||
get(token: any, notFoundValue: any = _THROW_IF_NOT_FOUND): any {
|
||||
|
@ -47,7 +47,6 @@ import {stringify} from '../facade/lang';
|
||||
* var injector = Injector.resolveAndCreate([Engine, Car]);
|
||||
* expect(injector.get(Car).engine instanceof Engine).toBe(true);
|
||||
* ```
|
||||
* @ts2dart_const
|
||||
* @stable
|
||||
*/
|
||||
export class InjectMetadata {
|
||||
@ -75,7 +74,6 @@ export class InjectMetadata {
|
||||
* var injector = Injector.resolveAndCreate([Car]);
|
||||
* expect(injector.get(Car).engine).toBeNull();
|
||||
* ```
|
||||
* @ts2dart_const
|
||||
* @stable
|
||||
*/
|
||||
export class OptionalMetadata {
|
||||
@ -85,7 +83,6 @@ export class OptionalMetadata {
|
||||
/**
|
||||
* `DependencyMetadata` is used by the framework to extend DI.
|
||||
* This is internal to Angular and should not be used directly.
|
||||
* @ts2dart_const
|
||||
* @stable
|
||||
*/
|
||||
export class DependencyMetadata {
|
||||
@ -122,7 +119,6 @@ export class DependencyMetadata {
|
||||
* var injector = Injector.resolveAndCreate([NeedsService, UsefulService]);
|
||||
* expect(() => injector.get(NeedsService)).toThrowError();
|
||||
* ```
|
||||
* @ts2dart_const
|
||||
* @stable
|
||||
*/
|
||||
export class InjectableMetadata {
|
||||
@ -155,7 +151,6 @@ export class InjectableMetadata {
|
||||
* var child = inj.resolveAndCreateChild([NeedsDependency]);
|
||||
* expect(() => child.get(NeedsDependency)).toThrowError();
|
||||
* ```
|
||||
* @ts2dart_const
|
||||
* @stable
|
||||
*/
|
||||
export class SelfMetadata {
|
||||
@ -186,7 +181,6 @@ export class SelfMetadata {
|
||||
* var inj = Injector.resolveAndCreate([Dependency, NeedsDependency]);
|
||||
* expect(() => inj.get(NeedsDependency)).toThrowError();
|
||||
* ```
|
||||
* @ts2dart_const
|
||||
* @stable
|
||||
*/
|
||||
export class SkipSelfMetadata {
|
||||
@ -246,7 +240,6 @@ export class SkipSelfMetadata {
|
||||
*
|
||||
* bootstrap(App);
|
||||
*```
|
||||
* @ts2dart_const
|
||||
* @stable
|
||||
*/
|
||||
export class HostMetadata {
|
||||
|
@ -26,7 +26,6 @@
|
||||
*
|
||||
* Using an `OpaqueToken` is preferable to using an `Object` as tokens because it provides better
|
||||
* error messages.
|
||||
* @ts2dart_const
|
||||
* @stable
|
||||
*/
|
||||
export class OpaqueToken {
|
||||
|
@ -24,7 +24,6 @@ import {Type, isBlank, isFunction, isType, normalizeBool, stringify} from '../fa
|
||||
*
|
||||
* expect(injector.get("message")).toEqual('Hello');
|
||||
* ```
|
||||
* @ts2dart_const
|
||||
* @deprecated
|
||||
*/
|
||||
export class Provider {
|
||||
@ -211,7 +210,6 @@ export class Provider {
|
||||
* See {@link Provider} instead.
|
||||
*
|
||||
* @deprecated
|
||||
* @ts2dart_const
|
||||
*/
|
||||
export class Binding extends Provider {
|
||||
constructor(token: any, {toClass, toValue, toAlias, toFactory, deps, multi}: {
|
||||
|
@ -21,7 +21,7 @@ var __unused: Type; // avoid unused import when Type union types are erased
|
||||
|
||||
// Threshold for the dynamic version
|
||||
const _MAX_CONSTRUCTION_COUNTER = 10;
|
||||
const UNDEFINED = /*@ts2dart_const*/ new Object();
|
||||
const UNDEFINED = new Object();
|
||||
|
||||
export interface ReflectiveProtoInjectorStrategy {
|
||||
getProviderAtIndex(index: number): ResolvedReflectiveProvider;
|
||||
@ -629,7 +629,7 @@ export class ReflectiveInjector_ implements ReflectiveInjector {
|
||||
*/
|
||||
debugContext(): any { return this._debugContext(); }
|
||||
|
||||
get(token: any, notFoundValue: any = /*@ts2dart_const*/ THROW_IF_NOT_FOUND): any {
|
||||
get(token: any, notFoundValue: any = THROW_IF_NOT_FOUND): any {
|
||||
return this._getByKey(ReflectiveKey.get(token), null, null, notFoundValue);
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ export class ReflectiveDependency {
|
||||
}
|
||||
}
|
||||
|
||||
const _EMPTY_LIST: any[] = /*@ts2dart_const*/[];
|
||||
const _EMPTY_LIST: any[] = [];
|
||||
|
||||
/**
|
||||
* An internal resolved representation of a {@link Provider} used by the {@link Injector}.
|
||||
|
Reference in New Issue
Block a user