(hint?: Hint)
| 101 | * @internal |
| 102 | */ |
| 103 | export function normalizeHintField(hint?: Hint): Hint | undefined { |
| 104 | let finalHint = undefined; |
| 105 | |
| 106 | if (typeof hint === 'string') { |
| 107 | finalHint = hint; |
| 108 | } else if (Array.isArray(hint)) { |
| 109 | finalHint = {}; |
| 110 | |
| 111 | hint.forEach(param => { |
| 112 | finalHint[param] = 1; |
| 113 | }); |
| 114 | } else if (hint != null && typeof hint === 'object') { |
| 115 | finalHint = {} as Document; |
| 116 | for (const name in hint) { |
| 117 | finalHint[name] = hint[name]; |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | return finalHint; |
| 122 | } |
| 123 | |
| 124 | const TO_STRING = (object: unknown) => Object.prototype.toString.call(object); |
| 125 | /** |
no outgoing calls
no test coverage detected