( props: Omit<P, "key">, key: string | undefined, )
| 170 | type GridPropsWithOptionalKey = GridProps & { key?: string }; |
| 171 | |
| 172 | function withOptionalKey<P extends { key?: string }>( |
| 173 | props: Omit<P, "key">, |
| 174 | key: string | undefined, |
| 175 | ): P { |
| 176 | if (key === undefined) { |
| 177 | return props as P; |
| 178 | } |
| 179 | return { ...props, key } as P; |
| 180 | } |
| 181 | |
| 182 | function withVNodeKey<N extends VNode>(vnode: N, key: string | undefined): N { |
| 183 | if (key === undefined) { |
no outgoing calls
no test coverage detected