fix: type errors in easy-ast when generating docs

This commit is contained in:
Thea Schöbl
2023-08-23 08:45:47 +00:00
committed by Rainer Killinger
parent 4fb5941c56
commit 57a5b6061b
5 changed files with 14 additions and 10 deletions

View File

@@ -4,8 +4,9 @@
<title>OpenStApps API</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="preconnect" href="https://fonts.bunny.net" />
<link
href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700"
href="https://fonts.bunny.net/css?family=montserrat:300,400,700|roboto:300,400,700"
rel="stylesheet"
/>
<!-- Redoc doesn't change outer page styles -->
@@ -17,7 +18,7 @@
</style>
</head>
<body>
<redoc spec-url="openapi.json"></redoc>
<redoc spec-url="./openapi.json"></redoc>
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"></script>
</body>
</html>

View File

@@ -15,6 +15,7 @@
*/
import {EasyAstSpecType} from '../easy-ast-spec-type.js';
import {LightweightDefinitionKind} from '../../src/index.js';
import {TypeFlags} from 'typescript';
// @ts-expect-error unused type
type TestTypeAlias = number | string;
@@ -56,12 +57,12 @@ export const testConfig: EasyAstSpecType = {
{
referenceName: 'Foo',
value: 0,
flags: 1280,
flags: 1280 as TypeFlags,
},
{
referenceName: 'Bar',
value: 1,
flags: 1280,
flags: 1280 as TypeFlags,
},
],
},

View File

@@ -15,6 +15,7 @@
*/
import {EasyAstSpecType} from '../easy-ast-spec-type.js';
import {LightweightDefinitionKind} from '../../src/index.js';
import {TypeFlags} from 'typescript';
// @ts-expect-error unused type
enum TestAuto {
@@ -41,12 +42,12 @@ export const testConfig: EasyAstSpecType = {
{
referenceName: 'Foo',
value: 0,
flags: 1280,
flags: 1280 as TypeFlags,
},
{
referenceName: 'Bar',
value: 1,
flags: 1280,
flags: 1280 as TypeFlags,
},
],
},
@@ -61,12 +62,12 @@ export const testConfig: EasyAstSpecType = {
{
referenceName: 'YES',
value: 'yes',
flags: 1152,
flags: 1152 as TypeFlags,
},
{
referenceName: 'NO',
value: 'no',
flags: 1152,
flags: 1152 as TypeFlags,
},
],
},

View File

@@ -15,6 +15,7 @@
*/
import {EasyAstSpecType} from '../easy-ast-spec-type.js';
import {LightweightDefinitionKind} from '../../src/index.js';
import {TypeFlags} from 'typescript';
// @ts-expect-error unused
interface Test {
@@ -53,7 +54,7 @@ export const testConfig: EasyAstSpecType = {
name: 'boolean_type',
type: {
value: 'boolean',
flags: 1_048_592,
flags: 1_048_592 as TypeFlags,
specificationTypes: [
{
value: 'false',