-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
1,861 additions
and
1,857 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
import { PluginContext } from "rollup"; | ||
export declare enum VerbosityLevel { | ||
Error = 0, | ||
Warning = 1, | ||
Info = 2, | ||
Debug = 3 | ||
} | ||
/** cannot be used in options hook (which does not have this.warn and this.error), but can be in other hooks */ | ||
export declare class RollupContext { | ||
private verbosity; | ||
private bail; | ||
private context; | ||
private prefix; | ||
constructor(verbosity: VerbosityLevel, bail: boolean, context: PluginContext, prefix?: string); | ||
warn(message: string | (() => string)): void; | ||
error(message: string | (() => string)): void | never; | ||
info(message: string | (() => string)): void; | ||
debug(message: string | (() => string)): void; | ||
} | ||
import { PluginContext } from "rollup"; | ||
export declare enum VerbosityLevel { | ||
Error = 0, | ||
Warning = 1, | ||
Info = 2, | ||
Debug = 3 | ||
} | ||
/** cannot be used in options hook (which does not have this.warn and this.error), but can be in other hooks */ | ||
export declare class RollupContext { | ||
private verbosity; | ||
private bail; | ||
private context; | ||
private prefix; | ||
constructor(verbosity: VerbosityLevel, bail: boolean, context: PluginContext, prefix?: string); | ||
warn(message: string | (() => string)): void; | ||
error(message: string | (() => string)): void | never; | ||
info(message: string | (() => string)): void; | ||
debug(message: string | (() => string)): void; | ||
} | ||
//# sourceMappingURL=context.d.ts.map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
/// <reference types="node" /> | ||
import * as path from "path"; | ||
import * as tsTypes from "typescript"; | ||
export declare class FormatHost implements tsTypes.FormatDiagnosticsHost { | ||
getCurrentDirectory(): string; | ||
getCanonicalFileName: typeof path.normalize; | ||
getNewLine: () => string; | ||
} | ||
export declare const formatHost: FormatHost; | ||
/// <reference types="node" /> | ||
import * as path from "path"; | ||
import * as tsTypes from "typescript"; | ||
export declare class FormatHost implements tsTypes.FormatDiagnosticsHost { | ||
getCurrentDirectory(): string; | ||
getCanonicalFileName: typeof path.normalize; | ||
getNewLine: () => string; | ||
} | ||
export declare const formatHost: FormatHost; | ||
//# sourceMappingURL=diagnostics-format-host.d.ts.map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import * as tsTypes from "typescript"; | ||
import { RollupContext } from "./context"; | ||
export interface IDiagnostics { | ||
flatMessage: string; | ||
formatted: string; | ||
fileLine?: string; | ||
category: tsTypes.DiagnosticCategory; | ||
code: number; | ||
type: string; | ||
} | ||
export declare function convertDiagnostic(type: string, data: tsTypes.Diagnostic[]): IDiagnostics[]; | ||
export declare function printDiagnostics(context: RollupContext, diagnostics: IDiagnostics[], pretty?: boolean): void; | ||
import * as tsTypes from "typescript"; | ||
import { RollupContext } from "./context"; | ||
export interface IDiagnostics { | ||
flatMessage: string; | ||
formatted: string; | ||
fileLine?: string; | ||
category: tsTypes.DiagnosticCategory; | ||
code: number; | ||
type: string; | ||
} | ||
export declare function convertDiagnostic(type: string, data: tsTypes.Diagnostic[]): IDiagnostics[]; | ||
export declare function printDiagnostics(context: RollupContext, diagnostics: IDiagnostics[], pretty?: boolean): void; | ||
//# sourceMappingURL=diagnostics.d.ts.map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import * as tsTypes from "typescript"; | ||
import { IOptions } from "./ioptions"; | ||
import { RollupContext } from "./context"; | ||
export declare function getOptionsOverrides({ useTsconfigDeclarationDir, cacheRoot }: IOptions, preParsedTsconfig?: tsTypes.ParsedCommandLine): tsTypes.CompilerOptions; | ||
export declare function createFilter(context: RollupContext, pluginOptions: IOptions, parsedConfig: tsTypes.ParsedCommandLine): (id: unknown) => boolean; | ||
import * as tsTypes from "typescript"; | ||
import { IOptions } from "./ioptions"; | ||
import { RollupContext } from "./context"; | ||
export declare function getOptionsOverrides({ useTsconfigDeclarationDir, cacheRoot }: IOptions, preParsedTsconfig?: tsTypes.ParsedCommandLine): tsTypes.CompilerOptions; | ||
export declare function createFilter(context: RollupContext, pluginOptions: IOptions, parsedConfig: tsTypes.ParsedCommandLine): (id: unknown) => boolean; | ||
//# sourceMappingURL=get-options-overrides.d.ts.map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
import * as tsTypes from "typescript"; | ||
import { TransformerFactoryCreator } from "./ioptions"; | ||
export declare class LanguageServiceHost implements tsTypes.LanguageServiceHost { | ||
private parsedConfig; | ||
private transformers; | ||
private cwd; | ||
private snapshots; | ||
private versions; | ||
private service?; | ||
private fileNames; | ||
constructor(parsedConfig: tsTypes.ParsedCommandLine, transformers: TransformerFactoryCreator[], cwd: string); | ||
reset(): void; | ||
setLanguageService(service: tsTypes.LanguageService): void; | ||
setSnapshot(fileName: string, source: string): tsTypes.IScriptSnapshot; | ||
getScriptSnapshot(fileName: string): tsTypes.IScriptSnapshot | undefined; | ||
getScriptFileNames: () => string[]; | ||
getScriptVersion(fileName: string): string; | ||
getCustomTransformers(): tsTypes.CustomTransformers | undefined; | ||
getCompilationSettings: () => tsTypes.CompilerOptions; | ||
getTypeRootsVersion: () => number; | ||
getCurrentDirectory: () => string; | ||
useCaseSensitiveFileNames: () => boolean; | ||
getDefaultLibFileName: typeof tsTypes.getDefaultLibFilePath; | ||
readDirectory: (path: string, extensions?: readonly string[] | undefined, exclude?: readonly string[] | undefined, include?: readonly string[] | undefined, depth?: number | undefined) => string[]; | ||
readFile: (path: string, encoding?: string | undefined) => string | undefined; | ||
fileExists: (path: string) => boolean; | ||
directoryExists: (path: string) => boolean; | ||
getDirectories: (path: string) => string[]; | ||
realpath: (path: string) => string; | ||
trace: { | ||
(...data: any[]): void; | ||
(message?: any, ...optionalParams: any[]): void; | ||
}; | ||
} | ||
import * as tsTypes from "typescript"; | ||
import { TransformerFactoryCreator } from "./ioptions"; | ||
export declare class LanguageServiceHost implements tsTypes.LanguageServiceHost { | ||
private parsedConfig; | ||
private transformers; | ||
private cwd; | ||
private snapshots; | ||
private versions; | ||
private service?; | ||
private fileNames; | ||
constructor(parsedConfig: tsTypes.ParsedCommandLine, transformers: TransformerFactoryCreator[], cwd: string); | ||
reset(): void; | ||
setLanguageService(service: tsTypes.LanguageService): void; | ||
setSnapshot(fileName: string, source: string): tsTypes.IScriptSnapshot; | ||
getScriptSnapshot(fileName: string): tsTypes.IScriptSnapshot | undefined; | ||
getScriptFileNames: () => string[]; | ||
getScriptVersion(fileName: string): string; | ||
getCustomTransformers(): tsTypes.CustomTransformers | undefined; | ||
getCompilationSettings: () => tsTypes.CompilerOptions; | ||
getTypeRootsVersion: () => number; | ||
getCurrentDirectory: () => string; | ||
useCaseSensitiveFileNames: () => boolean; | ||
getDefaultLibFileName: typeof tsTypes.getDefaultLibFilePath; | ||
readDirectory: (path: string, extensions?: readonly string[] | undefined, exclude?: readonly string[] | undefined, include?: readonly string[] | undefined, depth?: number | undefined) => string[]; | ||
readFile: (path: string, encoding?: string | undefined) => string | undefined; | ||
fileExists: (path: string) => boolean; | ||
directoryExists: (path: string) => boolean; | ||
getDirectories: (path: string) => string[]; | ||
realpath: (path: string) => string; | ||
trace: { | ||
(...data: any[]): void; | ||
(message?: any, ...optionalParams: any[]): void; | ||
}; | ||
} | ||
//# sourceMappingURL=host.d.ts.map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
export interface ICache<DataType> { | ||
exists(name: string): boolean; | ||
path(name: string): string; | ||
match(names: string[]): boolean; | ||
read(name: string): DataType | null | undefined; | ||
write(name: string, data: DataType): void; | ||
touch(name: string): void; | ||
roll(): void; | ||
} | ||
export interface ICache<DataType> { | ||
exists(name: string): boolean; | ||
path(name: string): string; | ||
match(names: string[]): boolean; | ||
read(name: string): DataType | null | undefined; | ||
write(name: string, data: DataType): void; | ||
touch(name: string): void; | ||
roll(): void; | ||
} | ||
//# sourceMappingURL=icache.d.ts.map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { PluginImpl } from "rollup"; | ||
import { IOptions } from "./ioptions"; | ||
declare type RPT2Options = Partial<IOptions>; | ||
export { RPT2Options }; | ||
declare const typescript: PluginImpl<RPT2Options>; | ||
export default typescript; | ||
import { PluginImpl } from "rollup"; | ||
import { IOptions } from "./ioptions"; | ||
type RPT2Options = Partial<IOptions>; | ||
export { RPT2Options }; | ||
declare const typescript: PluginImpl<RPT2Options>; | ||
export default typescript; | ||
//# sourceMappingURL=index.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
import * as tsTypes from "typescript"; | ||
import { tsModule } from "./tsproxy"; | ||
export interface ICustomTransformer { | ||
before?: tsTypes.TransformerFactory<tsTypes.SourceFile>; | ||
after?: tsTypes.TransformerFactory<tsTypes.SourceFile>; | ||
afterDeclarations?: tsTypes.TransformerFactory<tsTypes.Bundle | tsTypes.SourceFile>; | ||
} | ||
export declare type TransformerFactoryCreator = (ls: tsTypes.LanguageService) => tsTypes.CustomTransformers | ICustomTransformer; | ||
export interface IOptions { | ||
cwd: string; | ||
include: string | string[]; | ||
exclude: string | string[]; | ||
check: boolean; | ||
verbosity: number; | ||
clean: boolean; | ||
cacheRoot: string; | ||
abortOnError: boolean; | ||
rollupCommonJSResolveHack: boolean; | ||
tsconfig?: string; | ||
useTsconfigDeclarationDir: boolean; | ||
typescript: typeof tsModule; | ||
tsconfigOverride: any; | ||
transformers: TransformerFactoryCreator[]; | ||
tsconfigDefaults: any; | ||
sourceMapCallback: (id: string, map: string) => void; | ||
objectHashIgnoreUnknownHack: boolean; | ||
} | ||
import * as tsTypes from "typescript"; | ||
import { tsModule } from "./tsproxy"; | ||
export interface ICustomTransformer { | ||
before?: tsTypes.TransformerFactory<tsTypes.SourceFile>; | ||
after?: tsTypes.TransformerFactory<tsTypes.SourceFile>; | ||
afterDeclarations?: tsTypes.TransformerFactory<tsTypes.Bundle | tsTypes.SourceFile>; | ||
} | ||
export type TransformerFactoryCreator = (ls: tsTypes.LanguageService) => tsTypes.CustomTransformers | ICustomTransformer; | ||
export interface IOptions { | ||
cwd: string; | ||
include: string | string[]; | ||
exclude: string | string[]; | ||
check: boolean; | ||
verbosity: number; | ||
clean: boolean; | ||
cacheRoot: string; | ||
abortOnError: boolean; | ||
rollupCommonJSResolveHack: boolean; | ||
tsconfig?: string; | ||
useTsconfigDeclarationDir: boolean; | ||
typescript: typeof tsModule; | ||
tsconfigOverride: any; | ||
transformers: TransformerFactoryCreator[]; | ||
tsconfigDefaults: any; | ||
sourceMapCallback: (id: string, map: string) => void; | ||
objectHashIgnoreUnknownHack: boolean; | ||
} | ||
//# sourceMappingURL=ioptions.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { RollupContext } from "./context"; | ||
import { IOptions } from "./ioptions"; | ||
export declare function parseTsConfig(context: RollupContext, pluginOptions: IOptions): { | ||
parsedTsConfig: import("typescript").ParsedCommandLine; | ||
fileName: string | undefined; | ||
}; | ||
import { RollupContext } from "./context"; | ||
import { IOptions } from "./ioptions"; | ||
export declare function parseTsConfig(context: RollupContext, pluginOptions: IOptions): { | ||
parsedTsConfig: import("typescript").ParsedCommandLine; | ||
fileName: string | undefined; | ||
}; | ||
//# sourceMappingURL=parse-tsconfig.d.ts.map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
import { ICache } from "./icache"; | ||
/** | ||
* Saves data in new cache folder or reads it from old one. | ||
* Avoids perpetually growing cache and situations when things need to consider changed and then reverted data to be changed. | ||
*/ | ||
export declare class RollingCache<DataType> implements ICache<DataType> { | ||
private cacheRoot; | ||
private oldCacheRoot; | ||
private newCacheRoot; | ||
private rolled; | ||
/** @param cacheRoot: root folder for the cache */ | ||
constructor(cacheRoot: string); | ||
/** @returns true if name exists in either old cache or new cache */ | ||
exists(name: string): boolean; | ||
path(name: string): string; | ||
/** @returns true if old cache contains all names and nothing more */ | ||
match(names: string[]): boolean; | ||
/** @returns data for name, must exist in either old cache or new cache */ | ||
read(name: string): DataType | null | undefined; | ||
write(name: string, data: DataType): void; | ||
touch(name: string): void; | ||
/** clears old cache and moves new in its place */ | ||
roll(): void; | ||
} | ||
import { ICache } from "./icache"; | ||
/** | ||
* Saves data in new cache folder or reads it from old one. | ||
* Avoids perpetually growing cache and situations when things need to consider changed and then reverted data to be changed. | ||
*/ | ||
export declare class RollingCache<DataType> implements ICache<DataType> { | ||
private cacheRoot; | ||
private oldCacheRoot; | ||
private newCacheRoot; | ||
private rolled; | ||
/** @param cacheRoot: root folder for the cache */ | ||
constructor(cacheRoot: string); | ||
/** @returns true if name exists in either old cache or new cache */ | ||
exists(name: string): boolean; | ||
path(name: string): string; | ||
/** @returns true if old cache contains all names and nothing more */ | ||
match(names: string[]): boolean; | ||
/** @returns data for name, must exist in either old cache or new cache */ | ||
read(name: string): DataType | null | undefined; | ||
write(name: string, data: DataType): void; | ||
touch(name: string): void; | ||
/** clears old cache and moves new in its place */ | ||
roll(): void; | ||
} | ||
//# sourceMappingURL=rollingcache.d.ts.map |
Oops, something went wrong.