Skip to content

Commit b54e721

Browse files
committed
chore: removed angular2.api.ts
BREACKING CHANGE: We export InjectMetadata instead of InjectAnnotation
1 parent d6dadc6 commit b54e721

File tree

25 files changed

+255
-209
lines changed

25 files changed

+255
-209
lines changed

docs/dgeni-package/processors/createTypeDefinitionFile.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ module.exports = function createTypeDefinitionFile(log) {
1717
{
1818
id: 'angular2/angular2',
1919
modules: {
20-
// The shape of the public API is determined by what is reexported into
21-
// angular2/angular2, with hacks layered into angular2.api.ts
22-
'angular2/angular2': 'angular2/angular2.api',
20+
'angular2/angular2': 'angular2/angular2',
2321
}
2422
},
2523
{

modules/angular2/angular2.api.dart

Lines changed: 0 additions & 3 deletions
This file was deleted.

modules/angular2/angular2.api.ts

Lines changed: 0 additions & 24 deletions
This file was deleted.

modules/angular2/angular2.ts

Lines changed: 14 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -4,68 +4,31 @@
44
export * from 'angular2/annotations';
55
export * from 'angular2/core';
66

7-
// TO BE CLEANED UP.
87
export {
98
DehydratedException,
109
ExpressionChangedAfterItHasBeenChecked,
1110
ChangeDetectionError,
12-
ChangeDetection,
11+
1312
ON_PUSH,
1413
DEFAULT,
14+
1515
ChangeDetectorRef,
16+
1617
PipeRegistry,
1718
WrappedValue,
1819
Pipe,
1920
PipeFactory,
2021
NullPipe,
2122
NullPipeFactory,
2223
defaultPipes,
23-
DynamicChangeDetection,
24-
JitChangeDetection,
25-
PreGeneratedChangeDetection,
26-
preGeneratedProtoDetectors,
2724
defaultPipeRegistry,
28-
DirectiveIndex,
29-
BindingRecord,
30-
ProtoChangeDetector,
31-
ChangeDispatcher,
32-
ChangeDetector,
33-
Locals,
34-
ChangeDetectorDefinition,
3525
BasePipe,
36-
DirectiveRecord
26+
27+
Locals
3728
} from './change_detection';
3829

39-
export {
40-
Inject,
41-
Optional,
42-
Injectable,
43-
forwardRef,
44-
resolveForwardRef,
45-
ForwardRefFn,
46-
Injector,
47-
ProtoInjector,
48-
Binding,
49-
bind,
50-
Key,
51-
NoBindingError,
52-
AbstractBindingError,
53-
AsyncBindingError,
54-
CyclicDependencyError,
55-
InstantiationError,
56-
InvalidBindingError,
57-
NoAnnotationError,
58-
OpaqueToken,
59-
ResolvedBinding,
60-
BindingBuilder,
61-
Dependency,
62-
Visibility,
63-
Self,
64-
Parent,
65-
Ancestor,
66-
Unbounded,
67-
DependencyProvider
68-
} from './di';
30+
export * from './di';
31+
export * from './forms';
6932

7033
export * from './directives';
7134

@@ -95,5 +58,11 @@ export {
9558
} from './forms';
9659

9760
export * from './http';
98-
export * from 'angular2/src/render/api';
61+
export {
62+
EventDispatcher,
63+
Renderer,
64+
RenderElementRef,
65+
RenderViewRef,
66+
RenderProtoViewRef
67+
} from 'angular2/src/render/api';
9968
export {DomRenderer, DOCUMENT_TOKEN} from 'angular2/src/render/dom/dom_renderer';

modules/angular2/core.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export {Compiler} from 'angular2/src/core/compiler/compiler';
1717

1818
export {AppViewManager} from 'angular2/src/core/compiler/view_manager';
1919
export {QueryList} from 'angular2/src/core/compiler/query_list';
20+
export {BaseQueryList} from 'angular2/src/core/compiler/base_query_list';
2021
export {ElementRef} from 'angular2/src/core/compiler/element_ref';
2122
export {RenderElementRef} from 'angular2/src/render/api';
2223
export {ViewRef, ProtoViewRef} from 'angular2/src/core/compiler/view_ref';

modules/angular2/di.ts

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,22 @@
66
*/
77

88
export {
9-
InjectAnnotation,
10-
OptionalAnnotation,
11-
InjectableAnnotation,
12-
DependencyAnnotation,
13-
VisibilityAnnotation,
14-
SelfAnnotation,
15-
ParentAnnotation,
16-
AncestorAnnotation,
17-
UnboundedAnnotation
18-
} from './src/di/annotations';
9+
InjectMetadata,
10+
OptionalMetadata,
11+
InjectableMetadata,
12+
VisibilityMetadata,
13+
SelfMetadata,
14+
ParentMetadata,
15+
AncestorMetadata,
16+
UnboundedMetadata,
17+
DependencyMetadata,
18+
self,
19+
unbounded
20+
} from './src/di/metadata';
21+
22+
// we have to reexport * because Dart and TS export two different sets of types
23+
export * from './src/di/decorators';
1924

20-
export {
21-
Inject,
22-
Optional,
23-
Injectable,
24-
Visibility,
25-
Self,
26-
Parent,
27-
Ancestor,
28-
Unbounded
29-
} from './src/di/decorators';
30-
export {self} from './src/di/annotations_impl';
3125
export {forwardRef, resolveForwardRef, ForwardRefFn} from './src/di/forward_ref';
3226
export {
3327
resolveBindings,
@@ -38,6 +32,7 @@ export {
3832
PUBLIC,
3933
PRIVATE,
4034
undefinedValue
35+
4136
} from './src/di/injector';
4237
export {Binding, BindingBuilder, ResolvedBinding, Dependency, bind} from './src/di/binding';
4338
export {Key, KeyRegistry, TypeLiteral} from './src/di/key';

modules/angular2/di_annotations.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

modules/angular2/di_metadata.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* @module
3+
* @public
4+
* @description
5+
* Metadata which control how the dependencies are resolved by the {@link Injector}.
6+
*/

modules/angular2/forms.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
export {AbstractControl, Control, ControlGroup, ControlArray} from './src/forms/model';
1717

1818
export {AbstractControlDirective} from './src/forms/directives/abstract_control_directive';
19+
export {Form} from './src/forms/directives/form_interface';
20+
export {ControlContainer} from './src/forms/directives/control_container';
1921
export {NgControlName} from './src/forms/directives/ng_control_name';
2022
export {NgFormControl} from './src/forms/directives/ng_form_control';
2123
export {NgModel} from './src/forms/directives/ng_model';

modules/angular2/src/core/annotations_impl/annotations.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {CONST, CONST_EXPR} from 'angular2/src/facade/lang';
22
import {List} from 'angular2/src/facade/collection';
3-
import {Injectable, self} from 'angular2/src/di/annotations_impl';
3+
import {InjectableMetadata, self} from 'angular2/src/di/metadata';
44
import {DEFAULT} from 'angular2/change_detection';
55

66
/**
@@ -407,7 +407,7 @@ import {DEFAULT} from 'angular2/change_detection';
407407
* @exportedAs angular2/annotations
408408
*/
409409
@CONST()
410-
export class Directive extends Injectable {
410+
export class Directive extends InjectableMetadata {
411411
/**
412412
* The CSS selector that triggers the instantiation of a directive.
413413
*

0 commit comments

Comments
 (0)