Created
June 22, 2020 14:31
-
-
Save Anaminus/e867da542f7046f4f12cdd64c11c3b12 to your computer and use it in GitHub Desktop.
Template for formatting ModuleScript descriptions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --[[ | |
| ModuleName | |
| A short description of the module. | |
| SYNOPSIS | |
| -- Lua code that showcases an overview of the API. | |
| local foobar = ModuleName.TopLevel("foo") | |
| print(foobar.Thing) | |
| DESCRIPTION | |
| A detailed description of the module. | |
| API | |
| -- Describes each API item using Luau type declarations. | |
| -- Top-level functions use the function declaration syntax. | |
| function ModuleName.TopLevel(thing: string): Foobar | |
| -- A description of Foobar. | |
| type Foobar = { | |
| -- A description of the Thing member. | |
| Thing: string, | |
| -- Each distinct item in the API is separated by \n\n. | |
| Member: string, | |
| } | |
| ]] | |
| -- Implementation of ModuleName. | |
| local ModuleName = {} | |
| function ModuleName.TopLevel(thing) | |
| return { | |
| Thing = thing, | |
| Member = "", | |
| } | |
| end | |
| return ModuleName |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment