Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Support as const in no-object-literal-type-assertion #166

Closed
Labels
@aboyton

Description

@aboyton

Sorry for not using the template, it didn't seem to apply in this case. This ticket is related to#66. Feel free to close if you think it is covered by other tickets.

TypeScript have merged in a new featureas const (slated for TypeScript 3.4, seemicrosoft/TypeScript#29510). This should get around many of the times where I need to say things like:

return{type:ChunkContents.LINK,content:linkMatch[2],ref:linkMatch[1],}as{type:ChunkContents.LINK;content:string;ref:string;};

It would be great to get the ruleno-object-literal-type-assertion to supportas const but disallowas someOtherType (at least as an option).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp