UNPKG

2.78 kBSource Map (JSON)View Raw
1{"version":3,"file":"file.js","sourceRoot":"","sources":["../../../../src/lib/models/sources/file.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AA6C7B,MAAa,UAAU;IA0CnB,YAAY,YAAoB;QAZhC,gBAAW,GAAiB,EAAE,CAAC;QAa3B,IAAI,CAAC,QAAQ,GAAO,YAAY,CAAC;QACjC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,IAAI,GAAW,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IACpD,CAAC;CACJ;AA/CD,gCA+CC","sourcesContent":["import * as Path from 'path';\n\nimport { Reflection } from '../reflections/abstract';\nimport { ReflectionGroup } from '../ReflectionGroup';\nimport { SourceDirectory } from './directory';\n\n/**\n * Represents references of reflections to their defining source files.\n *\n * @see [[DeclarationReflection.sources]]\n */\nexport interface SourceReference {\n /**\n * A reference to the corresponding file instance.\n */\n file?: SourceFile;\n\n /**\n * The filename of the source file.\n */\n fileName: string;\n\n /**\n * The number of the line that emitted the declaration.\n */\n line: number;\n\n character: number;\n\n /**\n * URL for displaying the source file.\n */\n url?: string;\n}\n\n/**\n * Exposes information about a source file.\n *\n * One my access a list of all source files through the [[ProjectReflection.files]] property or as\n * a tree structure through the [[ProjectReflection.directory]] property.\n *\n * Furthermore each reflection carries references to the related SourceFile with their\n * [[DeclarationReflection.sources]] property. It is an array of of [[IDeclarationSource]] instances\n * containing the reference in their [[IDeclarationSource.file]] field.\n */\nexport class SourceFile {\n /**\n * The original full system file name.\n */\n fullFileName: string;\n\n /**\n * A trimmed version of the file name. Contains only the path relative to the\n * determined base path.\n */\n fileName: string;\n\n /**\n * The base name of the file.\n */\n name: string;\n\n /**\n * A url pointing to a page displaying the contents of this file.\n */\n url?: string;\n\n /**\n * The representation of the parent directory of this source file.\n */\n parent?: SourceDirectory;\n\n /**\n * A list of all reflections that are declared in this file.\n */\n reflections: Reflection[] = [];\n\n /**\n * A grouped list of the reflections declared in this file.\n */\n groups?: ReflectionGroup[];\n\n /**\n * Create a new SourceFile instance.\n *\n * @param fullFileName The full file name.\n */\n constructor(fullFileName: string) {\n this.fileName = fullFileName;\n this.fullFileName = fullFileName;\n this.name = Path.basename(fullFileName);\n }\n}\n"]}
\No newline at end of file