Add tests for enums
parent
e86e9a0554
commit
d8eb1bd3e8
|
@ -0,0 +1,39 @@
|
|||
type Type = {
|
||||
a: 'one' | 'two',
|
||||
};
|
||||
|
||||
interface Interface {
|
||||
a: 'one' | 'two';
|
||||
}
|
||||
|
||||
class Class {
|
||||
a: 'one' | 'two';
|
||||
}
|
||||
|
||||
// ###
|
||||
({
|
||||
Type: {
|
||||
type: 'record',
|
||||
name: 'Type',
|
||||
fields: [{
|
||||
name: 'a',
|
||||
type: {type: 'enum', symbols: ['one', 'two']},
|
||||
}],
|
||||
},
|
||||
Interface: {
|
||||
type: 'record',
|
||||
name: 'Interface',
|
||||
fields: [{
|
||||
name: 'a',
|
||||
type: {type: 'enum', symbols: ['one', 'two']},
|
||||
}],
|
||||
},
|
||||
Class: {
|
||||
type: 'record',
|
||||
name: 'Class',
|
||||
fields: [{
|
||||
name: 'a',
|
||||
type: {type: 'enum', symbols: ['one', 'two']},
|
||||
}],
|
||||
},
|
||||
});
|
Loading…
Reference in New Issue