What is the correct JSDoc syntax for a local variable?

后端 未结 4 1382
面向向阳花
面向向阳花 2021-02-18 15:10

For a function like this...

function example() {
  var X = 100;

  ...

  var Y = \'abc\';

  ...

  return Z;
}

I need to explain the purpose

4条回答
  •  猫巷女王i
    2021-02-18 16:01

    Best thing that worked for me:

    /**
      * @name AssetAutoGenerationOption
      * @type {"all" | "master" | "off"}
      */
    export type AssetAutoGenerationOption = "all" | "master" | "off";
    

提交回复
热议问题