UUID class issue in migration from io-ts

Why is UUID in effect/schema a class? Migrating from io-ts and I can no longer seem to use this utility function:

export const toUpperCase = <S extends string>(s: S): Uppercase<S> =>
  s.toUpperCase() as Uppercase<S>


For example, this no longer compiles, because UUID doesn't extend string (like it did in io-ts-types):
const formatMetadata = (deviceInstallationID: S.UUID) => ({ 
  deviceInstallationID: toUpperCase(input.deviceInstallationID),
  ...
})
Was this page helpful?