mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-09 19:22:51 +00:00
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018 StApps
|
||||
* Copyright (C) 2018-2019 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.
|
||||
@@ -16,18 +16,10 @@ import {Logger} from '@openstapps/logger';
|
||||
import {expect} from 'chai';
|
||||
import {slow, suite, test, timeout} from 'mocha-typescript';
|
||||
import {join} from 'path';
|
||||
import {ProjectReflection} from 'typedoc';
|
||||
import {Converter, getValidatableTypesFromReflection} from '../src/schema';
|
||||
|
||||
const logger = new Logger();
|
||||
|
||||
type RecursivePartial<T> = {
|
||||
[P in keyof T]?:
|
||||
T[P] extends Array<infer U> ? Array<RecursivePartial<U>> :
|
||||
T[P] extends object ? RecursivePartial<T[P]> :
|
||||
T[P];
|
||||
};
|
||||
|
||||
process.on('unhandledRejection', (err) => {
|
||||
logger.error('UNHANDLED REJECTION', err.stack);
|
||||
process.exit(1);
|
||||
@@ -79,7 +71,7 @@ export class SchemaSpec {
|
||||
|
||||
@test
|
||||
async getValidatableTypesFromReflection() {
|
||||
const reflection: RecursivePartial<ProjectReflection> = {
|
||||
const reflection: any = {
|
||||
children: [
|
||||
{
|
||||
children: [
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2019 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/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @validatable
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user