nx/packages/react/src/utils/assertion.ts
Jason Jean e06822da7e
chore(repo): update prettier to v2 (#2934)
this is just for the repo, and not the workspace

Co-authored-by: Rares Matei <matei.rar@gmail.com>
2020-04-29 01:09:37 -04:00

19 lines
368 B
TypeScript

const VALID_STYLES = [
'css',
'scss',
'less',
'styl',
'styled-components',
'@emotion/styled',
'none',
];
export function assertValidStyle(style: string): void {
if (VALID_STYLES.indexOf(style) === -1) {
throw new Error(
`Unsupported style option found: ${style}. Valid values are: "${VALID_STYLES.join(
'", "'
)}"`
);
}
}