X Tutup
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/angular2/src/core/di.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export {
ResolvedProvider,
provide
} from './di/provider';
export {Key, TypeLiteral} from './di/key';
export {Key} from './di/key';
export {
NoProviderError,
AbstractProviderError,
Expand Down
10 changes: 0 additions & 10 deletions modules/angular2/src/core/di/key.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import {stringify, CONST, Type, isBlank} from 'angular2/src/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
import {TypeLiteral} from './type_literal';
import {resolveForwardRef} from './forward_ref';

export {TypeLiteral} from './type_literal';

/**
* A unique object used for retrieving items from the {@link Injector}.
*
Expand Down Expand Up @@ -53,13 +50,6 @@ export class KeyRegistry {
get(token: Object): Key {
if (token instanceof Key) return token;

// TODO: workaround for https://github.com/Microsoft/TypeScript/issues/3123
var theToken = token;
if (token instanceof TypeLiteral) {
theToken = token.type;
}
token = theToken;

if (this._allKeys.has(token)) {
return this._allKeys.get(token);
}
Expand Down
26 changes: 0 additions & 26 deletions modules/angular2/src/core/di/type_literal.dart

This file was deleted.

7 changes: 0 additions & 7 deletions modules/angular2/src/core/di/type_literal.ts

This file was deleted.

22 changes: 0 additions & 22 deletions modules/angular2/test/core/di/injector_dart_spec.dart

This file was deleted.

40 changes: 0 additions & 40 deletions modules/angular2/test/core/di/key_dart_spec.dart

This file was deleted.

34 changes: 0 additions & 34 deletions modules/angular2/test/core/linker/integration_dart_spec.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,27 +42,6 @@ void functionThatThrowsNonError() {
}

main() {
describe('TypeLiteral', () {
it(
'should publish via viewBindings',
inject([TestComponentBuilder, AsyncTestCompleter], (tb, async) {
tb
.overrideView(
Dummy,
new ViewMetadata(
template:
'<type-literal-component></type-literal-component>',
directives: [TypeLiteralComponent]))
.createAsync(Dummy)
.then((tc) {
tc.detectChanges();
expect(asNativeElements(tc.debugElement.children))
.toHaveText('[Hello, World]');
async.done();
});
}));
});

describe('Error handling', () {
it(
'should preserve Error stack traces thrown from components',
Expand Down Expand Up @@ -216,19 +195,6 @@ class Dummy {
dynamic value;
}

@Component(
selector: 'type-literal-component',
viewBindings: const [
const Binding(const TypeLiteral<List<String>>(),
toValue: const <String>['Hello', 'World'])
])
@View(template: '{{list}}')
class TypeLiteralComponent {
final List<String> list;

TypeLiteralComponent(this.list);
}

@Component(selector: 'throwing-component')
@View(template: '')
class ThrowingComponent {
Expand Down
2 changes: 0 additions & 2 deletions modules/angular2/test/public_api_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1291,8 +1291,6 @@ var NG_CORE = [
'GetTestability:dart',
'setTestabilityGetter()',
'Type:js',
'TypeLiteral',
'TypeLiteral.type',
'PACKAGE_ROOT_URL',
'View',
'View.directives',
Expand Down
2 changes: 0 additions & 2 deletions tools/public_api_guard/public_api_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,6 @@ const CORE = [
'TypeDecorator',
'TypeDecorator.Class(obj:ClassDefinition):ConcreteType',
'TypeDecorator.annotations:any[]',
'TypeLiteral',
'TypeLiteral.type:any',
'ViewChildFactory',
'ViewChildMetadata',
'ViewChildMetadata.constructor(_selector:Type|string)',
Expand Down
X Tutup