Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

Commit

Permalink
fix ts type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
elchead committed Mar 20, 2023
1 parent 582dbd0 commit 09c2ad5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,13 @@ export function activate(context: vscode.ExtensionContext) {

const reqBody = await new Promise( (resolve, reject) => {
let body = '';
req.on('data', chunk => {
req.on('data', (chunk: any) => {
body += chunk.toString(); // convert Buffer to string
});
req.on('end', () => {
resolve(body);
});
});
}) as string;

const resp = await phpBrowser.request( {
relativeUrl: req.url,
Expand Down
4 changes: 2 additions & 2 deletions src/playground-website.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import BrowserChrome from './playground-website-components/browser-chrome';
import VersionSelector from './playground-website-components/version-select';


const Website = ({ iframeSrc }) => {
const Website = ({ iframeSrc } : { iframeSrc: string }) => {
const phpVersions = ['8.2', '8.0', '7.4', '7.3', '7.2'];
const wpVersions = ['5.9', '6.0', '6.1'];

Expand All @@ -20,7 +20,7 @@ const Website = ({ iframeSrc }) => {

const el = document.getElementById('root');
if ( el ) {
const iframeSrc = el.dataset.iframeSrc;
const iframeSrc = el.dataset.iframeSrc ? el.dataset.iframeSrc : '';
const root = createRoot(el);
root.render(
<Website iframeSrc={ iframeSrc } />
Expand Down

0 comments on commit 09c2ad5

Please sign in to comment.