Files
twenty/packages/twenty-sdk/scripts/remote-dom/generators/utils/add-exported-const.ts
T
Raphaël BosiandGitHub f0bc9fcb43 [FRONT COMPONENTS] Move to twenty-sdk (#17587)
Move front components from twenty-shared to twenty-sdk
2026-02-02 12:21:53 +00:00

14 lines
344 B
TypeScript

import { type SourceFile, VariableDeclarationKind } from 'ts-morph';
export const addExportedConst = (
sourceFile: SourceFile,
name: string,
initializer: string,
): void => {
sourceFile.addVariableStatement({
isExported: true,
declarationKind: VariableDeclarationKind.Const,
declarations: [{ name, initializer }],
});
};