}
// https://html.spec.whatwg.org/multipage/parsing.html#numeric-character-reference-end-state
-const CCR_REPLACEMENTS: { [key: number]: number | undefined } = {
+const CCR_REPLACEMENTS: Record<number, number | undefined> = {
0x80: 0x20ac,
0x82: 0x201a,
0x83: 0x0192,
import { startMeasure, endMeasure } from './profiling'
import { componentAdded } from './devtools'
-export type Data = { [key: string]: unknown }
+export type Data = Record<string, unknown>
// Note: can't mark this whole interface internal because some public interfaces
// extend it.
: T extends { type: null | true }
? any // As TS issue https://github.com/Microsoft/TypeScript/issues/14829 // somehow `ObjectConstructor` when inferred from { (): T } becomes `any` // `BooleanConstructor` when inferred from PropConstructor(with PropMethod) becomes `Boolean`
: T extends ObjectConstructor | { type: ObjectConstructor }
- ? { [key: string]: any }
+ ? Record<string, any>
: T extends BooleanConstructor | { type: BooleanConstructor }
? boolean
: T extends Prop<infer V> ? V : T
id: number
app: App
version: string
- types: { [key: string]: string | Symbol }
+ types: Record<string, string | Symbol>
}
enum DevtoolsHooks {
*/
export function createBlock(
type: VNodeTypes | ClassComponent,
- props?: { [key: string]: any } | null,
+ props?: Record<string, any> | null,
children?: any,
patchFlag?: number,
dynamicProps?: string[]