{"id":18355365,"url":"https://github.com/charto/readts","last_synced_at":"2025-10-30T09:16:20.079Z","repository":{"id":57161230,"uuid":"54239457","full_name":"charto/readts","owner":"charto","description":"TypeScript exported definitions parser","archived":false,"fork":false,"pushed_at":"2018-09-14T17:19:27.000Z","size":41,"stargazers_count":19,"open_issues_count":1,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-09T14:52:57.608Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/charto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-19T00:34:12.000Z","updated_at":"2023-08-21T01:14:44.000Z","dependencies_parsed_at":"2022-09-09T07:31:43.222Z","dependency_job_id":null,"html_url":"https://github.com/charto/readts","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/charto/readts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charto%2Freadts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charto%2Freadts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charto%2Freadts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charto%2Freadts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/charto","download_url":"https://codeload.github.com/charto/readts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charto%2Freadts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270149414,"owners_count":24535754,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T22:06:41.417Z","updated_at":"2025-10-30T09:16:20.010Z","avatar_url":"https://github.com/charto.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"readts\n======\n\n[![build status](https://travis-ci.org/charto/readts.svg?branch=master)](http://travis-ci.org/charto/readts)\n[![npm version](https://img.shields.io/npm/v/readts.svg)](https://www.npmjs.com/package/readts)\n\nThis is a TypeScript exported class, function, type and documentation parser.\nIt outputs everything needed to automatically generate documentation and better understand a project's public API.\nInformation is extracted using TypeScript's [Compiler API](https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API).\n\nUsage\n-----\n\n```typescript\nimport * as readts from 'readts';\n\nvar parser = new readts.Parser();\n\n// Read configuration used in the project we want to analyze.\nvar config = parser.parseConfig('tsconfig.json');\n\n// Modify configuration as needed, for example to avoid writing compiler output to disk.\nconfig.options.noEmit = true;\n\n// Parse the project.\nvar tree = parser.parse(config);\n```\n\nThe output is a list of [`ModuleSpec`](#api-ModuleSpec) objects, each with exported classes and interfaces ([`ClassSpec`](#api-ClassSpec)),\nfunctions ([`FunctionSpec`](#api-FunctionSpec)) and variables ([`IdentifierSpec`](#api-IdentifierSpec)).\nTypes of variables and function parameters are parsed to [`TypeSpec`](#api-TypeSpec) objects,\npointing to correct [`ClassSpec`](#api-ClassSpec) objects if applicable.\nThis allows cross-linking types to their definitions in generated documentation.\n\nSee [charto/docts](https://github.com/charto/docts) for a documentation generator using this parser.\n\nAPI\n===\nDocs generated using [`docts`](https://github.com/charto/docts)\n\u003e\n\u003e \u003ca name=\"api-ClassSpec\"\u003e\u003c/a\u003e\n\u003e ### Class [`ClassSpec`](#api-ClassSpec)\n\u003e \u003cem\u003eClass or interface and its members.\u003c/em\u003e  \n\u003e Source code: [`\u003c\u003e`](http://github.com/charto/readts/blob/62754ee/src/ClassSpec.ts#L11-L74)  \n\u003e  \n\u003e Methods:  \n\u003e \u003e **new( )** \u003csup\u003e\u0026rArr; \u003ccode\u003e[ClassSpec](#api-ClassSpec)\u003c/code\u003e\u003c/sup\u003e [`\u003c\u003e`](http://github.com/charto/readts/blob/62754ee/src/ClassSpec.ts#L14-L21)  \n\u003e \u003e \u0026emsp;\u0026#x25aa; spec \u003csup\u003e\u003ccode\u003eSymbolSpec\u003c/code\u003e\u003c/sup\u003e  \n\u003e  \n\u003e Properties:  \n\u003e \u003e **.name** \u003csup\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eClass name.\u003c/em\u003e  \n\u003e \u003e **.pos** \u003csup\u003e\u003ccode\u003e[SourcePos](#api-SourcePos)\u003c/code\u003e\u003c/sup\u003e  \n\n\u003e \u003e **.construct** \u003csup\u003e\u003ccode\u003e[FunctionSpec](#api-FunctionSpec)\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eConstructor function.\u003c/em\u003e  \n\u003e \u003e **.index** \u003csup\u003e\u003ccode\u003e[IndexSpec](#api-IndexSpec)\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eIndex signature.\u003c/em\u003e  \n\u003e \u003e **.methodList** \u003csup\u003e\u003ccode\u003e[FunctionSpec](#api-FunctionSpec)[]\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003ePublic methods.\u003c/em\u003e  \n\u003e \u003e **.propertyList** \u003csup\u003e\u003ccode\u003e[IdentifierSpec](#api-IdentifierSpec)[]\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003ePublic properties.\u003c/em\u003e  \n\u003e \u003e **.extendList** \u003csup\u003e\u003ccode\u003e[ClassSpec](#api-ClassSpec)[]\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eClass extends\u003c/em\u003e  \n\u003e \u003e **.exports** \u003csup\u003e\u003ccode\u003e[ModuleSpec](#api-ModuleSpec)\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eClass exports\u003c/em\u003e  \n\u003e \u003e **.doc** \u003csup\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eJSDoc comment.\u003c/em\u003e  \n\u003e\n\u003e \u003ca name=\"api-EnumSpec\"\u003e\u003c/a\u003e\n\u003e ### Class [`EnumSpec`](#api-EnumSpec)\n\u003e \u003cem\u003eEnum and its members.\u003c/em\u003e  \n\u003e Source code: [`\u003c\u003e`](http://github.com/charto/readts/blob/ce93baf/src/EnumSpec.ts#L11-L37)  \n\u003e  \n\u003e Methods:  \n\u003e \u003e **new( )** \u003csup\u003e\u0026rArr; \u003ccode\u003e[EnumSpec](#api-EnumSpec)\u003c/code\u003e\u003c/sup\u003e [`\u003c\u003e`](http://github.com/charto/readts/blob/ce93baf/src/EnumSpec.ts#L14-L20)  \n\u003e \u003e \u0026emsp;\u0026#x25aa; spec \u003csup\u003e\u003ccode\u003eSymbolSpec\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e **.addMember( )** \u003csup\u003e\u0026rArr; \u003ccode\u003evoid\u003c/code\u003e\u003c/sup\u003e [`\u003c\u003e`](http://github.com/charto/readts/blob/ce93baf/src/EnumSpec.ts#L22-L26)  \n\u003e \u003e \u0026emsp;\u0026#x25aa; spec \u003csup\u003e\u003ccode\u003e[IdentifierSpec](#api-IdentifierSpec)\u003c/code\u003e\u003c/sup\u003e  \n\u003e  \n\u003e Properties:  \n\u003e \u003e **.name** \u003csup\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eClass name.\u003c/em\u003e  \n\u003e \u003e **.pos** \u003csup\u003e\u003ccode\u003e[SourcePos](#api-SourcePos)\u003c/code\u003e\u003c/sup\u003e  \n\n\u003e \u003e **.memberList** \u003csup\u003e\u003ccode\u003e[IdentifierSpec](#api-IdentifierSpec)[]\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003ePublic properties.\u003c/em\u003e  \n\u003e \u003e **.doc** \u003csup\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eJSDoc comment.\u003c/em\u003e  \n\u003e\n\u003e \u003ca name=\"api-FormatHooks\"\u003e\u003c/a\u003e\n\u003e ### Interface [`FormatHooks`](#api-FormatHooks)\n\u003e \u003cem\u003eHooks to change how parts of type definitions are converted to strings.\u003c/em\u003e  \n\u003e Source code: [`\u003c\u003e`](http://github.com/charto/readts/blob/ce93baf/src/TypeSpec.ts#L11-L20)  \n\u003e  \n\u003e Properties:  \n\u003e \u003e **.unknown**\u003csub\u003e?\u003c/sub\u003e \u003csup\u003e\u003ccode\u003eFormatHook\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e **.ref**\u003csub\u003e?\u003c/sub\u003e \u003csup\u003e\u003ccode\u003eFormatHook\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e **.array**\u003csub\u003e?\u003c/sub\u003e \u003csup\u003e\u003ccode\u003eFormatHook\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e **.union**\u003csub\u003e?\u003c/sub\u003e \u003csup\u003e\u003ccode\u003eFormatHook\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e **.intersection**\u003csub\u003e?\u003c/sub\u003e \u003csup\u003e\u003ccode\u003eFormatHook\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e **.generic**\u003csub\u003e?\u003c/sub\u003e \u003csup\u003e\u003ccode\u003eFormatHook\u003c/code\u003e\u003c/sup\u003e  \n\u003e\n\u003e \u003ca name=\"api-FunctionSpec\"\u003e\u003c/a\u003e\n\u003e ### Class [`FunctionSpec`](#api-FunctionSpec)\n\u003e \u003cem\u003eFunction or method with any number of overloaded signatures.\u003c/em\u003e  \n\u003e Source code: [`\u003c\u003e`](http://github.com/charto/readts/blob/c857e04/src/FunctionSpec.ts#L11-L30)  \n\u003e  \n\u003e Methods:  \n\u003e \u003e **new( )** \u003csup\u003e\u0026rArr; \u003ccode\u003e[FunctionSpec](#api-FunctionSpec)\u003c/code\u003e\u003c/sup\u003e [`\u003c\u003e`](http://github.com/charto/readts/blob/c857e04/src/FunctionSpec.ts#L14-L18)  \n\u003e \u003e \u0026emsp;\u0026#x25aa; spec \u003csup\u003e\u003ccode\u003eSymbolSpec\u003c/code\u003e\u003c/sup\u003e  \n\u003e  \n\u003e Properties:  \n\u003e \u003e **.name** \u003csup\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eFunction name.\u003c/em\u003e  \n\u003e \u003e **.signatureList** \u003csup\u003e\u003ccode\u003e[SignatureSpec](#api-SignatureSpec)[]\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eList of signatures, one for each overload.\u003c/em\u003e  \n\u003e\n\u003e \u003ca name=\"api-IdentifierSpec\"\u003e\u003c/a\u003e\n\u003e ### Class [`IdentifierSpec`](#api-IdentifierSpec)\n\u003e \u003cem\u003eProperty, function / method parameter or variable.\u003c/em\u003e  \n\u003e Source code: [`\u003c\u003e`](http://github.com/charto/readts/blob/ce93baf/src/IdentifierSpec.ts#L11-L34)  \n\u003e  \n\u003e Properties:  \n\u003e \u003e **.name** \u003csup\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eIdentifier name.\u003c/em\u003e  \n\u003e \u003e **.pos** \u003csup\u003e\u003ccode\u003e[SourcePos](#api-SourcePos)\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e **.type** \u003csup\u003e\u003ccode\u003e[TypeSpec](#api-TypeSpec)\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eType definition.\u003c/em\u003e  \n\u003e \u003e **.value**\u003csub\u003e?\u003c/sub\u003e \u003csup\u003e\u003ccode\u003eany\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eLiteral type value\u003c/em\u003e  \n\u003e \u003e **.optional** \u003csup\u003e\u003ccode\u003eboolean\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eInterface members and function / method parameters may be optional.\u003c/em\u003e  \n\u003e \u003e **.doc** \u003csup\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eJSDoc comment.\u003c/em\u003e  \n\u003e\n\u003e \u003ca name=\"api-IndexSpec\"\u003e\u003c/a\u003e\n\u003e ### Class [`IndexSpec`](#api-IndexSpec)\n\u003e \u003cem\u003eIndex signature.\u003c/em\u003e  \n\u003e Source code: [`\u003c\u003e`](http://github.com/charto/readts/blob/62754ee/src/IndexSpec.ts#L9-L21)  \n\u003e  \n\u003e Properties:  \n\u003e \u003e **.signature** \u003csup\u003e\u003ccode\u003e[TypeSpec](#api-TypeSpec)\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eSingature type.\u003c/em\u003e  \n\u003e \u003e **.value** \u003csup\u003e\u003ccode\u003e[TypeSpec](#api-TypeSpec)\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eValue type\u003c/em\u003e  \n\u003e\n\u003e \u003ca name=\"api-ModuleSpec\"\u003e\u003c/a\u003e\n\u003e ### Class [`ModuleSpec`](#api-ModuleSpec)\n\u003e \u003cem\u003eModule or source file.\u003c/em\u003e  \n\u003e Source code: [`\u003c\u003e`](http://github.com/charto/readts/blob/ce93baf/src/ModuleSpec.ts#L11-L58)  \n\u003e  \n\u003e Methods:  \n\u003e \u003e **.isEmpty( )** \u003csup\u003e\u0026rArr; \u003ccode\u003eboolean\u003c/code\u003e\u003c/sup\u003e [`\u003c\u003e`](http://github.com/charto/readts/blob/ce93baf/src/ModuleSpec.ts#L38-L46)  \n\u003e \u003e \u0026emsp;\u003cem\u003eTest if nothing is exported.\u003c/em\u003e  \n\u003e  \n\u003e Properties:  \n\u003e \u003e **.enumList** \u003csup\u003e\u003ccode\u003e[EnumSpec](#api-EnumSpec)[]\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eDefinitions of exported enums.\u003c/em\u003e  \n\u003e \u003e **.classList** \u003csup\u003e\u003ccode\u003e[ClassSpec](#api-ClassSpec)[]\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eDefinitions of exported classes.\u003c/em\u003e  \n\u003e \u003e **.interfaceList** \u003csup\u003e\u003ccode\u003e[ClassSpec](#api-ClassSpec)[]\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eDefinitions of exported interfaces.\u003c/em\u003e  \n\u003e \u003e **.functionList** \u003csup\u003e\u003ccode\u003e[FunctionSpec](#api-FunctionSpec)[]\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eDefinitions of exported functions.\u003c/em\u003e  \n\u003e \u003e **.variableList** \u003csup\u003e\u003ccode\u003e[IdentifierSpec](#api-IdentifierSpec)[]\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eDefinitions of exported variables.\u003c/em\u003e  \n\u003e\n\u003e \u003ca name=\"api-Parser\"\u003e\u003c/a\u003e\n\u003e ### Class [`Parser`](#api-Parser)\n\u003e \u003cem\u003eMain parser class with public methods, also holding its internal state.\u003c/em\u003e  \n\u003e Source code: [`\u003c\u003e`](http://github.com/charto/readts/blob/f0d51fd/src/Parser.ts#L36-L402)  \n\u003e  \n\u003e Methods:  \n\u003e \u003e **.parseConfig( )** \u003csup\u003e\u0026rArr; \u003ccode\u003eParsedCommandLine\u003c/code\u003e\u003c/sup\u003e [`\u003c\u003e`](http://github.com/charto/readts/blob/f0d51fd/src/Parser.ts#L39-L44)  \n\u003e \u003e \u0026emsp;\u003cem\u003eParse a tsconfig.json file using TypeScript services API.\u003c/em\u003e  \n\u003e \u003e \u0026emsp;\u0026#x25aa; tsconfigPath \u003csup\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e **.parse( )** \u003csup\u003e\u0026rArr; \u003ccode\u003e[ModuleSpec](#api-ModuleSpec)[]\u003c/code\u003e\u003c/sup\u003e [`\u003c\u003e`](http://github.com/charto/readts/blob/f0d51fd/src/Parser.ts#L48-L75)  \n\u003e \u003e \u0026emsp;\u003cem\u003eParse a TypeScript project using TypeScript services API and configuration.\u003c/em\u003e  \n\u003e \u003e \u0026emsp;\u0026#x25aa; config \u003csup\u003e\u003ccode\u003eParsedCommandLine\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u0026#x25ab; nameFilter\u003csub\u003e?\u003c/sub\u003e \u003csup\u003e\u003ccode\u003e(pathName: string) =\u0026gt; boolean\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u0026#x25ab; extension\u003csub\u003e?\u003c/sub\u003e \u003csup\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/sup\u003e  \n\u003e\n\u003e \u003ca name=\"api-RefSpec\"\u003e\u003c/a\u003e\n\u003e ### Interface [`RefSpec`](#api-RefSpec)\n\u003e Source code: [`\u003c\u003e`](http://github.com/charto/readts/blob/f0d51fd/src/Parser.ts#L25-L32)  \n\u003e  \n\u003e Properties:  \n\u003e \u003e **.name**\u003csub\u003e?\u003c/sub\u003e \u003csup\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e **.symbol**\u003csub\u003e?\u003c/sub\u003e \u003csup\u003e\u003ccode\u003eSymbol\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e **.class**\u003csub\u003e?\u003c/sub\u003e \u003csup\u003e\u003ccode\u003e[ClassSpec](#api-ClassSpec)\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e **.enum**\u003csub\u003e?\u003c/sub\u003e \u003csup\u003e\u003ccode\u003e[EnumSpec](#api-EnumSpec)\u003c/code\u003e\u003c/sup\u003e  \n\u003e\n\u003e \u003ca name=\"api-SignatureSpec\"\u003e\u003c/a\u003e\n\u003e ### Class [`SignatureSpec`](#api-SignatureSpec)\n\u003e \u003cem\u003eFunction or method signature defining input and output types.\u003c/em\u003e  \n\u003e Source code: [`\u003c\u003e`](http://github.com/charto/readts/blob/c857e04/src/SignatureSpec.ts#L11-L33)  \n\u003e  \n\u003e Methods:  \n\u003e \u003e **new( )** \u003csup\u003e\u0026rArr; \u003ccode\u003e[SignatureSpec](#api-SignatureSpec)\u003c/code\u003e\u003c/sup\u003e [`\u003c\u003e`](http://github.com/charto/readts/blob/c857e04/src/SignatureSpec.ts#L14-L18)  \n\u003e \u003e \u0026emsp;\u0026#x25aa; pos \u003csup\u003e\u003ccode\u003e[SourcePos](#api-SourcePos)\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u0026#x25aa; returnType \u003csup\u003e\u003ccode\u003e[TypeSpec](#api-TypeSpec)\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u0026#x25aa; doc \u003csup\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/sup\u003e  \n\u003e  \n\u003e Properties:  \n\u003e \u003e **.pos** \u003csup\u003e\u003ccode\u003e[SourcePos](#api-SourcePos)\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e **.paramList** \u003csup\u003e\u003ccode\u003e[IdentifierSpec](#api-IdentifierSpec)[]\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eList of parameters.\u003c/em\u003e  \n\u003e \u003e **.returnType** \u003csup\u003e\u003ccode\u003e[TypeSpec](#api-TypeSpec)\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eReturn type definition.\u003c/em\u003e  \n\u003e \u003e **.doc** \u003csup\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eJSDoc comment.\u003c/em\u003e  \n\u003e\n\u003e \u003ca name=\"api-SourcePos\"\u003e\u003c/a\u003e\n\u003e ### Interface [`SourcePos`](#api-SourcePos)\n\u003e Source code: [`\u003c\u003e`](http://github.com/charto/readts/blob/f0d51fd/src/Parser.ts#L8-L12)  \n\u003e  \n\u003e Properties:  \n\u003e \u003e **.sourcePath** \u003csup\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e **.firstLine** \u003csup\u003e\u003ccode\u003enumber\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e **.lastLine** \u003csup\u003e\u003ccode\u003enumber\u003c/code\u003e\u003c/sup\u003e  \n\u003e\n\u003e \u003ca name=\"api-TypeSpec\"\u003e\u003c/a\u003e\n\u003e ### Class [`TypeSpec`](#api-TypeSpec)\n\u003e \u003cem\u003eType definition.\u003c/em\u003e  \n\u003e Source code: [`\u003c\u003e`](http://github.com/charto/readts/blob/ce93baf/src/TypeSpec.ts#L24-L163)  \n\u003e  \n\u003e Methods:  \n\u003e \u003e **.format( )** \u003csup\u003e\u0026rArr; \u003ccode\u003estring\u003c/code\u003e\u003c/sup\u003e [`\u003c\u003e`](http://github.com/charto/readts/blob/ce93baf/src/TypeSpec.ts#L106-L147)  \n\u003e \u003e \u0026emsp;\u003cem\u003eConvert to string, with optional hooks replacing default formatting code.\u003c/em\u003e  \n\u003e \u003e \u0026emsp;\u0026#x25ab; hooks\u003csub\u003e?\u003c/sub\u003e \u003csup\u003e\u003ccode\u003e[FormatHooks](#api-FormatHooks)\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u0026#x25ab; needParens\u003csub\u003e?\u003c/sub\u003e \u003csup\u003e\u003ccode\u003eboolean\u003c/code\u003e\u003c/sup\u003e  \n\u003e  \n\u003e Properties:  \n\u003e \u003e **.name** \u003csup\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eName of the type, only present if not composed of other type or class etc.\u003c/em\u003e  \n\u003e \u003e **.value**\u003csub\u003e?\u003c/sub\u003e \u003csup\u003e\u003ccode\u003estring | number\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eValue of the type, only present if literal type\u003c/em\u003e  \n\u003e \u003e **.ref** \u003csup\u003e\u003ccode\u003e[RefSpec](#api-RefSpec)\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eDefinition of what the type points to, if available.\u003c/em\u003e  \n\u003e \u003e **.unionOf** \u003csup\u003e\u003ccode\u003e[TypeSpec](#api-TypeSpec)[]\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eIf the type is a union, list of the possible types.\u003c/em\u003e  \n\u003e \u003e **.intersectionOf** \u003csup\u003e\u003ccode\u003e[TypeSpec](#api-TypeSpec)[]\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eIf the type is an intersection, list of the possible types.\u003c/em\u003e  \n\u003e \u003e **.arrayOf** \u003csup\u003e\u003ccode\u003e[TypeSpec](#api-TypeSpec)\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eIf the type is an array, its element type.\u003c/em\u003e  \n\u003e \u003e **.argumentList** \u003csup\u003e\u003ccode\u003e[TypeSpec](#api-TypeSpec)[]\u003c/code\u003e\u003c/sup\u003e  \n\u003e \u003e \u0026emsp;\u003cem\u003eArguments of a generic type.\u003c/em\u003e  \n\nLicense\n=======\n\n[The MIT License](https://raw.githubusercontent.com/charto/readts/master/LICENSE)\n\nCopyright (c) 2016 BusFaster Ltd\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharto%2Freadts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharto%2Freadts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharto%2Freadts/lists"}