UNPKG

27.4 kBSource Map (JSON)View Raw
1{"version":3,"file":"abstract.js","sourceRoot":"","sources":["../../../../src/lib/models/reflections/abstract.ts"],"names":[],"mappings":";;AAoBA,IAAI,aAAa,GAAG,CAAC,CAAC;AAOtB,SAAgB,iBAAiB;IAC7B,aAAa,GAAG,CAAC,CAAC;AACtB,CAAC;AAFD,8CAEC;AAKD,IAAY,cAiCX;AAjCD,WAAY,cAAc;IACtB,uDAAU,CAAA;IACV,uEAAkB,CAAA;IAClB,uDAAU,CAAA;IACV,mDAAQ,CAAA;IACR,gEAAe,CAAA;IACf,4DAAa,CAAA;IACb,4DAAa,CAAA;IACb,uDAAW,CAAA;IACX,+DAAe,CAAA;IACf,mEAAiB,CAAA;IACjB,8DAAe,CAAA;IACf,0DAAa,CAAA;IACb,wEAAoB,CAAA;IACpB,0EAAqB,CAAA;IACrB,uFAA4B,CAAA;IAC5B,iEAAiB,CAAA;IACjB,qEAAmB,CAAA;IACnB,0EAAsB,CAAA;IACtB,gEAAiB,CAAA;IACjB,wEAAqB,CAAA;IACrB,yEAAsB,CAAA;IACtB,2EAAuB,CAAA;IACvB,mEAAmB,CAAA;IACnB,2DAAe,CAAA;IAEf,6EAAoC,CAAA;IACpC,kFAAwC,CAAA;IACxC,8EAAmD,CAAA;IACnD,2EAAmG,CAAA;IACnG,+DAAoC,CAAA;IACpC,iEAA8D,CAAA;IAC9D,mEAA+C,CAAA;AACnD,CAAC,EAjCW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAiCzB;AAED,IAAY,cAgBX;AAhBD,WAAY,cAAc;IACtB,mDAAQ,CAAA;IACR,yDAAW,CAAA;IACX,6DAAa,CAAA;IACb,uDAAU,CAAA;IACV,uDAAU,CAAA;IACV,4DAAa,CAAA;IACb,4EAAqB,CAAA;IACrB,4DAAa,CAAA;IACb,6DAAc,CAAA;IACd,qEAAkB,CAAA;IAClB,qDAAU,CAAA;IACV,oFAA0B,CAAA;IAC1B,8DAAe,CAAA;IACf,wDAAY,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,CAAC,CAAC,KAAK,EAAE,EAAE;YACpB,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;QAEH,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;CACJ;AA3TD,gCA2TC","sourcesContent":["import { SourceReference } from '../sources/file';\nimport { Type } from '../types/index';\nimport { Comment } from '../comments/comment';\nimport { TypeParameterReflection } from './type-parameter';\n\n/**\n * Holds all data models used by TypeDoc.\n *\n * The [[BaseReflection]] is base class of all reflection models. The subclass [[ProjectReflection]]\n * serves as the root container for the current project while [[DeclarationReflection]] instances\n * form the structure of the project. Most of the other classes in this namespace are referenced by this\n * two base classes.\n *\n * The models [[NavigationItem]] and [[UrlMapping]] are special as they are only used by the [[Renderer]]\n * while creating the final output.\n */\n\n/**\n * Current reflection id.\n */\nlet REFLECTION_ID = 0;\n\n/**\n * Reset the reflection id.\n *\n * Used by the test cases to ensure the reflection ids won't change between runs.\n */\nexport function resetReflectionID() {\n REFLECTION_ID = 0;\n}\n\n/**\n * Defines the available reflection kinds.\n */\nexport enum ReflectionKind {\n Global = 0,\n ExternalModule = 1,\n Module = 2,\n Enum = 4,\n EnumMember = 16,\n Variable = 32,\n Function = 64,\n Class = 128,\n Interface = 256,\n Constructor = 512,\n Property = 1024,\n Method = 2048,\n CallSignature = 4096,\n IndexSignature = 8192,\n ConstructorSignature = 16384,\n Parameter = 32768,\n TypeLiteral = 65536,\n TypeParameter = 131072,\n Accessor = 262144,\n GetSignature = 524288,\n SetSignature = 1048576,\n ObjectLiteral = 2097152,\n TypeAlias = 4194304,\n Event = 8388608,\n\n ClassOrInterface = Class | Interface,\n VariableOrProperty = Variable | Property,\n FunctionOrMethod = ReflectionKind.Function | Method,\n SomeSignature = CallSignature | IndexSignature | ConstructorSignature | GetSignature | SetSignature,\n SomeModule = Module | ExternalModule,\n SomeType = Interface | TypeLiteral | TypeParameter | TypeAlias,\n SomeValue = Variable | Function | ObjectLiteral\n}\n\nexport enum ReflectionFlag {\n None = 0,\n Private = 1,\n Protected = 2,\n Public = 4,\n Static = 8,\n Exported = 16,\n ExportAssignment = 32,\n External = 64,\n Optional = 128,\n DefaultValue = 256,\n Rest = 512,\n ConstructorProperty = 1024,\n Abstract = 2048,\n Const = 4096,\n Let = 8192\n}\n\nconst relevantFlags: ReflectionFlag[] = [\n ReflectionFlag.Private,\n ReflectionFlag.Protected,\n ReflectionFlag.Static,\n ReflectionFlag.ExportAssignment,\n ReflectionFlag.Optional,\n ReflectionFlag.DefaultValue,\n ReflectionFlag.Rest,\n ReflectionFlag.Abstract,\n ReflectionFlag.Let,\n ReflectionFlag.Const\n];\n\n/**\n * This must extend Array in order to work with Handlebar's each helper.\n */\nexport class ReflectionFlags extends Array<string> {\n private flags = ReflectionFlag.None;\n\n hasFlag(flag: ReflectionFlag) {\n return (flag & this.flags) !== 0;\n }\n\n /**\n * Is this a private member?\n */\n get isPrivate(): boolean {\n return this.hasFlag(ReflectionFlag.Private);\n }\n\n /**\n * Is this a protected member?\n */\n get isProtected(): boolean {\n return this.hasFlag(ReflectionFlag.Protected);\n }\n\n /**\n * Is this a public member?\n */\n get isPublic(): boolean {\n return this.hasFlag(ReflectionFlag.Public);\n }\n\n /**\n * Is this a static member?\n */\n get isStatic(): boolean {\n return this.hasFlag(ReflectionFlag.Static);\n }\n\n /**\n * Is this member exported?\n */\n get isExported(): boolean {\n return this.hasFlag(ReflectionFlag.Exported);\n }\n\n /**\n * Is this a declaration from an external document?\n */\n get isExternal(): boolean {\n return this.hasFlag(ReflectionFlag.External);\n }\n\n /**\n * Whether this reflection is an optional component or not.\n *\n * Applies to function parameters and object members.\n */\n get isOptional(): boolean {\n return this.hasFlag(ReflectionFlag.Optional);\n }\n\n /**\n * Whether it's a rest parameter, like `foo(...params);`.\n */\n get isRest(): boolean {\n return this.hasFlag(ReflectionFlag.Rest);\n }\n\n get hasExportAssignment(): boolean {\n return this.hasFlag(ReflectionFlag.ExportAssignment);\n }\n\n get isConstructorProperty(): boolean {\n return this.hasFlag(ReflectionFlag.ConstructorProperty);\n }\n\n get isAbstract(): boolean {\n return this.hasFlag(ReflectionFlag.Abstract);\n }\n\n get isConst() {\n return this.hasFlag(ReflectionFlag.Const);\n }\n\n get isLet() {\n return this.hasFlag(ReflectionFlag.Let);\n }\n\n setFlag(flag: ReflectionFlag, set: boolean) {\n switch (flag) {\n case ReflectionFlag.Private:\n this.setSingleFlag(ReflectionFlag.Private, set);\n if (set) {\n this.setFlag(ReflectionFlag.Protected, false);\n this.setFlag(ReflectionFlag.Public, false);\n }\n break;\n case ReflectionFlag.Protected:\n this.setSingleFlag(ReflectionFlag.Protected, set);\n if (set) {\n this.setFlag(ReflectionFlag.Private, false);\n this.setFlag(ReflectionFlag.Public, false);\n }\n break;\n case ReflectionFlag.Public:\n this.setSingleFlag(ReflectionFlag.Public, set);\n if (set) {\n this.setFlag(ReflectionFlag.Private, false);\n this.setFlag(ReflectionFlag.Protected, false);\n }\n break;\n case ReflectionFlag.Const:\n case ReflectionFlag.Let:\n this.setSingleFlag(flag, set);\n this.setSingleFlag((ReflectionFlag.Let | ReflectionFlag.Const) ^ flag, !set);\n default:\n this.setSingleFlag(flag, set);\n }\n }\n\n private setSingleFlag(flag: ReflectionFlag, set: boolean) {\n const name = ReflectionFlag[flag].replace(/(.)([A-Z])/g, (m, a, b) => a + ' ' + b.toLowerCase());\n if (!set && this.hasFlag(flag)) {\n if (relevantFlags.includes(flag)) {\n this.splice(this.indexOf(name), 1);\n }\n this.flags ^= flag;\n } else if (set && !this.hasFlag(flag)) {\n if (relevantFlags.includes(flag)) {\n this.push(name);\n }\n this.flags |= flag;\n }\n }\n}\n\nexport interface DefaultValueContainer extends Reflection {\n defaultValue?: string;\n}\n\nexport interface TypeContainer extends Reflection {\n type?: Type;\n}\n\nexport interface TypeParameterContainer extends Reflection {\n typeParameters?: TypeParameterReflection[];\n}\n\nexport enum TraverseProperty {\n Children,\n Parameters,\n TypeLiteral,\n TypeParameter,\n Signatures,\n IndexSignature,\n GetSignature,\n SetSignature\n}\n\nexport interface TraverseCallback {\n /**\n * May return false to bail out of any further iteration. To preserve backwards compatibility, if\n * a function returns undefined, iteration must continue.\n */\n (reflection: Reflection, property: TraverseProperty): boolean | void;\n}\n\n/**\n * Defines the usage of a decorator.\n */\nexport interface Decorator {\n /**\n * The name of the decorator being applied.\n */\n name: string;\n\n /**\n * The type declaring the decorator.\n * Usually a ReferenceType instance pointing to the decorator function.\n */\n type?: Type;\n\n /**\n * A named map of arguments the decorator is applied with.\n */\n arguments?: any;\n}\n\n/**\n * Base class for all reflection classes.\n *\n * While generating a documentation, TypeDoc generates an instance of [[ProjectReflection]]\n * as the root for all reflections within the project. All other reflections are represented\n * by the [[DeclarationReflection]] class.\n *\n * This base class exposes the basic properties one may use to traverse the reflection tree.\n * You can use the [[children]] and [[parent]] properties to walk the tree. The [[groups]] property\n * contains a list of all children grouped and sorted for being rendered.\n */\nexport abstract class Reflection {\n /**\n * Unique id of this reflection.\n */\n id: number;\n\n /**\n * The symbol name of this reflection.\n */\n name = '';\n\n /**\n * The original name of the TypeScript declaration.\n */\n originalName: string;\n\n /**\n * The kind of this reflection.\n */\n kind: ReflectionKind;\n\n /**\n * The human readable string representation of the kind of this reflection.\n */\n kindString?: string;\n\n flags: ReflectionFlags = new ReflectionFlags();\n\n /**\n * The reflection this reflection is a child of.\n */\n parent?: Reflection;\n\n /**\n * The parsed documentation comment attached to this reflection.\n */\n comment?: Comment;\n\n /**\n * A list of all source files that contributed to this reflection.\n */\n sources?: SourceReference[];\n\n /**\n * A list of all decorators attached to this reflection.\n */\n decorators?: Decorator[];\n\n /**\n * A list of all types that are decorated by this reflection.\n */\n decorates?: Type[];\n\n /**\n * The url of this reflection in the generated documentation.\n * TODO: Reflections shouldn't know urls exist. Move this to a serializer.\n */\n url?: string;\n\n /**\n * The name of the anchor of this child.\n * TODO: Reflections shouldn't know anchors exist. Move this to a serializer.\n */\n anchor?: string;\n\n /**\n * Is the url pointing to an individual document?\n *\n * When FALSE, the url points to an anchor tag on a page of a different reflection.\n * TODO: Reflections shouldn't know how they are rendered. Move this to the correct serializer.\n */\n hasOwnDocument?: boolean;\n\n /**\n * A list of generated css classes that should be applied to representations of this\n * reflection in the generated markup.\n * TODO: Reflections shouldn't know about CSS. Move this property to the correct serializer.\n */\n cssClasses?: string;\n\n /**\n * Url safe alias for this reflection.\n *\n * @see [[BaseReflection.getAlias]]\n */\n private _alias?: string;\n\n private _aliases?: string[];\n\n /**\n * Create a new BaseReflection instance.\n */\n constructor(name: string, kind: ReflectionKind, parent?: Reflection) {\n this.id = REFLECTION_ID++;\n this.parent = parent;\n this.name = name;\n this.originalName = name;\n this.kind = kind;\n }\n\n /**\n * Test whether this reflection is of the given kind.\n */\n kindOf(kind: ReflectionKind | ReflectionKind[]): boolean {\n const kindArray = Array.isArray(kind) ? kind : [kind];\n return kindArray.some(kind => (this.kind & kind) !== 0);\n }\n\n /**\n * Return the full name of this reflection.\n *\n * The full name contains the name of this reflection and the names of all parent reflections.\n *\n * @param separator Separator used to join the names of the reflections.\n * @returns The full name of this reflection.\n */\n getFullName(separator: string = '.'): string {\n if (this.parent && !this.parent.isProject()) {\n return this.parent.getFullName(separator) + separator + this.name;\n } else {\n return this.name;\n }\n }\n\n /**\n * Set a flag on this reflection.\n */\n setFlag(flag: ReflectionFlag, value: boolean = true) {\n this.flags.setFlag(flag, value);\n }\n\n /**\n * Return an url safe alias for this reflection.\n */\n getAlias(): string {\n if (!this._alias) {\n let alias = this.name.replace(/[^a-z0-9]/gi, '_').toLowerCase();\n if (alias === '') {\n alias = 'reflection-' + this.id;\n }\n\n let target = <Reflection> this;\n while (target.parent && !target.parent.isProject() && !target.hasOwnDocument) {\n target = target.parent;\n }\n\n if (!target._aliases) {\n target._aliases = [];\n }\n let suffix = '', index = 0;\n while (target._aliases.includes(alias + suffix)) {\n suffix = '-' + (++index).toString();\n }\n\n alias += suffix;\n target._aliases.push(alias);\n this._alias = alias;\n }\n\n return this._alias;\n }\n\n /**\n * Has this reflection a visible comment?\n *\n * @returns TRUE when this reflection has a visible comment.\n */\n hasComment(): boolean {\n return this.comment ? this.comment.hasVisibleComponent() : false;\n }\n\n hasGetterOrSetter(): boolean {\n return false;\n }\n\n /**\n * Return a child by its name.\n *\n * @param names The name hierarchy of the child to look for.\n * @returns The found child or undefined.\n */\n getChildByName(arg: string | string[]): Reflection | undefined {\n const names: string[] = Array.isArray(arg) ? arg : arg.split('.');\n const name = names[0];\n let result: Reflection | undefined;\n\n this.traverse((child) => {\n if (child.name === name) {\n if (names.length <= 1) {\n result = child;\n } else {\n result = child.getChildByName(names.slice(1));\n }\n return false;\n }\n });\n\n return result;\n }\n\n /**\n * Return whether this reflection is the root / project reflection.\n */\n isProject(): boolean { // this is ProjectReflection\n return false;\n }\n\n /**\n * Try to find a reflection by its name.\n *\n * @return The found reflection or null.\n */\n findReflectionByName(arg: string | string[]): Reflection | undefined {\n const names: string[] = Array.isArray(arg) ? arg : arg.split('.');\n\n const reflection = this.getChildByName(names);\n if (reflection) {\n return reflection;\n } else if (this.parent) {\n return this.parent.findReflectionByName(names);\n }\n }\n\n /**\n * Traverse all potential child reflections of this reflection.\n *\n * The given callback will be invoked for all children, signatures and type parameters\n * attached to this reflection.\n *\n * @param callback The callback function that should be applied for each child reflection.\n */\n traverse(callback: TraverseCallback) { }\n\n /**\n * Return a raw object representation of this reflection.\n * @deprecated Use serializers instead\n */\n toObject(): any {\n const result: any = {\n id: this.id,\n name: this.name,\n kind: this.kind,\n kindString: this.kindString,\n flags: {}\n };\n\n if (this.originalName !== this.name) {\n result.originalName = this.originalName;\n }\n\n if (this.comment) {\n result.comment = this.comment.toObject();\n }\n\n Object.getOwnPropertyNames(ReflectionFlags.prototype).forEach(name => {\n const descriptor = Object.getOwnPropertyDescriptor(ReflectionFlags.prototype, name)!;\n if (typeof descriptor.get === 'function' && this.flags[name] === true) {\n result.flags[name] = true;\n }\n });\n\n if (this.decorates) {\n result.decorates = this.decorates.map((type) => type.toObject());\n }\n\n if (this.decorators) {\n result.decorators = this.decorators.map((decorator) => {\n const result: any = { name: decorator.name };\n if (decorator.type) {\n result.type = decorator.type.toObject();\n }\n if (decorator.arguments) {\n result.arguments = decorator.arguments;\n }\n return result;\n });\n }\n\n this.traverse((child, property) => {\n if (property === TraverseProperty.TypeLiteral) {\n return;\n }\n let name = TraverseProperty[property];\n name = name.substr(0, 1).toLowerCase() + name.substr(1);\n if (!result[name]) {\n result[name] = [];\n }\n result[name].push(child.toObject());\n });\n\n return result;\n }\n\n /**\n * Return a string representation of this reflection.\n */\n toString(): string {\n return ReflectionKind[this.kind] + ' ' + this.name;\n }\n\n /**\n * Return a string representation of this reflection and all of its children.\n *\n * @param indent Used internally to indent child reflections.\n */\n toStringHierarchy(indent: string = '') {\n const lines = [indent + this.toString()];\n\n indent += ' ';\n this.traverse((child) => {\n lines.push(child.toStringHierarchy(indent));\n });\n\n return lines.join('\\n');\n }\n}\n"]}
\No newline at end of file