Skip to content

Commit

Permalink
add guideline on documentation style (closes #11)
Browse files Browse the repository at this point in the history
  • Loading branch information
nadako committed Oct 13, 2014
1 parent 3ac2f0e commit 89b349c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions HOWTO.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,23 @@ Note that combined with `haxe.EitherType` (described above), `@:enum abstract`s
}
```

## API Documenting

We use API documentation style found in Haxe standard library and copy upstream API documentation text to externs (applying some minor editing/reformatting to it).

Example of Haxe standard library style:

```haxe
/**
Does that and returns this.
Some more info about using argument `a` and `b`.
**/
static function doStuff(a:Int, b:String):Void;
```

Note that node.js API documentation often describes types of variables which is mostly redundant in Haxe, so these parts can be removed.

## Tricks and hints

TODO (dealing with keywords, `untyped __js__`, inline methods and properties on extern classes)

0 comments on commit 89b349c

Please sign in to comment.