Skip to content

Commit a6f503f

Browse files
author
Ben Grynhaus
committed
Use symbol instead of plain string for ReactContent key
# Conflicts: # libs/core/src/lib/renderer/react-content.ts
1 parent b155012 commit a6f503f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libs/core/src/lib/renderer/react-content.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as React from 'react';
22
import * as ReactDOM from 'react-dom';
33

44
const DEBUG = false;
5-
export const CHILDREN_TO_APPEND_PROP = 'children-to-append'; // TODO: Change to Symbol('children-to-append') after upgrade to TS 2.7.
5+
export const CHILDREN_TO_APPEND_PROP = Symbol('children-to-append');
66

77
/**
88
* Props that can be passed to `ReactContent` from users.
@@ -19,7 +19,7 @@ export interface ExternalReactContentProps {
1919
// NOTE: Separated into `ExternalReactContentProps` since We only want a subset of props to be exposed to external users.
2020
// With Omit type (TS 2.8) we can simply have `type ExternalReactContentProps = Omit<ReactContentProps, 'children-to-append'>`
2121
export interface ReactContentProps extends ExternalReactContentProps {
22-
readonly 'children-to-append': HTMLElement[]; // TODO: use CHILDREN_TO_APPEND_PROP after upgrade to TS 2.7.
22+
readonly [CHILDREN_TO_APPEND_PROP]: HTMLElement[];
2323
}
2424

2525
/**

0 commit comments

Comments
 (0)