Skip to content

Add a compiler flag to override the start function #566

@dcodeIO

Description

@dcodeIO

Currently, execution of top level statements can be delayed until a custom start function is called with

@start export function myStart(): void {}

It has recently been suggested to also provide a compiler flag doing this, essentially marking a function as the entry function using the command line. This could look like:

asc ... --start myLib/myStart

with either

// myLib.ts
function myStart(): void {}

becoming the function kicking off top-level statements, or alternatively generating a function of that name if it isn't present.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions