Skip to content

Commit 0bd01ca

Browse files
dario-piotrowiczatscott
authored andcommitted
refactor(core): move outdated comment to view.ts (angular#44099)
remove the comment suggesting to use a const enum for ViewEncapsulation in the renderer3/definitions.ts file and add a similar comment in the view.ts file in which the enum is defined Note: the new comment does not contain the suggestion of changing `None` to `0` as it is unclear what benefits that would bring (for more info see: angular#44099 (comment)) PR Close angular#44099
1 parent 4809bbd commit 0bd01ca

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/core/src/metadata/view.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
* @publicApi
2020
*/
2121
export enum ViewEncapsulation {
22+
// TODO: consider making `ViewEncapsulation` a `const enum` instead. See
23+
// https://github.com/angular/angular/issues/44119 for additional information.
24+
2225
/**
2326
* Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host
2427
* Element and pre-processing the style rules provided via {@link Component#styles styles} or

packages/core/src/render3/definition.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,6 @@ export function ɵɵdefineComponent<T>(componentDefinition: {
315315
viewQuery: componentDefinition.viewQuery || null,
316316
features: componentDefinition.features as DirectiveDefFeature[] || null,
317317
data: componentDefinition.data || {},
318-
// TODO(misko): convert ViewEncapsulation into const enum so that it can be used
319-
// directly in the next line. Also `None` should be 0 not 2.
320318
encapsulation: componentDefinition.encapsulation || ViewEncapsulation.Emulated,
321319
id: 'c',
322320
styles: componentDefinition.styles || EMPTY_ARRAY,

0 commit comments

Comments
 (0)