(dataNode: T)
| 951 | } |
| 952 | |
| 953 | private _getExpansionKey(dataNode: T): K { |
| 954 | // In the case that a key accessor function was not provided by the |
| 955 | // tree user, we'll default to using the node object itself as the key. |
| 956 | // |
| 957 | // This cast is safe since: |
| 958 | // - if an expansionKey is provided, TS will infer the type of K to be |
| 959 | // the return type. |
| 960 | // - if it's not, then K will be defaulted to T. |
| 961 | return this.expansionKey?.(dataNode) ?? (dataNode as unknown as K); |
| 962 | } |
| 963 | |
| 964 | private _getAriaSet(node: T) { |
| 965 | const key = this._getExpansionKey(node); |
no outgoing calls
no test coverage detected