diff --git a/src/core/dtype.ts b/src/core/dtype.ts index de30242a..6ca8622b 100644 --- a/src/core/dtype.ts +++ b/src/core/dtype.ts @@ -105,6 +105,10 @@ export class Dtype { return new Dtype("timedelta", "timedelta", 8); case "category": return new Dtype("category", "category", 0); + default: { + const _exhaustive: never = name; + throw new Error(`Unknown dtype: ${_exhaustive}`); + } } } diff --git a/src/core/series.ts b/src/core/series.ts index f973b441..005e94ad 100644 --- a/src/core/series.ts +++ b/src/core/series.ts @@ -19,6 +19,36 @@ function defaultIndex(n: number): Index