[Home](./index.md) > [@keymanapp/kmc-model](./kmc-model.md) > [LexicalModelCompiler](./kmc-model.lexicalmodelcompiler.md) > [run](./kmc-model.lexicalmodelcompiler.run.md) ## LexicalModelCompiler.run() method Compiles a .model.ts file to .model.js. Returns an object containing binary artifacts on success. The files are passed in by name, and the compiler will use callbacks as passed to the [LexicalModelCompiler.init()](./kmc-model.lexicalmodelcompiler.init.md) function to read any input files by disk. **Signature:** ```typescript run(inputFilename: string, outputFilename?: string): Promise; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | inputFilename | string | | | outputFilename | string | _(Optional)_ | **Returns:** Promise<[LexicalModelCompilerResult](./kmc-model.lexicalmodelcompilerresult.md)> Binary artifacts on success, null on failure.