UNPKG

22.4 kBSource Map (JSON)View Raw
1{"version":3,"file":"IYamlApiFile.js","sourceRoot":"","sources":["../../src/yaml/IYamlApiFile.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n/**\n * TypeScript interface describing a Universal Reference YAML documentation file,\n * as defined by typescript.schema.json.\n *\n * NOTE: Corresponds to `Microsoft.DocAsCode.DataContracts.UniversalReference.PageViewModel` in DocFX.\n */\nexport interface IYamlApiFile {\n /**\n * The items contained in this file.\n *\n * NOTE: Corresponds to `ExceptionInfo.Items` in DocFX.\n */\n items: IYamlItem[];\n\n /**\n * References to other items.\n *\n * NOTE: Corresponds to `ExceptionInfo.References` in DocFX.\n */\n references?: IYamlReference[];\n\n /**\n * NOTE: Corresponds to `ExceptionInfo.ShouldSkipMarkup` in DocFX.\n */\n shouldSkipMarkup?: boolean;\n}\n\n/**\n * Part of the IYamlApiFile structure. Represents basic API elements such as\n * classes, interfaces, members, etc.\n *\n * NOTE: Corresponds to `Microsoft.DocAsCode.DataContracts.UniversalReference.ItemViewModel` in DocFX.\n */\nexport interface IYamlItem {\n /**\n * The Unique Identifier (UID) for this item.\n *\n * NOTE: Corresponds to `ItemViewModel.Uid` in DocFX.\n */\n uid: string;\n\n /**\n * A Roslyn comment ID (unused).\n *\n * NOTE: Corresponds to `ItemViewModel.CommentId` in DocFX.\n */\n commentId?: string;\n\n /**\n * The ID for this item.\n *\n * NOTE: Corresponds to `ItemViewModel.Id` in DocFX.\n */\n id?: string;\n\n /**\n * The Unique Identifier (UID) of the parent item. This value can vary by development language\n * by setting the relevant `parent.${lang}` property.\n *\n * NOTE: Corresponds to `ItemViewModel.Parent` in DocFX.\n * NOTE: Corresponds to `ItemViewModel.ParentInDevLangs` in DocFX when `parent.${lang}` is used.\n */\n parent?: string;\n 'parent.typeScript'?: string;\n\n /**\n * The Unique Identifiers (UID) of the children of this item. This value can vary by development language\n * by setting the relevant `children.${lang}` property.\n *\n * NOTE: Corresponds to `ItemViewModel.Children` in DocFX.\n * NOTE: Corresponds to `ItemViewModel.ChildrenInDevLangs` in DocFX when `children.${lang}` is used.\n */\n children?: string[];\n 'children.typeScript'?: string[];\n\n /**\n * Item's link URL. An item can only have a single link in cross references, so varying `href` by development\n * languages is not supported.\n *\n * NOTE: Corresponds to `ItemViewModel.Href` in DocFX.\n */\n href?: string;\n\n /**\n * The development languages supported by this item.\n *\n * NOTE: Corresponds to `ItemViewModel.SupportedLanguages` in DocFX.\n */\n langs?: YamlDevLangs[];\n\n /**\n * The local name of this item. This name should generally not be namespace qualified or include\n * parent type information. This value can vary by development language by setting the relevant\n * `name.${lang}` property.\n *\n * NOTE: Corresponds to `ItemViewModel.Name` in DocFX.\n * NOTE: Corresponds to `ItemViewModel.Names` in DocFX when `name.${lang}` is used.\n */\n name?: string;\n 'name.typeScript'?: string;\n\n /**\n * The name of this item including its parent type, if it has one. This name should generally not be namespace\n * qualified. This value can vary by development language by setting the relevant `nameWithType.${lang}` property.\n *\n * NOTE: Corresponds to `ItemViewModel.NameWithType` in DocFX.\n * NOTE: Corresponds to `ItemViewModel.NamesWithType` in DocFX when `nameWithType.${lang}` is used.\n */\n nameWithType?: string;\n 'nameWithType.typeScript'?: string;\n\n /**\n * The namespace-qualified name of this item including its parent type. This value can vary by development language\n * by setting the relevant `fullName.${lang}` property.\n *\n * NOTE: Corresponds to `ItemViewModel.FullName` in DocFX.\n * NOTE: Corresponds to `ItemViewModel.FullNames` in DocFX when `fullName.${lang}` is used.\n */\n fullName?: string;\n 'fullName.typeScript'?: string;\n\n /**\n * The type of source element this item represents. This value cannot vary by development language.\n *\n * NOTE: Corresponds to `ItemViewModel.Type` in DocFX.\n */\n type: YamlTypeId;\n\n /**\n * The location of the item's source. This value can vary by development language by setting the relevant\n * `source.${lang}` property.\n *\n * NOTE: Corresponds to `ItemViewModel.Source` in DocFX.\n * NOTE: Corresponds to `ItemViewModel.SourceInDevLangs` in DocFX when `source.${lang}` is used.\n */\n source?: IYamlSource;\n 'source.typeScript'?: IYamlSource;\n\n /**\n * The location of the item's documentation overrides. This value cannot vary by development language.\n *\n * NOTE: Corresponds to `ItemViewModel.Documentation` in DocFX.\n */\n documentation?: IYamlSource;\n\n /**\n * The names of managed assemblies that contain this item. This value can vary by development language by setting\n * the relevant `assemblies.${lang}` property.\n *\n * NOTE: Corresponds to `ItemViewModel.AssemblyNameList` in DocFX.\n * NOTE: Corresponds to `ItemViewModel.AssemblyNameListInDevLangs` in DocFX when `assemblies.${lang}` is used.\n */\n assemblies?: string[];\n 'assemblies.typeScript'?: string[];\n\n /**\n * The Unique Identifier (UID) of the namespace that contains this item. This value can vary by development language\n * by setting the relevant `namespace.${lang}` property.\n *\n * NOTE: Corresponds to `ItemViewModel.NamespaceName` in DocFX.\n * NOTE: Corresponds to `ItemViewModel.NamespaceNameInDevLangs` in DocFX.\n */\n namespace?: string;\n 'namespace.typeScript'?: string;\n\n /**\n * The summary for the item. This value cannot vary by development language.\n * Markdown is permitted.\n *\n * NOTE: Corresponds to `ItemViewModel.Summary` in DocFX.\n */\n summary?: string;\n\n /**\n * The remarks for the item. This value cannot vary by development language.\n * Markdown is permitted.\n *\n * NOTE: Corresponds to `ItemViewModel.Remarks` in DocFX.\n */\n remarks?: string;\n\n /**\n * The examples for the item. This value cannot vary by development language.\n * Markdown is permitted.\n *\n * NOTE: Corresponds to `ItemViewModel.Examples` in DocFX.\n */\n example?: string[];\n\n /**\n * The syntax for this item. This value itself cannot vary by development language, but\n * instead contains properties that may vary by development language.\n *\n * NOTE: Corresponds to `ItemViewModel.Syntax` in DocFX.\n */\n syntax?: IYamlSyntax;\n\n /**\n * The Unique Identifier (UID) of the member this item overrides. This value can vary by development language\n * by setting the relevant `overridden.${lang}` property.\n *\n * NOTE: Corresponds to `ItemViewModel.Overridden` in DocFX.\n * NOTE: Corresponds to `ItemViewModel.OverriddenInDevLangs` in DocFX when `overriden.${lang}` is used.\n */\n overridden?: string;\n 'overridden.typeScript'?: string;\n\n /**\n * The Unique Identifier (UID) of the member this item overloads. This value can vary by development language\n * by setting the relevant `overload.${lang}` property.\n *\n * NOTE: Corresponds to `ItemViewModel.Overload` in DocFX.\n * NOTE: Corresponds to `ItemViewModel.OverloadInDevLangs` in DocFX when `overload.${lang}` is used.\n */\n overload?: string;\n 'overload.typeScript'?: string;\n\n /**\n * The exceptions thrown by this item. This value can vary by development language by setting the relevant\n * `exceptions.${lang}` property.\n *\n * NOTE: Corresponds to `ItemViewModel.Exceptions` in DocFX.\n * NOTE: Corresponds to `ItemViewModel.ExceptionsInDevLangs` in DocFX when `exceptions.${lang}` is used.\n */\n exceptions?: IYamlException[];\n 'exceptions.typeScript'?: IYamlException[];\n\n /**\n * Links to additional content related to this item.\n *\n * NOTE: Corresponds to `ItemViewModel.SeeAlsos` in DocFX.\n */\n seealso?: IYamlLink[];\n\n /**\n * Additional information about other content related to this item.\n * Markdown is permitted.\n *\n * NOTE: Corresponds to `ItemViewModel.SeeAlsoContent` in DocFX.\n */\n seealsoContent?: string;\n\n /**\n * Links to additional content related to this item.\n *\n * NOTE: Corresponds to `ItemViewModel.Sees` in DocFX.\n */\n see?: IYamlLink[];\n\n /**\n * The inheritance tree for this item. Multiple inheritance is permitted for languages like Python.\n *\n * NOTE: Corresponds to `ItemViewModel.Inheritance` in DocFX.\n * NOTE: Corresponds to `ItemViewModel.InheritanceInDevLangs` in DocFX when `inheritance.${lang}` is used.\n */\n inheritance?: IYamlInheritanceTree[];\n 'inheritance.typeScript'?: IYamlInheritanceTree[];\n\n /**\n * NOTE: Corresponds to `ItemViewModel.DerivedClassses` in DocFX.\n * NOTE: Corresponds to `ItemViewModel.DerivedClasssesInDevLangs` in DocFX when `derivedClasses.${lang}` is used.\n */\n derivedClasses?: string[];\n 'derivedClasses.typeScript'?: string[];\n\n /**\n * NOTE: Corresponds to `ItemViewModel.Implements` in DocFX.\n * NOTE: Corresponds to `ItemViewModel.ImplementsInDevLangs` in DocFX when `implements.${lang}` is used.\n */\n implements?: string[];\n 'implements.typeScript'?: string[];\n\n /**\n * NOTE: Corresponds to `ItemViewModel.InheritedMembers` in DocFX.\n * NOTE: Corresponds to `ItemViewModel.InheritedMembersInDevLangs` in DocFX when `inheritedMembers.${lang}` is used.\n */\n inheritedMembers?: string[];\n 'inheritedMembers.typeScript'?: string[];\n\n /**\n * NOTE: Corresponds to `ItemViewModel.ExtensionMethods` in DocFX.\n * NOTE: Corresponds to `ItemViewModel.ExtensionMethodsInDevLangs` in DocFX when `extensionMethods.${lang}` is used.\n */\n extensionMethods?: string[];\n 'extensionMethods.typeScript'?: string[];\n\n /**\n * NOTE: Corresponds to `ItemViewModel.Conceptual` in DocFX.\n */\n conceptual?: string;\n\n /**\n * NOTE: Corresponds to `ItemViewModel.Platform` in DocFX.\n * NOTE: Corresponds to `ItemViewModel.PlatformInDevLangs` in DocFX when `platform.${lang}` is used.\n */\n platform?: string[];\n 'platform.typeScript'?: string[];\n\n /**\n * NOTE: This is an extension and corresponds to `ItemViewModel.Metadata` in DocFX.\n */\n deprecated?: IYamlDeprecatedNotice;\n\n /**\n * NOTE: This is an extension and corresponds to `ItemViewModel.Metadata` in DocFX.\n */\n extends?: string[];\n\n /**\n * NOTE: This is an extension and corresponds to `ItemViewModel.Metadata` in DocFX.\n */\n isPreview?: boolean;\n\n /**\n * NOTE: In TypeScript, enum members can be strings or integers.\n * If it is an integer, then enumMember.value will be a string representation of the integer.\n * If it is a string, then enumMember.value will include the quotation marks.\n *\n * NOTE: This is an extension and corresponds to `ItemViewModel.Metadata` in DocFX.\n */\n numericValue?: string;\n\n /**\n * NOTE: This is an extension and corresponds to `ItemViewModel.Metadata` in DocFX.\n */\n package?: string;\n}\n\n/**\n * Part of the IYamlApiFile structure. Represents the type of an IYamlItem.\n */\nexport type YamlTypeId =\n | 'class'\n | 'constructor'\n | 'enum'\n | 'field'\n | 'function'\n | 'interface'\n | 'method'\n | 'package'\n | 'property'\n | 'event'\n | 'typealias'\n | 'variable'\n | 'namespace';\n\n/**\n * Development languages supported by the Universal Reference file format, as defined by typescript.schema.json.\n */\nexport type YamlDevLangs = 'typeScript';\n\n/**\n * Part of the IYamlApiFile structure. Documents the source file where an IYamlItem is defined.\n *\n * NOTE: Corresponds to `Microsoft.DocAsCode.DataContracts.Common.SourceDetail` in DocFX.\n */\nexport interface IYamlSource {\n /**\n * Information about the Git repository where this source can be found.\n *\n * NOTE: Corresponds to `SourceDetail.Remote` in DocFX.\n */\n remote?: IYamlRemote;\n\n /**\n * The base path for the source for this item.\n *\n * NOTE: Corresponds to `SourceDetail.BasePath` in DocFX.\n */\n basePath?: string;\n\n /**\n * The name of the item.\n *\n * NOTE: Corresponds to `SourceDetail.Name` in DocFX.\n */\n id?: string;\n\n /**\n * A link to the source for this item.\n *\n * NOTE: Corresponds to `SourceDetail.Href` in DocFX.\n */\n href?: string;\n\n /**\n * The path to the source for this item. This path will be made relative to `basePath` in the documentation.\n *\n * NOTE: Corresponds to `SourceDetail.Path` in DocFX.\n */\n path?: string;\n\n /**\n * The starting line of the source for this item.\n *\n * NOTE: Corresponds to `SourceDetail.StartLine` in DocFX.\n */\n startLine?: number;\n\n /**\n * The ending line of the source for this item.\n *\n * NOTE: Corresponds to `SourceDetail.EndLine` in DocFX.\n */\n endLine?: number;\n\n /**\n * The content of the source for this item.\n *\n * NOTE: Corresponds to `SourceDetail.Content` in DocFX.\n */\n content?: string;\n\n /**\n * Indicates whether the path to the source is not locally available.\n *\n * NOTE: Corresponds to `SourceDetail.IsExternal` in DocFX.\n */\n isExternal?: boolean;\n}\n\n/**\n * Part of the IYamlApiFile structure. Indicates the open source Git repository\n * where an IYamlItem is defined.\n *\n * NOTE: Corresponds to `Microsoft.DocAsCode.DataContracts.Common.GitDetail` in DocFX.\n */\nexport interface IYamlRemote {\n /**\n * The relative path of the current item to the Git repository root directory.\n *\n * NOTE: Corresponds to `GitDetail.RelativePath` in DocFX.\n */\n path?: string;\n\n /**\n * The Git branch in which this item can be found.\n *\n * NOTE: Corresponds to `GitDetail.RemoteBranch` in DocFX.\n */\n branch?: string;\n\n /**\n * The Git repository in which this item can be found.\n *\n * NOTE: Corresponds to `GitDetail.RemoteRepositoryUrl` in DocFX.\n */\n repo?: string;\n}\n\n/**\n * Part of the IYamlApiFile structure. Documents the type signature for an IYamlItem.\n *\n * NOTE: Corresponds to `Microsoft.DocAsCode.DataContracts.UniversalReference.SyntaxDetailViewModel` in DocFX.\n */\nexport interface IYamlSyntax {\n /**\n * The content for the syntax of this item.\n *\n * NOTE: Corresponds to `SyntaxDetailViewModel.Content` in DocFX.\n * NOTE: Corresponds to `SyntaxDetailViewModel.Contents` in DocFX when `content.${lang}` is used.\n */\n content?: string;\n 'content.typeScript'?: string;\n\n /**\n * The parameters for this item.\n *\n * NOTE: Corresponds to `SyntaxDetailViewModel.Parameters` in DocFX.\n */\n parameters?: IYamlParameter[];\n\n /**\n * The type parameters for this item.\n *\n * NOTE: Corresponds to `SyntaxDetailViewModel.TypeParameters` in DocFX.\n */\n typeParameters?: IYamlParameter[];\n\n /**\n * The return type for this item.\n *\n * NOTE: Corresponds to `SyntaxDetailViewModel.Return` in DocFX.\n * NOTE: Corresponds to `SyntaxDetailViewModel.ReturnInDevLangs` in DocFX when `return.${lang}` is used.\n */\n return?: IYamlReturn;\n 'return.typeScript'?: IYamlReturn;\n}\n\n/**\n * Part of the IYamlApiFile structure. Represents a method or function parameter.\n *\n * NOTE: Corresponds to `Microsoft.DocAsCode.DataContracts.UniversalReference.ApiParameter` in DocFX.\n */\nexport interface IYamlParameter {\n /**\n * The name of the parameter.\n *\n * NOTE: Corresponds to `ApiParameter.Name` in DocFX.\n */\n id?: string;\n\n /**\n * The Unique Identifiers (UIDs) of the types for this parameter.\n *\n * NOTE: Corresponds to `ApiParameter.Type` in DocFX.\n */\n type?: string[];\n\n /**\n * The description for this parameter.\n * Markdown is permitted.\n *\n * NOTE: Corresponds to `ApiParameter.Description` in DocFX.\n */\n description?: string;\n\n /**\n * Indicates whether the parameter is optional.\n *\n * NOTE: Corresponds to `ApiParameter.Optional` in DocFX.\n */\n optional?: boolean;\n\n /**\n * The default value for the parameter.\n *\n * NOTE: Corresponds to `ApiParameter.DefaultValue` in DocFX.\n */\n defaultValue?: string;\n}\n\n/**\n * Part of the IYamlApiFile structure. Documents the return value of a function\n * or method.\n *\n * NOTE: Corresponds to `Microsoft.DocAsCode.DataContracts.UniversalReference.ApiParameter` in DocFX.\n */\nexport interface IYamlReturn {\n /**\n * The Unique Identifiers (UIDs) of the types for this parameter.\n *\n * NOTE: Corresponds to `ApiParameter.Type` in DocFX.\n */\n type?: string[];\n\n /**\n * The description for this parameter.\n * Markdown is permitted.\n *\n * NOTE: Corresponds to `ApiParameter.Description` in DocFX.\n */\n description?: string;\n}\n\n/**\n * Part of the IYamlApiFile structure. Used to document exceptions that can be thrown\n * by a method, property, function, or constructor.\n *\n * NOTE: Corresponds to `Microsoft.DocAsCode.DataContracts.UniversalReference.ExceptionInfo` in DocFX.\n */\nexport interface IYamlException {\n /**\n * The Unique Identifier (UID) of the type for this exception.\n *\n * NOTE: Corresponds to `ExceptionInfo.Type` in DocFX.\n */\n type?: string;\n\n /**\n * The description for this exception.\n *\n * NOTE: Corresponds to `ExceptionInfo.Description` in DocFX.\n */\n description?: string;\n}\n\n/**\n * Part of the IYamlApiFile structure. Used to indicate links to external content or other documentation.\n *\n * NOTE: Corresponds to `Microsoft.DocAsCode.DataContracts.UniversalReference.LinkInfo` in DocFX.\n */\nexport interface IYamlLink {\n /**\n * The type of link.\n *\n * The value `\"CRef\"` indicates that `linkId` is a Unique Identifier (UID) reference to\n * another documentation entry.\n *\n * The value `\"HRef\"` indicates that `linkId` is a link to external documentation.\n * NOTE: Corresponds to `LinkInfo.LinkType` in DocFX.\n */\n linkType: 'CRef' | 'HRef';\n\n /**\n * When `linkType` is `\"CRef\"`, this is a Unique Identifier (UID) reference to another documentation entry.\n *\n * When `linkType` is `\"HRef\"`, this is a link to external documentation.\n *\n * NOTE: Corresponds to `LinkInfo.LinkId` in DocFX.\n */\n linkId: string;\n\n /**\n * A Roslyn comment ID for this link.\n *\n * NOTE: Corresponds to `LinkInfo.CommentId` in DocFX.\n */\n commentId?: string;\n\n /**\n * Alternate text to display for thie link.\n *\n * NOTE: Corresponds to `LinkInfo.AltText` in DocFX.\n */\n altText?: string;\n}\n\n/**\n * Part of the IYamlApiFile structure. Represents the inheritance hierarchy of an item.\n *\n * NOTE: Corresponds to `Microsoft.DocAsCode.DataContracts.UniversalReference.InheritanceTree` in DocFX.\n */\nexport interface IYamlInheritanceTree {\n /**\n * The Unique Identifier (UID) of the type from which an item or type inherits.\n *\n * NOTE: Corresponds to `InheritanceTree.Type` in DocFX.\n */\n type: string;\n\n /**\n * The inheritance tree for the specified type. Multiple inheritance is permitted for languages like Python.\n *\n * NOTE: Corresponds to `InheritanceTree.Inheritance` in DocFX.\n */\n inheritance?: IYamlInheritanceTree[];\n}\n\n/**\n * Part of the IYamlApiFile structure. Represents a reference to an item that is\n * declared in a separate YAML file.\n *\n * NOTE: Corresponds to `Microsoft.DocAsCode.DataContracts.Common.ReferenceViewModel` in DocFX.\n */\nexport interface IYamlReference {\n /**\n * NOTE: Corresponds to `ReferenceViewModel.Uid` in DocFX.\n */\n uid?: string;\n\n /**\n * NOTE: Corresponds to `ReferenceViewModel.CommentId` in DocFX.\n */\n commentId?: string;\n\n /**\n * NOTE: Corresponds to `ReferenceViewModel.Parent` in DocFX.\n */\n parent?: string;\n\n /**\n * NOTE: Corresponds to `ReferenceViewModel.Definition` in DocFX.\n */\n definition?: string;\n\n /**\n * NOTE: Corresponds to `ReferenceViewModel.IsExternal` in DocFX.\n */\n isExternal?: boolean;\n\n /**\n * NOTE: Corresponds to `ReferenceViewModel.Href` in DocFX.\n */\n href?: string;\n\n /**\n * NOTE: Corresponds to `ReferenceViewModel.Name` in DocFX.\n * NOTE: Corresponds to `ReferenceViewModel.NameInDevLangs` in DocFX when `name.${lang}` is used.\n */\n name?: string;\n 'name.typeScript'?: string;\n\n /**\n * NOTE: Corresponds to `ReferenceViewModel.NameWithType` in DocFX.\n * NOTE: Corresponds to `ReferenceViewModel.NameWithTypeInDevLangs` in DocFX when `nameWithType.${lang}` is used.\n */\n nameWithType?: string;\n 'nameWithType.typeScript'?: string;\n\n /**\n * NOTE: Corresponds to `ReferenceViewModel.FullName` in DocFX.\n * NOTE: Corresponds to `ReferenceViewModel.FullNameInDevLangs` in DocFX when `fullName.${lang}` is used.\n */\n fullName?: string;\n 'fullName.typeScript'?: string;\n\n /**\n * NOTE: Corresponds to `ReferenceViewModel.Spec` in DocFX.\n */\n 'spec.typeScript'?: IYamlReferenceSpec[];\n}\n\n/**\n * Part of the IYamlApiFile structure. Represents a text specification for a reference.\n *\n * NOTE: Corresponds to `Microsoft.DocAsCode.DataContracts.Common.SpecViewModel` in DocFX.\n */\nexport interface IYamlReferenceSpec {\n /**\n * NOTE: Corresponds to `SpecViewModel.Uid` in DocFX.\n */\n uid?: string;\n\n /**\n * NOTE: Corresponds to `SpecViewModel.Name` in DocFX.\n */\n name?: string;\n\n /**\n * NOTE: Corresponds to `SpecViewModel.NameWithType` in DocFX.\n */\n nameWithType?: string;\n\n /**\n * NOTE: Corresponds to `SpecViewModel.FullName` in DocFX.\n */\n fullName?: string;\n\n /**\n * NOTE: Corresponds to `SpecViewModel.IsExternal` in DocFX.\n */\n isExternal?: boolean;\n\n /**\n * NOTE: Corresponds to `SpecViewModel.Href` in DocFX.\n */\n href?: string;\n}\n\n/**\n * NOTE: This is an extension to the Universal Reference format and does not correspond to\n * a known type in DocFX.\n */\nexport interface IYamlDeprecatedNotice {\n content: string;\n}\n"]}
\No newline at end of file