Skip to content

CompilerConfig should take options as named params #8933

Closed

Description

@lacolaco
  • I'm submitting a ...
  • feature request

From #8906 (comment)

cc/ @vicb

Current behavior

All are general arguments.

class CompilerConfig {
  constructor(public genDebugInfo: boolean, public logBindingUpdate: boolean,
                     public useJit: boolean, renderTypes: RenderTypes = null,
                     interpolation: InterpolationConfig = null,
                     defaultEncapsulation: ViewEncapsulation = null) {
  }
}

Expected/desired behavior

interface CompilerConfigArgs {
  genDebugInfo: boolean;
  logBindingUpdate: boolean;
  useJit: boolean;
  renderTypes?: RenderTypes;
 ...
}

class CompilerConfig {
  constructor(args: CompilerConfigArgs) {
  }
}

Activity

  1. self-assigned this
    on Jun 1, 2016
  2. vicb commented on Jun 1, 2016

    @vicb
    Contributor

    @laco0416 do you have time to take a look at this ?

    We need to keep backward compatibility, so the ctor signature should look like:
    constructor(enDebugInfo: boolean | CompilerConfigArgs, <other args>)

  3. lacolaco commented on Jun 1, 2016

    @lacolaco
    ContributorAuthor

    One way is a static method

    CompilerConfig.create({...})

    and make constructor deprecated

  4. lacolaco commented on Jun 14, 2016

    @lacolaco
    ContributorAuthor

    bc888bf solved this.

  5. angular-automatic-lock-bot commented on Sep 8, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  6. locked and limited conversation to collaborators on Sep 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions