mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-04 20:42:52 +00:00
62 lines
1.7 KiB
TypeScript
62 lines
1.7 KiB
TypeScript
/* eslint-disable @typescript-eslint/no-empty-interface,@typescript-eslint/no-unused-vars */
|
|
/*
|
|
* Copyright (C) 2021 StApps
|
|
* This program is free software: you can redistribute it and/or modify it
|
|
* under the terms of the GNU General Public License as published by the Free
|
|
* Software Foundation, version 3.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
* more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along with
|
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
import {EasyAstSpecType} from '../easy-ast-spec-type.js';
|
|
import {LightweightDefinitionKind} from '../../src/index.js';
|
|
|
|
interface NestedObject {
|
|
nested: {
|
|
deeplyNested: {
|
|
aNumber: number;
|
|
};
|
|
};
|
|
}
|
|
|
|
export const testConfig: EasyAstSpecType = {
|
|
testName: `should handle nested/type literals`,
|
|
expected: {
|
|
NestedObject: {
|
|
name: 'NestedObject',
|
|
kind: LightweightDefinitionKind.CLASS_LIKE,
|
|
modifiers: ['interface'],
|
|
properties: {
|
|
nested: {
|
|
name: 'nested',
|
|
type: {
|
|
flags: 524_288,
|
|
},
|
|
properties: {
|
|
deeplyNested: {
|
|
name: 'deeplyNested',
|
|
type: {
|
|
flags: 524_288,
|
|
},
|
|
properties: {
|
|
aNumber: {
|
|
name: 'aNumber',
|
|
type: {
|
|
flags: 8,
|
|
value: 'number',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|