File tree 4 files changed +8
-6
lines changed
4 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ export interface TransformContext
117
117
removeIdentifiers ( exp : ExpressionNode | string ) : void
118
118
hoist ( exp : string | JSChildNode | ArrayExpression ) : SimpleExpressionNode
119
119
cache < T extends JSChildNode > ( exp : T , isVNode ?: boolean ) : CacheExpression | T
120
- constantCache : Map < TemplateChildNode , ConstantTypes >
120
+ constantCache : WeakMap < TemplateChildNode , ConstantTypes >
121
121
122
122
// 2.x Compat only
123
123
filters ?: Set < string >
@@ -181,7 +181,7 @@ export function createTransformContext(
181
181
directives : new Set ( ) ,
182
182
hoists : [ ] ,
183
183
imports : [ ] ,
184
- constantCache : new Map ( ) ,
184
+ constantCache : new WeakMap ( ) ,
185
185
temps : 0 ,
186
186
cached : 0 ,
187
187
identifiers : Object . create ( null ) ,
Original file line number Diff line number Diff line change @@ -227,7 +227,7 @@ export function createAppAPI<HostElement>(
227
227
} )
228
228
}
229
229
230
- const installedPlugins = new Set ( )
230
+ const installedPlugins = new WeakSet ( )
231
231
232
232
let isMounted = false
233
233
Original file line number Diff line number Diff line change @@ -18,7 +18,10 @@ type LegacyAsyncComponent = (
18
18
reject ?: ( reason ?: any ) => void
19
19
) => LegacyAsyncReturnValue | undefined
20
20
21
- const normalizedAsyncComponentMap = new Map < LegacyAsyncComponent , Component > ( )
21
+ const normalizedAsyncComponentMap = new WeakMap <
22
+ LegacyAsyncComponent ,
23
+ Component
24
+ > ( )
22
25
23
26
export function convertLegacyAsyncComponent ( comp : LegacyAsyncComponent ) {
24
27
if ( normalizedAsyncComponentMap . has ( comp ) ) {
Original file line number Diff line number Diff line change @@ -8,11 +8,10 @@ import { InternalSlots } from '../componentSlots'
8
8
import { getCompatListeners } from './instanceListeners'
9
9
import { compatH } from './renderFn'
10
10
11
- const normalizedFunctionalComponentMap = new Map <
11
+ const normalizedFunctionalComponentMap = new WeakMap <
12
12
ComponentOptions ,
13
13
FunctionalComponent
14
14
> ( )
15
-
16
15
export const legacySlotProxyHandlers : ProxyHandler < InternalSlots > = {
17
16
get ( target , key : string ) {
18
17
const slot = target [ key ]
You can’t perform that action at this time.
0 commit comments