Enable interface-over-type-literal lint rule (#17733)

This commit is contained in:
Andy
2017-09-07 09:14:59 -07:00
committed by GitHub
parent be0633825c
commit 193f4be355
7 changed files with 20 additions and 14 deletions

View File

@@ -1,6 +1,12 @@
/* @internal */
namespace ts.NavigateTo {
type RawNavigateToItem = { name: string; fileName: string; matchKind: PatternMatchKind; isCaseSensitive: boolean; declaration: Declaration };
interface RawNavigateToItem {
name: string;
fileName: string;
matchKind: PatternMatchKind;
isCaseSensitive: boolean;
declaration: Declaration;
}
export function getNavigateToItems(sourceFiles: ReadonlyArray<SourceFile>, checker: TypeChecker, cancellationToken: CancellationToken, searchValue: string, maxResultCount: number, excludeDtsFiles: boolean): NavigateToItem[] {
const patternMatcher = createPatternMatcher(searchValue);

View File

@@ -394,7 +394,7 @@ namespace ts {
* Represents a single refactoring action - for example, the "Extract Method..." refactor might
* offer several actions, each corresponding to a surround class or closure to extract into.
*/
export type RefactorActionInfo = {
export interface RefactorActionInfo {
/**
* The programmatic name of the refactoring action
*/
@@ -406,18 +406,17 @@ namespace ts {
* so this description should make sense by itself if the parent is inlineable=true
*/
description: string;
};
}
/**
* A set of edits to make in response to a refactor action, plus an optional
* location where renaming should be invoked from
*/
export type RefactorEditInfo = {
export interface RefactorEditInfo {
edits: FileTextChanges[];
renameFilename?: string;
renameLocation?: number;
};
}
export interface TextInsertion {
newText: string;