mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-02-27 19:32:12 +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: [
|
||||
|
||||
Reference in New Issue
Block a user