File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
specification/compiler/model Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,8 @@ import {
50
50
modelProperty ,
51
51
modelType ,
52
52
modelTypeAlias ,
53
- parseVariantNameTag
53
+ parseVariantNameTag ,
54
+ parseVariantsTag
54
55
} from './utils'
55
56
56
57
const specsFolder = join ( __dirname , '..' , '..' , 'specs' )
@@ -263,6 +264,12 @@ function compileClassOrInterfaceDeclaration (declaration: ClassDeclaration | Int
263
264
type . variantName = variant
264
265
}
265
266
267
+ const variants = parseVariantsTag ( declaration . getJsDocs ( ) )
268
+ if ( variants != null ) {
269
+ assert ( variants . kind === 'container' , 'Interfaces can only use `container` vairant kind' )
270
+ type . variants = variants
271
+ }
272
+
266
273
for ( const member of declaration . getMembers ( ) ) {
267
274
// Any property definition
268
275
assert (
You can’t perform that action at this time.
0 commit comments