[英]How to disable doc generating for type definitions in Elixir?
For example I have a module like 例如我有一个像
defmodule Foo do
@type bar :: string
end
But I don't want to generate doc for bar
because it's meant to use internal implementation. 但是我不想为
bar
生成文档,因为它打算使用内部实现。
There's @typedoc
for types like @doc
for functions, but unlike @doc false
, @typedoc false
doesn't seem to hide the type from the documentation. @typedoc
的类型类似于@doc
的函数,但是与@doc false
不同, @typedoc false
似乎并未从文档中隐藏类型。 Since this is for internal use, I'm assuming you don't want to export it out of the module either, so you can use @typep
to declare it private, which will also remove it from the documentation: 由于这是供内部使用,因此我假设您也不想将其导出到模块之外,因此可以使用
@typep
声明为私有,这也将从文档中删除它:
defmodule Foo do
@typep bar :: string
end
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.