1.0.0 • Published 3 years ago

@supastuff/json-resume-types v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Json-Resume-Types

Generates Typescript types from the current version of resume-schema. This will be updated whenever resume-schema is updated by using Dependabot to trigger the push workflow. New versions will always match resume-schema's version.

Installation

npm install @supastuff/json-resume-types --save

Usage

It's really only 1 type, but you can use "Lookup types" to get the types of sub properties:

import {ResumeSchema} from '@supastuff/json-resume-types'

function doStuff(work: ResumeSchema["work"]): void { ... }

Limitations

The types are generated by json2ts so some of it's issues came along for the ride:

  • Iso8601 doesn't keep it's regex pattern. You'll just have to trust that where ever you use Iso8601, it has the correct format
  • additionalProperties are defined as [k: string]: unknown. The unknown type may or may not cause problems for you. I think it's fine, but it sounds like there are complaints about it... issue#356, issue#335