提交 95737688 编写于 作者: J Joao Moreno

IColorFormat -> ColorFormat

上级 3e62cf16
......@@ -7,7 +7,7 @@
import * as path from 'path';
import * as parse from 'parse-color';
import { languages, window, commands, workspace, ExtensionContext, DocumentColorProvider, Color, IColorFormat, CancellationToken, TextDocument, ColorInfo } from 'vscode';
import { languages, window, commands, workspace, ExtensionContext, DocumentColorProvider, Color, ColorFormat, CancellationToken, TextDocument, ColorInfo } from 'vscode';
import { LanguageClient, LanguageClientOptions, ServerOptions, TransportKind, RequestType, Range, TextEdit } from 'vscode-languageclient';
import { activateColorDecorations } from './colorDecorators';
......@@ -30,7 +30,7 @@ const CSSColorFormats = {
}
};
function detectFormat(value: string): IColorFormat {
function detectFormat(value: string): ColorFormat {
if (/^rgb/i.test(value)) {
return CSSColorFormats.RGB;
} else if (/^hsl/i.test(value)) {
......
......@@ -101,21 +101,19 @@ declare module 'vscode' {
static fromHex(hex: string): Color;
}
export type IColorFormat = string | { opaque: string, transparent: string };
export type ColorFormat = string | { opaque: string, transparent: string };
// TODO@Michel
export class ColorInfo {
/**
* The range this link applies to.
*/
range: Range;
color: Color;
format: IColorFormat;
format: ColorFormat;
availableFormats: IColorFormat[];
availableFormats: ColorFormat[];
constructor(range: Range, color: Color, format: IColorFormat, availableFormats: IColorFormat[]);
constructor(range: Range, color: Color, format: ColorFormat, availableFormats: ColorFormat[]);
}
export interface DocumentColorProvider {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册