Skip to content

Commit

Permalink
feat: creates new playground with next.js
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethaasan committed Feb 29, 2024
1 parent 0128d36 commit d63f9ab
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion library/src/components/__tests__/Bindings.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { Bindings } from '../Bindings';
function createBinding(bindingObj: Record<string, any>) {
const bindings: BindingSchema[] = [];
for (const [protocol, binding] of Object.entries(bindingObj)) {
const obj = {};
const obj: Record<string, unknown> = {};
obj[protocol] = binding;
bindings.push(
new BindingSchema(binding, {
Expand Down
2 changes: 1 addition & 1 deletion library/src/containers/Servers/Security.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const Security: React.FunctionComponent<Props> = ({
.map(requirement => {
const requirements = requirement.all();
const key = Object.keys(requirements)[0];
const def = securitySchemes[String(key) as any];
const def = securitySchemes[Number(key)];
const requiredScopes: any = requirements[Number(key)];

if (!def) {
Expand Down
2 changes: 1 addition & 1 deletion library/src/helpers/__tests__/schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ describe('SchemaHelpers', () => {
});

describe('.parametersToSchema', () => {
function createParameter(parameters: Record<string, any>) {
function createParameter(parameters: Record<string, unknown>) {
const params = [];
for (const [paramProperty, param] of Object.entries(parameters)) {
params.push(
Expand Down
6 changes: 3 additions & 3 deletions library/src/helpers/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export class SchemaHelpers {
if (!urlVariables || urlVariables.length === 0) {
return undefined;
}
const obj: Record<string, any> = {};
const obj: Record<string, Record<string, unknown>> = {};
urlVariables.all().forEach(variable => {
obj[variable.id()] = { ...(variable.json() || {}) };
obj[variable.id()].type = 'string';
Expand All @@ -243,7 +243,7 @@ export class SchemaHelpers {
if (!parameters || parameters.isEmpty()) {
return undefined;
}
const obj: Record<string, any> = {};
const obj: Record<string, Record<string, unknown>> = {};
parameters.all().forEach(parameter => {
const parameterSchema = parameter.schema();
obj[parameter.id()] = { ...(parameterSchema?.json() ?? {}) };
Expand Down Expand Up @@ -280,7 +280,7 @@ export class SchemaHelpers {
return;
}
const extensions = value.extensions() as ExtensionsInterface;
const filteredExtensions: Record<string, any> = {};
const filteredExtensions: Record<string, unknown> = {};
for (const ext of extensions.all()) {
const extType = ext as ExtensionInterface;
if (
Expand Down
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"tslint-config-prettier": "^1.18.0",
"tslint-react": "^4.0.0",
"tslint-react-hooks": "^2.1.1",
"typescript": "^4.0.0"
"typescript": "^5.3.3"
},
"lint-staged": {
"linters": {
Expand Down
1 change: 1 addition & 0 deletions playground/components/Tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React, { Component } from 'react';
import { TabLink, TabWrapper } from './styled';

export interface TabProps {
children: React.ReactNode;
title: string;
tabIndex?: number;
isActive?: boolean;
Expand Down

0 comments on commit d63f9ab

Please sign in to comment.