Chart.js/types/tests/parsed.data.type.ts
Dan Onoshko ce375a6876
feat: add ESM support (#10525)
* feat: add ESM support

* build: rename UMD bundle

* chore: edit supbackages description

* style: disable es/no-import-meta linter rule

* test: dynamic import in cjs module

* docs: edit integrations page

* docs: review fixes

* chore: remove useless regex in webpack config

* ci: test size-limit only for ESM bundle
2022-08-04 18:43:26 -04:00

19 lines
447 B
TypeScript

import { ParsedDataType } from '..';
interface test {
pie: ParsedDataType<'pie'>,
line: ParsedDataType<'line'>,
testA: ParsedDataType<'pie' | 'line' | 'bar'>
testB: ParsedDataType<'pie' | 'line' | 'bar'>
testC: ParsedDataType<'pie' | 'line' | 'bar'>
}
const testImpl: test = {
pie: 1,
line: { x: 1, y: 2 },
testA: 1,
testB: { x: 1, y: 2 },
// @ts-expect-error testC should be limited to pie/line datatypes
testC: 'test'
};