completedDocsRule.d.ts 4.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /**
  2. * @license
  3. * Copyright 2013 Palantir Technologies, Inc.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License");
  6. * you may not use this file except in compliance with the License.
  7. * You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. import * as ts from "typescript";
  18. import * as Lint from "../index";
  19. import { IInputExclusionDescriptors } from "./completed-docs/exclusionDescriptors";
  20. export declare const ALL = "all";
  21. export declare const ARGUMENT_CLASSES = "classes";
  22. export declare const ARGUMENT_ENUMS = "enums";
  23. export declare const ARGUMENT_ENUM_MEMBERS = "enum-members";
  24. export declare const ARGUMENT_FUNCTIONS = "functions";
  25. export declare const ARGUMENT_INTERFACES = "interfaces";
  26. export declare const ARGUMENT_METHODS = "methods";
  27. export declare const ARGUMENT_NAMESPACES = "namespaces";
  28. export declare const ARGUMENT_PROPERTIES = "properties";
  29. export declare const ARGUMENT_TYPES = "types";
  30. export declare const ARGUMENT_VARIABLES = "variables";
  31. export declare const DESCRIPTOR_TAGS = "tags";
  32. export declare const DESCRIPTOR_LOCATIONS = "locations";
  33. export declare const DESCRIPTOR_PRIVACIES = "privacies";
  34. export declare const DESCRIPTOR_VISIBILITIES = "visibilities";
  35. export declare const LOCATION_INSTANCE = "instance";
  36. export declare const LOCATION_STATIC = "static";
  37. export declare const PRIVACY_PRIVATE = "private";
  38. export declare const PRIVACY_PROTECTED = "protected";
  39. export declare const PRIVACY_PUBLIC = "public";
  40. export declare const TAGS_FOR_CONTENT = "content";
  41. export declare const TAGS_FOR_EXISTENCE = "existence";
  42. export declare const VISIBILITY_EXPORTED = "exported";
  43. export declare const VISIBILITY_INTERNAL = "internal";
  44. export declare type All = typeof ALL;
  45. export declare type DocType = All | typeof ARGUMENT_CLASSES | typeof ARGUMENT_ENUMS | typeof ARGUMENT_ENUM_MEMBERS | typeof ARGUMENT_FUNCTIONS | typeof ARGUMENT_INTERFACES | typeof ARGUMENT_METHODS | typeof ARGUMENT_NAMESPACES | typeof ARGUMENT_PROPERTIES | typeof ARGUMENT_TYPES | typeof ARGUMENT_VARIABLES;
  46. export declare type Location = All | typeof LOCATION_INSTANCE | typeof LOCATION_STATIC;
  47. export declare type Privacy = All | typeof PRIVACY_PRIVATE | typeof PRIVACY_PROTECTED | typeof PRIVACY_PUBLIC;
  48. export declare type Visibility = All | typeof VISIBILITY_EXPORTED | typeof VISIBILITY_INTERNAL;
  49. export declare class Rule extends Lint.Rules.TypedRule {
  50. static FAILURE_STRING_EXIST: string;
  51. static defaultArguments: IInputExclusionDescriptors;
  52. static ARGUMENT_DESCRIPTOR_BLOCK: {
  53. properties: {
  54. [DESCRIPTOR_TAGS]: {
  55. properties: {
  56. [TAGS_FOR_CONTENT]: {
  57. items: {
  58. type: string;
  59. };
  60. type: string;
  61. };
  62. [TAGS_FOR_EXISTENCE]: {
  63. items: {
  64. type: string;
  65. };
  66. type: string;
  67. };
  68. };
  69. };
  70. [DESCRIPTOR_VISIBILITIES]: {
  71. enum: string[];
  72. type: string;
  73. };
  74. };
  75. type: string;
  76. };
  77. static ARGUMENT_DESCRIPTOR_CLASS: {
  78. properties: {
  79. [DESCRIPTOR_TAGS]: {
  80. properties: {
  81. [TAGS_FOR_CONTENT]: {
  82. items: {
  83. type: string;
  84. };
  85. type: string;
  86. };
  87. [TAGS_FOR_EXISTENCE]: {
  88. items: {
  89. type: string;
  90. };
  91. type: string;
  92. };
  93. };
  94. };
  95. [DESCRIPTOR_LOCATIONS]: {
  96. enum: string[];
  97. type: string;
  98. };
  99. [DESCRIPTOR_PRIVACIES]: {
  100. enum: string[];
  101. type: string;
  102. };
  103. };
  104. type: string;
  105. };
  106. static metadata: Lint.IRuleMetadata;
  107. private readonly exclusionFactory;
  108. applyWithProgram(sourceFile: ts.SourceFile, program: ts.Program): Lint.RuleFailure[];
  109. private getExclusionsMap(ruleArguments);
  110. }