// ref: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-4.html const status = ['on', 'off'] as const; type status = typeof status[number];