Search
Search
setFileContent
setFileContent
Set the content of the code file.
const updatedFile = await codeFile.setFileContent(`
export default function MyComponent() {
return <div>Hello World</div>
}
`);
Parameters
code: string
— The new source code content.
Returns
Promise<CodeFile>