(
slots: { [key: string]: Function } | void,
normalSlots: { [key: string]: VNode[] | undefined }
)
| 55 | } |
| 56 | |
| 57 | export function resolveSlots( |
| 58 | slots: { [key: string]: Function } | void, |
| 59 | normalSlots: { [key: string]: VNode[] | undefined } |
| 60 | ): { [key: string]: true } { |
| 61 | let res: { [key: string]: true } |
| 62 | if (!slots) { |
| 63 | res = {} |
| 64 | } else if (slots._normalized) { |
| 65 | // fast path 1: child component re-render only, parent did not change |
| 66 | return slots._normalized as any |
| 67 | } else { |
| 68 | res = {} |
| 69 | for (const key in slots) { |
| 70 | if (slots[key] && key[0] !== '$') { |
| 71 | res[key] = true |
| 72 | } |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | // expose normal slots on scopedSlots |
| 77 | for (const key in normalSlots) { |
| 78 | if (!(key in res)) { |
| 79 | res[key] = true |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | return res |
| 84 | } |
| 85 | |
| 86 | let vueInternalClasses: |
| 87 | | { |
no outgoing calls
no test coverage detected
searching dependent graphs…