From fa64d90cd3200ce7f74e882285375854d00c0150 Mon Sep 17 00:00:00 2001 From: marcus-sa Date: Fri, 9 Feb 2024 13:29:38 +0100 Subject: [PATCH] test(type): extract type annotation options --- packages/type/tests/integration4.spec.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/type/tests/integration4.spec.ts b/packages/type/tests/integration4.spec.ts index f8eb70413..5ce769ec0 100644 --- a/packages/type/tests/integration4.spec.ts +++ b/packages/type/tests/integration4.spec.ts @@ -9,7 +9,7 @@ */ import { expect, test } from '@jest/globals'; -import { assertType, AutoIncrement, Group, groupAnnotation, PrimaryKey, ReflectionKind } from '../src/reflection/type.js'; +import { assertType, AutoIncrement, ExtractTypeAnnotationOptions, Group, groupAnnotation, PrimaryKey, ReflectionKind, TypeAnnotation } from '../src/reflection/type.js'; import { typeOf } from '../src/reflection/reflection.js'; import { cast } from '../src/serializer-facade.js'; @@ -143,3 +143,13 @@ test('union loosely', () => { expect(cast({ id: 2 })).toEqual({ id: 2 }); expect(cast({ id: '3' })).toEqual({ id: 3 }); }); + +test('extract type annotation options', () => { + type Skip = TypeAnnotation<'skip', { if: boolean }>; + + type SkipOptions = ExtractTypeAnnotationOptions; + + const options: SkipOptions = { + if: true, + }; +});