( serverPrefixID: string, outputValidator: TType<T>, data: T, )
| 17 | } from '../shared/thread-utils.js'; |
| 18 | |
| 19 | function convertServerIDsToClientIDs<T>( |
| 20 | serverPrefixID: string, |
| 21 | outputValidator: TType<T>, |
| 22 | data: T, |
| 23 | ): T { |
| 24 | const conversionFunction = (id: string) => { |
| 25 | if (id.indexOf('|') !== -1) { |
| 26 | console.warn(`Server id '${id}' already has a prefix`); |
| 27 | return id; |
| 28 | } |
| 29 | return convertIDToNewSchema(id, serverPrefixID); |
| 30 | }; |
| 31 | |
| 32 | return convertObject(outputValidator, data, [tID], conversionFunction); |
| 33 | } |
| 34 | |
| 35 | function convertClientIDsToServerIDs<T>( |
| 36 | serverPrefixID: string, |
no test coverage detected