How to stop the studio visual warning of the presence of a "public" modifier

I have a typescript class

class UserModel
{
    public vipTiers: Array<VipTierDto>;
    public games: Array<GameDto>;
}

      

This causes me to see this warning in VisualStudio 2015, typescript 2.0.6 Your code style requires no "public" modifiers

Obviously, I prefer to keep the private / public modifiers. Where can you set the coding style?

This is my tsconfig.json

{
  "compileOnSave": true,
  "compilerOptions": {
    "module": "commonjs",
    "noImplicitAny": true,
    "preserveConstEnums": true,
    "removeComments": true,
    "sourceMap": true
  },
  "include": [
    "**/*.ts"
  ]
}

      

+3


source to share


1 answer


I think this warning comes from ReSharper and not Visual Studio. If you are using ReSharper you can go to ReSharper -> Options -> TypeScript -> Code Style. Then check the box next to "Use explicit" public "modifier. Works for me.



0


source







All Articles