( contentField: ContentField<T> | undefined, arg: T, )
| 194 | }; |
| 195 | |
| 196 | export const contentFieldToContent = <T extends MinCallbackArg>( |
| 197 | contentField: ContentField<T> | undefined, |
| 198 | arg: T, |
| 199 | ) => { |
| 200 | if (!contentField) return null; |
| 201 | if (typeof contentField !== "function") return contentField; |
| 202 | if (typeof contentField === "function") { |
| 203 | const result = contentField(arg); |
| 204 | |
| 205 | return result; |
| 206 | } |
| 207 | }; |
| 208 | |
| 209 | export type ClassListMerger = ( |
| 210 | ...classes: (string | null | undefined | false)[] |
no outgoing calls
no test coverage detected