( contents: string, poly: ChallengeFile, source?: string )
| 87 | |
| 88 | // setContent will lose source if not supplied |
| 89 | export function setContent( |
| 90 | contents: string, |
| 91 | poly: ChallengeFile, |
| 92 | source?: string |
| 93 | ): ChallengeFile { |
| 94 | checkPoly(poly); |
| 95 | return { |
| 96 | ...poly, |
| 97 | contents, |
| 98 | source |
| 99 | }; |
| 100 | } |
| 101 | |
| 102 | // This is currently only used to add back properties that are not stored in the |
| 103 | // database. |
no test coverage detected