import { ProblemId, SolutionId, UserId } from './model' // export function refToUserId(ref: string): UserId { // if (!ref.startsWith('user/')) { // throw new Error(`"${ref}" is not a reference to a User`) // } // return ref.slice('user/'.length) // } // export function refToProblemId(ref: string): ProblemId { // if (!ref.startsWith('problem/')) { // throw new Error(`"${ref}" is not a reference to a Problem`) // } // return ref.slice('problem/'.length) // } // export function refToSolutionId(ref: string): SolutionId { // if (!ref.startsWith('solution/')) { // throw new Error(`"${ref}" is not a reference to a Solution`) // } // return ref.slice('solution/'.length) // }