mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 12:11:47 +00:00
Merge remote-tracking branch 'refs/remotes/DefinitelyTyped/master'
This commit is contained in:
@@ -157,7 +157,7 @@ If a package was never on DefinitelyTyped, it does not need to be added to `notN
|
||||
To lint a package, just add a `tslint.json` to that package containing `{ "extends": "../tslint.json" }`. All new packages must be linted.
|
||||
If a `tslint.json` turns rules off, this is because that hasn't been fixed yet. For example:
|
||||
|
||||
```json
|
||||
```js
|
||||
{
|
||||
"extends": "../tslint.json",
|
||||
"rules": {
|
||||
@@ -255,6 +255,10 @@ transitively `react-router-bootstrap` (which depends on `react-router`) also add
|
||||
|
||||
Also, `/// <reference types=".." />` will not work with path mapping, so dependencies must use `import`.
|
||||
|
||||
#### The file history in GitHub looks incomplete.
|
||||
|
||||
GitHub doesn't [support](http://stackoverflow.com/questions/5646174/how-to-make-github-follow-directory-history-after-renames) file history for renamed files. Use [`git log --follow`](https://www.git-scm.com/docs/git-log) instead.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
|
||||
import blueimp = require('blueimp-md5');
|
||||
|
||||
function hash(): boolean {
|
||||
return blueimp.md5('hello world') === '5eb63bbbe01eeed093cb22bb8f5acdc3';
|
||||
}
|
||||
Vendored
-6
@@ -1,6 +0,0 @@
|
||||
// Type definitions for blueimp-md5 v1.1.0
|
||||
// Project: https://github.com/blueimp/JavaScript-MD5
|
||||
// Definitions by: Ray Martone <https://github.com/rmartone>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export declare function md5(value: string, key?: string, raw?: boolean): string;
|
||||
@@ -1,47 +0,0 @@
|
||||
|
||||
|
||||
import fs = require('fs');
|
||||
import chokidar = require('chokidar');
|
||||
|
||||
var watcher = chokidar.watch('file, dir, or glob', {
|
||||
ignored: /[\/\\]\./, persistent: true
|
||||
});
|
||||
|
||||
var log = console.log.bind(console);
|
||||
|
||||
let str: string;
|
||||
let any: any;
|
||||
let stats: fs.Stats;
|
||||
|
||||
watcher
|
||||
.on('add', path => { str = path; })
|
||||
.on('addDir', path => { str = path; })
|
||||
.on('change', path => { str = path; })
|
||||
.on('unlink', path => { str = path; })
|
||||
.on('unlinkDir', path => { str = path; })
|
||||
.on('error', (error) => { any = error; })
|
||||
.on('ready', () => { })
|
||||
.on('raw', (event, path, details) => { str = event; str = path; any = details; })
|
||||
|
||||
// 'add', 'addDir' and 'change' events also receive stat() results as second
|
||||
// argument when available: http://nodejs.org/api/fs.html#fs_class_fs_stats
|
||||
watcher.on('change', (path, _stats) => {
|
||||
str = path;
|
||||
stats = _stats;
|
||||
});
|
||||
|
||||
// Watch new files.
|
||||
watcher.add('new-file');
|
||||
watcher.add(['new-file-2', 'new-file-3', '**/other-file*']);
|
||||
|
||||
// Un-watch some files.
|
||||
watcher.unwatch('new-file*');
|
||||
|
||||
// Only needed if watching is `persistent: true`.
|
||||
watcher.close();
|
||||
|
||||
// One-liner
|
||||
chokidar.watch('.', {ignored: /[\/\\]\./}).on('all', (event, path) => {
|
||||
str = event;
|
||||
str = path;
|
||||
});
|
||||
Vendored
-49
@@ -1,49 +0,0 @@
|
||||
// Type definitions for chokidar 1.4.3
|
||||
// Project: https://github.com/paulmillr/chokidar
|
||||
// Definitions by: Stefan Steinhart <https://github.com/reppners/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
declare module "chokidar"
|
||||
{
|
||||
export class FSWatcher
|
||||
{
|
||||
constructor(options?: WatchOptions);
|
||||
add(fileDirOrGlob:string):void;
|
||||
add(filesDirsOrGlobs:Array<string>):void;
|
||||
unwatch(fileDirOrGlob:string):void;
|
||||
unwatch(filesDirsOrGlobs:Array<string>):void;
|
||||
getWatched():any;
|
||||
on(event: 'add', fn: (path: string, stats?: fs.Stats) => void): this;
|
||||
on(event: 'change', fn: (path: string, stats?: fs.Stats) => void): this;
|
||||
on(event: 'unlink', fn: (path: string) => void): this;
|
||||
on(event: 'raw', fn: (event: string, path:string, details:any) => void): this;
|
||||
on(event: 'all', fn: (event: string, path: string) => void): this;
|
||||
on(event: string, fn: (path: string) => void): this;
|
||||
close(): this;
|
||||
}
|
||||
|
||||
interface WatchOptions
|
||||
{
|
||||
persistent?:boolean;
|
||||
ignored?:any;
|
||||
ignoreInitial?:boolean;
|
||||
followSymlinks?:boolean;
|
||||
cwd?:string;
|
||||
usePolling?:boolean;
|
||||
useFsEvents?:boolean;
|
||||
alwaysStat?:boolean;
|
||||
depth?:number;
|
||||
interval?:number;
|
||||
binaryInterval?:number;
|
||||
ignorePermissionErrors?:boolean;
|
||||
atomic?:boolean;
|
||||
awaitWriteFinish?:any;
|
||||
}
|
||||
|
||||
import fs = require("fs");
|
||||
|
||||
export function watch(fileDirOrGlob:string, options?:WatchOptions):FSWatcher;
|
||||
export function watch(filesDirsOrGlobs:Array<string>, options?:WatchOptions):FSWatcher;
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{ "extends": "../tslint.json" }
|
||||
Vendored
-687
@@ -1,687 +0,0 @@
|
||||
// Type definitions for google-protobuf 3.2
|
||||
// Project: https://github.com/google/google-protobuf
|
||||
// Definitions by: Marcus Longmuir <https://github.com/marcuslongmuir/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
type ByteSource = ArrayBuffer|Uint8Array|number[]|string;
|
||||
type ScalarFieldType = boolean|number|string;
|
||||
type RepeatedFieldType = ScalarFieldType[] | Uint8Array[];
|
||||
type AnyFieldType = ScalarFieldType | RepeatedFieldType | Uint8Array;
|
||||
type FieldValue = (string|number|boolean|Uint8Array|any/*This should be Array<FieldValue>, but that isn't allowed*/|undefined)
|
||||
|
||||
export abstract class Message {
|
||||
getJsPbMessageId(): (string | undefined);
|
||||
static initialize(msg: Message,
|
||||
data: Message.MessageArray,
|
||||
messageId: (string | number),
|
||||
suggestedPivot: number,
|
||||
repeatedFields: number[],
|
||||
oneofFields?: number[][] | null): void;
|
||||
static toObjectList<T extends Message>(field: T[],
|
||||
toObjectFn: (includeInstance: boolean,
|
||||
data: T) => {},
|
||||
includeInstance?: boolean): {}[];
|
||||
static toObjectExtension(msg: Message,
|
||||
obj: {},
|
||||
extensions: {[key: number]: ExtensionFieldInfo<Message>},
|
||||
getExtensionFn: (fieldInfo: ExtensionFieldInfo<Message>) => Message,
|
||||
includeInstance?: boolean): void;
|
||||
serializeBinaryExtensions(proto: Message,
|
||||
writer: BinaryWriter,
|
||||
extensions: {[key: number]: ExtensionFieldBinaryInfo<Message>},
|
||||
getExtensionFn: <T>(fieldInfo: ExtensionFieldInfo<T>) => T): void
|
||||
readBinaryExtension(proto: Message,
|
||||
reader: BinaryReader,
|
||||
extensions: {[key: number]: ExtensionFieldBinaryInfo<Message>},
|
||||
setExtensionFn: <T>(fieldInfo: ExtensionFieldInfo<T>,
|
||||
val: T) => void): void
|
||||
static getField(msg: Message,
|
||||
fieldNumber: number): FieldValue|null;
|
||||
static getOptionalFloatingPointField(msg: Message,
|
||||
fieldNumber: number): (number | undefined);
|
||||
static getRepeatedFloatingPointField(msg: Message,
|
||||
fieldNumber: number): number[];
|
||||
static bytesAsB64(bytes: Uint8Array): string;
|
||||
static bytesAsU8(str: string): Uint8Array;
|
||||
static bytesListAsB64(bytesList: Uint8Array[]): string[];
|
||||
static bytesListAsU8(strList: string[]): Uint8Array[];
|
||||
static getFieldWithDefault<T>(msg: Message,
|
||||
fieldNumber: number,
|
||||
defaultValue: T): T;
|
||||
static getMapField(msg: Message,
|
||||
fieldNumber: number,
|
||||
noLazyCreate: boolean,
|
||||
valueCtor: typeof Message): Map<any, any>;
|
||||
static setField(msg: Message,
|
||||
fieldNumber: number,
|
||||
value: FieldValue): void;
|
||||
static addToRepeatedField(msg: Message,
|
||||
fieldNumber: number,
|
||||
value: any,
|
||||
index?: number): void;
|
||||
static setOneofField(msg: Message,
|
||||
fieldNumber: number,
|
||||
oneof: number[],
|
||||
value: FieldValue): void;
|
||||
static computeOneofCase(msg: Message,
|
||||
oneof: number[]): number;
|
||||
static getWrapperField(msg: Message,
|
||||
ctor: typeof Message,
|
||||
fieldNumber: number,
|
||||
required?: number): Message;
|
||||
static getRepeatedWrapperField(msg: Message,
|
||||
ctor: typeof Message,
|
||||
fieldNumber: number): Message[];
|
||||
static setWrapperField(msg: Message,
|
||||
fieldNumber: number,
|
||||
value?: (Message|Map<any, any>)): void;
|
||||
static setOneofWrapperField(msg: Message,
|
||||
fieldNumber: number,
|
||||
oneof: number[],
|
||||
value: any): void;
|
||||
static setRepeatedWrapperField(msg: Message,
|
||||
fieldNumber: number,
|
||||
value: any): void;
|
||||
static addToRepeatedWrapperField(msg: Message,
|
||||
fieldNumber: number,
|
||||
value: any,
|
||||
ctor: typeof Message,
|
||||
index: number): any;
|
||||
static toMap(field: any[],
|
||||
mapKeyGetterFn: (field: any) => string,
|
||||
toObjectFn?: Message.StaticToObject,
|
||||
includeInstance?: boolean): void;
|
||||
toArray(): Message.MessageArray;
|
||||
toString(): string;
|
||||
getExtension<T>(fieldInfo: ExtensionFieldInfo<T>): T;
|
||||
setExtension<T>(fieldInfo: ExtensionFieldInfo<T>,
|
||||
value: T): void;
|
||||
static difference<T extends Message>(m1: T,
|
||||
m2: T): T;
|
||||
static equals(m1: Message,
|
||||
m2: Message): boolean;
|
||||
static compareExtensions(extension1: {},
|
||||
extension2: {}): boolean;
|
||||
static compareFields(field1: any,
|
||||
field2: any): boolean;
|
||||
cloneMessage(): Message;
|
||||
clone(): Message;
|
||||
static clone<T extends Message>(msg: T): T;
|
||||
static cloneMessage<T extends Message>(msg: T): T;
|
||||
static copyInto(fromMessage: Message,
|
||||
toMessage: Message): void;
|
||||
static registerMessageType(id: number,
|
||||
constructor: typeof Message): void;
|
||||
|
||||
abstract serializeBinary(): Uint8Array;
|
||||
abstract toObject(includeInstance?: boolean): {};
|
||||
|
||||
// These are `abstract static`, but that isn't allowed. Subclasses of Message will have these methods and properties
|
||||
// and not having them on Message makes using this class for its intended purpose quite difficult.
|
||||
static deserializeBinary(bytes: Uint8Array): Message;
|
||||
static deserializeBinaryFromReader(message: Message, reader: BinaryReader): Message;
|
||||
static serializeBinaryToWriter(message: Message, writer: BinaryWriter): void;
|
||||
static toObject(includeInstance: boolean, msg: Message): {};
|
||||
static extensions: {[key: number]: ExtensionFieldInfo<Message>};
|
||||
static extensionsBinary: {[key: number]: ExtensionFieldBinaryInfo<Message>};
|
||||
}
|
||||
|
||||
export namespace Message {
|
||||
export type MessageArray = any[]; // This type needs to reference itself
|
||||
interface StaticToObject {
|
||||
(includeInstance: boolean,
|
||||
msg: Message): {};
|
||||
}
|
||||
}
|
||||
|
||||
export class ExtensionFieldInfo<T> {
|
||||
fieldIndex: number;
|
||||
fieldName: number;
|
||||
ctor: typeof Message;
|
||||
toObjectFn: Message.StaticToObject;
|
||||
isRepeated: number;
|
||||
constructor(fieldIndex: number,
|
||||
fieldName: {[key: string]: number},
|
||||
ctor: typeof Message,
|
||||
toObjectFn: Message.StaticToObject,
|
||||
isRepeated: number);
|
||||
isMessageType(): boolean;
|
||||
}
|
||||
|
||||
export class ExtensionFieldBinaryInfo<T> {
|
||||
fieldInfo: ExtensionFieldInfo<T>;
|
||||
binaryReaderFn: BinaryRead;
|
||||
binaryWriterFn: BinaryWrite;
|
||||
opt_binaryMessageSerializeFn: (msg: Message,
|
||||
writer: BinaryWriter) => void;
|
||||
opt_binaryMessageDeserializeFn: (msg: Message,
|
||||
reader: BinaryReader) => Message;
|
||||
opt_isPacked: boolean;
|
||||
constructor(fieldInfo: ExtensionFieldInfo<T>,
|
||||
binaryReaderFn: BinaryRead,
|
||||
binaryWriterFn: BinaryWrite,
|
||||
opt_binaryMessageSerializeFn: (msg: Message,
|
||||
writer: BinaryWriter) => void,
|
||||
opt_binaryMessageDeserializeFn: (msg: Message,
|
||||
reader: BinaryReader) => Message,
|
||||
opt_isPacked: boolean);
|
||||
}
|
||||
|
||||
export class Map<K, V> {
|
||||
constructor(arr: Array<[K, V]>,
|
||||
valueCtor?: {new(init: any): V});
|
||||
toArray(): Array<[K, V]>;
|
||||
toObject(includeInstance: boolean,
|
||||
valueToObject: (includeInstance: boolean) => any): Array<[K, V]>;
|
||||
static fromObject<K, V>(entries: Array<[K, V]>,
|
||||
valueCtor: any,
|
||||
valueFromObject: any): Map<K, V>;
|
||||
getLength(): number;
|
||||
clear(): void;
|
||||
del(key: K): boolean;
|
||||
getEntryList(): Array<[K, V]>;
|
||||
entries(): Map.Iterator<[K, V]>;
|
||||
keys(): Map.Iterator<K>;
|
||||
forEach(callback: (entry: V,
|
||||
key: K) => void,
|
||||
thisArg?: {}): void;
|
||||
set(key: K,
|
||||
value: V): void;
|
||||
get(key: K): (V | undefined);
|
||||
has(key: K): boolean;
|
||||
}
|
||||
|
||||
export namespace Map {
|
||||
// This is implemented by jspb.Map.ArrayIteratorIterable_, but that class shouldn't be exported
|
||||
interface Iterator<T> {
|
||||
next(): IteratorResult<T>;
|
||||
}
|
||||
type IteratorResult<T> = {
|
||||
done: boolean,
|
||||
value: T,
|
||||
}
|
||||
}
|
||||
|
||||
interface BinaryReadReader {
|
||||
(msg: any,
|
||||
binaryReader: BinaryReader): void;
|
||||
}
|
||||
|
||||
interface BinaryRead {
|
||||
(msg: any,
|
||||
reader: BinaryReadReader): void;
|
||||
}
|
||||
|
||||
interface BinaryWriteCallback {
|
||||
(value: any,
|
||||
binaryWriter: BinaryWriter): void;
|
||||
}
|
||||
|
||||
interface BinaryWrite {
|
||||
(fieldNumber: number,
|
||||
value: any,
|
||||
writerCallback: BinaryWriteCallback): void;
|
||||
}
|
||||
|
||||
export class BinaryReader {
|
||||
constructor(bytes?: ByteSource,
|
||||
start?: number,
|
||||
length?: number);
|
||||
static alloc(bytes?: ByteSource,
|
||||
start?: number,
|
||||
length?: number): BinaryReader;
|
||||
alloc(bytes?: ByteSource,
|
||||
start?: number,
|
||||
length?: number): BinaryReader;
|
||||
free(): void;
|
||||
getFieldCursor(): number;
|
||||
getCursor(): number;
|
||||
getBuffer(): Uint8Array;
|
||||
getFieldNumber(): number;
|
||||
getWireType(): BinaryConstants.WireType;
|
||||
isEndGroup(): boolean;
|
||||
getError(): boolean;
|
||||
setBlock(bytes?: ByteSource,
|
||||
start?: number,
|
||||
length?: number): void;
|
||||
reset(): void;
|
||||
advance(count: number): void;
|
||||
nextField(): boolean;
|
||||
unskipHeader(): void;
|
||||
skipMatchingFields(): void;
|
||||
skipVarintField(): void;
|
||||
skipDelimitedField(): void;
|
||||
skipFixed32Field(): void;
|
||||
skipFixed64Field(): void;
|
||||
skipGroup(): void;
|
||||
skipField(): void;
|
||||
registerReadCallback(callbackName: string,
|
||||
callback: (binaryReader: BinaryReader) => any): void;
|
||||
runReadCallback(callbackName: string): any;
|
||||
readAny(fieldType: BinaryConstants.FieldType): AnyFieldType;
|
||||
readMessage: BinaryRead;
|
||||
readGroup(field: number,
|
||||
message: Message,
|
||||
reader: BinaryReadReader): void;
|
||||
getFieldDecoder(): BinaryDecoder;
|
||||
readInt32(): number;
|
||||
readInt32String(): string;
|
||||
readInt64(): number;
|
||||
readInt64String(): string;
|
||||
readUint32(): number;
|
||||
readUint32String(): string;
|
||||
readUint64(): number;
|
||||
readUint64String(): string;
|
||||
readSint32(): number;
|
||||
readSint64(): number;
|
||||
readSint64String(): string;
|
||||
readFixed32(): number;
|
||||
readFixed64(): number;
|
||||
readFixed64String(): string;
|
||||
readSfixed32(): number;
|
||||
readSfixed32String(): string;
|
||||
readSfixed64(): number;
|
||||
readSfixed64String(): string;
|
||||
readFloat(): number;
|
||||
readDouble(): number;
|
||||
readBool(): boolean;
|
||||
readEnum(): number;
|
||||
readString(): string;
|
||||
readBytes(): Uint8Array;
|
||||
readVarintHash64(): string;
|
||||
readFixedHash64(): string;
|
||||
readPackedInt32(): number[];
|
||||
readPackedInt32String(): string[];
|
||||
readPackedInt64(): number[];
|
||||
readPackedInt64String(): string[];
|
||||
readPackedUint32(): number[];
|
||||
readPackedUint32String(): string[];
|
||||
readPackedUint64(): number[];
|
||||
readPackedUint64String(): string[];
|
||||
readPackedSint32(): number[];
|
||||
readPackedSint64(): number[];
|
||||
readPackedSint64String(): string[];
|
||||
readPackedFixed32(): number[];
|
||||
readPackedFixed64(): number[];
|
||||
readPackedFixed64String(): string[];
|
||||
readPackedSfixed32(): number[];
|
||||
readPackedSfixed64(): number[];
|
||||
readPackedSfixed64String(): string[];
|
||||
readPackedFloat(): number[];
|
||||
readPackedDouble(): number[];
|
||||
readPackedBool(): boolean[];
|
||||
readPackedEnum(): number[];
|
||||
readPackedVarintHash64(): string[];
|
||||
readPackedFixedHash64(): string[];
|
||||
}
|
||||
|
||||
export class BinaryWriter {
|
||||
constructor();
|
||||
writeSerializedMessage(bytes: Uint8Array,
|
||||
start: number,
|
||||
end: number): void;
|
||||
maybeWriteSerializedMessage(bytes?: Uint8Array,
|
||||
start?: number,
|
||||
end?: number): void;
|
||||
reset(): void;
|
||||
getResultBuffer(): Uint8Array;
|
||||
getResultBase64String(): string;
|
||||
beginSubMessage(field: number): void;
|
||||
endSubMessage(field: number): void;
|
||||
writeAny(fieldType: BinaryConstants.FieldType,
|
||||
field: number,
|
||||
value: AnyFieldType): void;
|
||||
writeInt32(field: number,
|
||||
value?: number): void;
|
||||
writeInt32String(field: number,
|
||||
value?: string): void;
|
||||
writeInt64(field: number,
|
||||
value?: number): void;
|
||||
writeInt64String(field: number,
|
||||
value?: string): void;
|
||||
writeUint32(field: number,
|
||||
value?: number): void;
|
||||
writeUint32String(field: number,
|
||||
value?: string): void;
|
||||
writeUint64(field: number,
|
||||
value?: number): void;
|
||||
writeUint64String(field: number,
|
||||
value?: string): void;
|
||||
writeSint32(field: number,
|
||||
value?: number): void;
|
||||
writeSint64(field: number,
|
||||
value?: number): void;
|
||||
writeSint64String(field: number,
|
||||
value?: string): void;
|
||||
writeFixed32(field: number,
|
||||
value?: number): void;
|
||||
writeFixed64(field: number,
|
||||
value?: number): void;
|
||||
writeFixed64String(field: number,
|
||||
value?: string): void;
|
||||
writeSfixed32(field: number,
|
||||
value?: number): void;
|
||||
writeSfixed64(field: number,
|
||||
value?: number): void;
|
||||
writeSfixed64String(field: number,
|
||||
value?: string): void;
|
||||
writeFloat(field: number,
|
||||
value?: number): void;
|
||||
writeDouble(field: number,
|
||||
value?: number): void;
|
||||
writeBool(field: number,
|
||||
value?: boolean): void;
|
||||
writeEnum(field: number,
|
||||
value?: number): void;
|
||||
writeString(field: number,
|
||||
value?: string): void;
|
||||
writeBytes(field: number,
|
||||
value?: ByteSource): void;
|
||||
writeMessage: BinaryWrite;
|
||||
writeGroup(field: number,
|
||||
value: any,
|
||||
writeCallback: BinaryWriteCallback): void;
|
||||
writeFixedHash64(field: number,
|
||||
value?: string): void;
|
||||
writeVarintHash64(field: number,
|
||||
value?: string): void;
|
||||
writeRepeatedInt32(field: number,
|
||||
value?: number[]): void;
|
||||
writeRepeatedInt32String(field: number,
|
||||
value?: string[]): void;
|
||||
writeRepeatedInt64(field: number,
|
||||
value?: number[]): void;
|
||||
writeRepeatedInt64String(field: number,
|
||||
value?: string[]): void;
|
||||
writeRepeatedUint32(field: number,
|
||||
value?: number[]): void;
|
||||
writeRepeatedUint32String(field: number,
|
||||
value?: string[]): void;
|
||||
writeRepeatedUint64(field: number,
|
||||
value?: number[]): void;
|
||||
writeRepeatedUint64String(field: number,
|
||||
value?: string[]): void;
|
||||
writeRepeatedSint32(field: number,
|
||||
value?: number[]): void;
|
||||
writeRepeatedSint64(field: number,
|
||||
value?: number[]): void;
|
||||
writeRepeatedSint64String(field: number,
|
||||
value?: string[]): void;
|
||||
writeRepeatedFixed32(field: number,
|
||||
value?: number[]): void;
|
||||
writeRepeatedFixed64(field: number,
|
||||
value?: number[]): void;
|
||||
writeRepeatedFixed64String(field: number,
|
||||
value?: string[]): void;
|
||||
writeRepeatedSfixed32(field: number,
|
||||
value?: number[]): void;
|
||||
writeRepeatedSfixed64(field: number,
|
||||
value?: number[]): void;
|
||||
writeRepeatedSfixed64String(field: number,
|
||||
value?: string[]): void;
|
||||
writeRepeatedFloat(field: number,
|
||||
value?: number[]): void;
|
||||
writeRepeatedDouble(field: number,
|
||||
value?: number[]): void;
|
||||
writeRepeatedBool(field: number,
|
||||
value?: boolean[]): void;
|
||||
writeRepeatedEnum(field: number,
|
||||
value?: number[]): void;
|
||||
writeRepeatedString(field: number,
|
||||
value?: string[]): void;
|
||||
writeRepeatedBytes(field: number,
|
||||
value?: ByteSource[]): void;
|
||||
writeRepeatedMessage(field: number,
|
||||
value: Message[],
|
||||
writerCallback: BinaryWriteCallback): void;
|
||||
writeRepeatedGroup(field: number,
|
||||
value: Message[],
|
||||
writerCallback: BinaryWriteCallback): void;
|
||||
writeRepeatedFixedHash64(field: number,
|
||||
value?: string[]): void;
|
||||
writeRepeatedVarintHash64(field: number,
|
||||
value?: string[]): void;
|
||||
writePackedInt32(field: number,
|
||||
value?: number[]): void;
|
||||
writePackedInt32String(field: number,
|
||||
value?: string[]): void;
|
||||
writePackedInt64(field: number,
|
||||
value?: number[]): void;
|
||||
writePackedInt64String(field: number,
|
||||
value?: string[]): void;
|
||||
writePackedUint32(field: number,
|
||||
value?: number[]): void;
|
||||
writePackedUint32String(field: number,
|
||||
value?: string[]): void;
|
||||
writePackedUint64(field: number,
|
||||
value?: number[]): void;
|
||||
writePackedUint64String(field: number,
|
||||
value?: string[]): void;
|
||||
writePackedSint32(field: number,
|
||||
value?: number[]): void;
|
||||
writePackedSint64(field: number,
|
||||
value?: number[]): void;
|
||||
writePackedSint64String(field: number,
|
||||
value?: string[]): void;
|
||||
writePackedFixed32(field: number,
|
||||
value?: number[]): void;
|
||||
writePackedFixed64(field: number,
|
||||
value?: number[]): void;
|
||||
writePackedFixed64String(field: number,
|
||||
value?: string[]): void;
|
||||
writePackedSfixed32(field: number,
|
||||
value?: number[]): void;
|
||||
writePackedSfixed64(field: number,
|
||||
value?: number[]): void;
|
||||
writePackedSfixed64String(field: number,
|
||||
value?: string[]): void;
|
||||
writePackedFloat(field: number,
|
||||
value?: number[]): void;
|
||||
writePackedDouble(field: number,
|
||||
value?: number[]): void;
|
||||
writePackedBool(field: number,
|
||||
value?: boolean[]): void;
|
||||
writePackedEnum(field: number,
|
||||
value?: number[]): void;
|
||||
writePackedFixedHash64(field: number,
|
||||
value?: string[]): void;
|
||||
writePackedVarintHash64(field: number,
|
||||
value?: string[]): void;
|
||||
}
|
||||
|
||||
export class BinaryEncoder {
|
||||
constructor();
|
||||
length(): number;
|
||||
end(): number[];
|
||||
writeSplitVarint64(lowBits: number,
|
||||
highBits: number): void;
|
||||
writeSplitFixed64(lowBits: number,
|
||||
highBits: number): void;
|
||||
writeUnsignedVarint32(value: number): void;
|
||||
writeSignedVarint32(value: number): void;
|
||||
writeUnsignedVarint64(value: number): void;
|
||||
writeSignedVarint64(value: number): void;
|
||||
writeZigzagVarint32(value: number): void;
|
||||
writeZigzagVarint64(value: number): void;
|
||||
writeZigzagVarint64String(value: string): void;
|
||||
writeUint8(value: number): void;
|
||||
writeUint16(value: number): void;
|
||||
writeUint32(value: number): void;
|
||||
writeUint64(value: number): void;
|
||||
writeInt8(value: number): void;
|
||||
writeInt16(value: number): void;
|
||||
writeInt32(value: number): void;
|
||||
writeInt64(value: number): void;
|
||||
writeInt64String(value: string): void;
|
||||
writeFloat(value: number): void;
|
||||
writeDouble(value: number): void;
|
||||
writeBool(value: boolean): void;
|
||||
writeEnum(value: number): void;
|
||||
writeBytes(bytes: Uint8Array): void;
|
||||
writeVarintHash64(hash: string): void;
|
||||
writeFixedHash64(hash: string): void;
|
||||
writeString(value: string): number;
|
||||
}
|
||||
|
||||
export class BinaryDecoder {
|
||||
constructor(bytes?: ByteSource,
|
||||
start?: number,
|
||||
length?: number)
|
||||
static alloc(bytes?: ByteSource,
|
||||
start?: number,
|
||||
length?: number): BinaryDecoder;
|
||||
free(): void;
|
||||
clone(): BinaryDecoder;
|
||||
clear(): void;
|
||||
getBuffer(): Uint8Array;
|
||||
setBlock(data: ByteSource,
|
||||
start?: number,
|
||||
length?: number): void;
|
||||
getEnd(): number;
|
||||
setEnd(end: number): void;
|
||||
reset(): void;
|
||||
getCursor(): number;
|
||||
setCursor(cursor: number): void;
|
||||
advance(count: number): void;
|
||||
atEnd(): boolean;
|
||||
pastEnd(): boolean;
|
||||
getError(): boolean;
|
||||
skipVarint(): void;
|
||||
unskipVarint(value: number): void;
|
||||
readUnsignedVarint32(): number;
|
||||
readSignedVarint32(): number;
|
||||
readUnsignedVarint32String(): number;
|
||||
readSignedVarint32String(): number;
|
||||
readZigzagVarint32(): number;
|
||||
readUnsignedVarint64(): number;
|
||||
readUnsignedVarint64String(): number;
|
||||
readSignedVarint64(): number;
|
||||
readSignedVarint64String(): number;
|
||||
readZigzagVarint64(): number;
|
||||
readZigzagVarint64String(): number;
|
||||
readUint8(): number;
|
||||
readUint16(): number;
|
||||
readUint32(): number;
|
||||
readUint64(): number;
|
||||
readUint64String(): string;
|
||||
readInt8(): number;
|
||||
readInt16(): number;
|
||||
readInt32(): number;
|
||||
readInt64(): number;
|
||||
readInt64String(): string;
|
||||
readFloat(): number;
|
||||
readDouble(): number;
|
||||
readBool(): boolean;
|
||||
readEnum(): number;
|
||||
readString(length: number): string;
|
||||
readStringWithLength(): string;
|
||||
readBytes(length: number): Uint8Array;
|
||||
readVarintHash64(): string;
|
||||
readFixedHash64(): string;
|
||||
}
|
||||
|
||||
export class BinaryIterator {
|
||||
constructor(decoder?: BinaryDecoder,
|
||||
next?: () => number|boolean|string|null,
|
||||
elements?: Array<number|boolean|string>)
|
||||
static alloc(decoder?: BinaryDecoder,
|
||||
next?: () => number|boolean|string|null,
|
||||
elements?: Array<number|boolean|string>): BinaryIterator;
|
||||
free(): void;
|
||||
clear(): void;
|
||||
get(): (ScalarFieldType | null);
|
||||
atEnd(): boolean;
|
||||
next(): (ScalarFieldType | null);
|
||||
}
|
||||
|
||||
export namespace BinaryConstants {
|
||||
export enum FieldType {
|
||||
INVALID = -1,
|
||||
DOUBLE = 1,
|
||||
FLOAT = 2,
|
||||
INT64 = 3,
|
||||
UINT64 = 4,
|
||||
INT32 = 5,
|
||||
FIXED64 = 6,
|
||||
FIXED32 = 7,
|
||||
BOOL = 8,
|
||||
STRING = 9,
|
||||
GROUP = 10,
|
||||
MESSAGE = 11,
|
||||
BYTES = 12,
|
||||
UINT32 = 13,
|
||||
ENUM = 14,
|
||||
SFIXED32 = 15,
|
||||
SFIXED64 = 16,
|
||||
SINT32 = 17,
|
||||
SINT64 = 18,
|
||||
FHASH64 = 30,
|
||||
VHASH64 = 31,
|
||||
}
|
||||
|
||||
export enum WireType {
|
||||
INVALID = -1,
|
||||
VARINT = 0,
|
||||
FIXED64 = 1,
|
||||
DELIMITED = 2,
|
||||
START_GROUP = 3,
|
||||
END_GROUP = 4,
|
||||
FIXED32 = 5,
|
||||
}
|
||||
|
||||
const FieldTypeToWireType: (fieldType: FieldType) => WireType;
|
||||
|
||||
const INVALID_FIELD_NUMBER: number;
|
||||
const FLOAT32_EPS: number;
|
||||
const FLOAT32_MIN: number;
|
||||
const FLOAT32_MAX: number;
|
||||
const FLOAT64_EPS: number;
|
||||
const FLOAT64_MIN: number;
|
||||
const FLOAT64_MAX: number;
|
||||
const TWO_TO_20: number;
|
||||
const TWO_TO_23: number;
|
||||
const TWO_TO_31: number;
|
||||
const TWO_TO_32: number;
|
||||
const TWO_TO_52: number;
|
||||
const TWO_TO_63: number;
|
||||
const TWO_TO_64: number;
|
||||
const ZERO_HASH: string;
|
||||
}
|
||||
|
||||
export namespace arith {
|
||||
export class UInt64 {
|
||||
lo: number;
|
||||
hi: number;
|
||||
constructor(lo: number,
|
||||
hi: number);
|
||||
cmp(other: UInt64): number;
|
||||
rightShift(): UInt64;
|
||||
leftShift(): UInt64;
|
||||
msb(): boolean;
|
||||
lsb(): boolean;
|
||||
zero(): boolean;
|
||||
add(other: UInt64): UInt64;
|
||||
sub(other: UInt64): UInt64;
|
||||
static mul32x32(a: number,
|
||||
b: number): UInt64;
|
||||
mul(a: number): UInt64;
|
||||
div(divisor: number): [UInt64, UInt64];
|
||||
toString(): string;
|
||||
static fromString(str: string): UInt64;
|
||||
clone(): UInt64;
|
||||
}
|
||||
|
||||
export class Int64 {
|
||||
lo: number;
|
||||
hi: number;
|
||||
constructor(lo: number,
|
||||
hi: number);
|
||||
add(other: Int64): Int64;
|
||||
sub(other: Int64): Int64;
|
||||
clone(): Int64;
|
||||
toString(): string;
|
||||
static fromString(str: string): Int64;
|
||||
}
|
||||
}
|
||||
|
||||
// jspb.utils package excluded as it likely shouldn't be called by user code
|
||||
@@ -1,8 +0,0 @@
|
||||
function test_NoDataToDisplay() {
|
||||
var chart = $("#container").highcharts();
|
||||
var chartHasData = chart.hasData();
|
||||
chart.hideNoData();
|
||||
chart.showNoData("Custom no data message");
|
||||
}
|
||||
|
||||
HighchartsNoDataToDisplay(Highcharts);
|
||||
Vendored
-67
@@ -1,67 +0,0 @@
|
||||
// Type definitions for http-codes 1.0
|
||||
// Project: https://github.com/flesler/node-http-codes
|
||||
// Definitions by: Mohamed Hegazy <https://github.com/mhegazy>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export declare const ACCEPTED: number;
|
||||
export declare const ALREADY_REPORTED: number;
|
||||
export declare const BAD_GATEWAY: number;
|
||||
export declare const BAD_REQUEST: number;
|
||||
export declare const BANDWIDTH_LIMIT_EXCEEDED: number;
|
||||
export declare const CONFLICT: number;
|
||||
export declare const CONTINUE: number;
|
||||
export declare const CREATED: number;
|
||||
export declare const EXPECTATION_FAILED: number;
|
||||
export declare const FAILED_DEPENDENCY: number;
|
||||
export declare const FORBIDDEN: number;
|
||||
export declare const FOUND: number;
|
||||
export declare const GATEWAY_TIMEOUT: number;
|
||||
export declare const GONE: number;
|
||||
export declare const HTTP_VERSION_NOT_SUPPORTED: number;
|
||||
export declare const IM_A_TEAPOT: number;
|
||||
export declare const IM_USED: number;
|
||||
export declare const INSUFFICIENT_STORAGE: number;
|
||||
export declare const INTERNAL_SERVER_ERROR: number;
|
||||
export declare const LENGTH_REQUIRED: number;
|
||||
export declare const LOCKED: number;
|
||||
export declare const LOOP_DETECTED: number;
|
||||
export declare const METHOD_NOT_ALLOWED: number;
|
||||
export declare const MISDIRECTED_REQUEST: number;
|
||||
export declare const MOVED_PERMANENTLY: number;
|
||||
export declare const MULTIPLE_CHOICES: number;
|
||||
export declare const MULTI_STATUS: number;
|
||||
export declare const NETWORK_AUTHENTICATION_REQUIRED: number;
|
||||
export declare const NON_AUTHORITATIVE_INFORMATION: number;
|
||||
export declare const NOT_ACCEPTABLE: number;
|
||||
export declare const NOT_EXTENDED: number;
|
||||
export declare const NOT_FOUND: number;
|
||||
export declare const NOT_IMPLEMENTED: number;
|
||||
export declare const NOT_MODIFIED: number;
|
||||
export declare const NO_CONTENT: number;
|
||||
export declare const OK: number;
|
||||
export declare const PARTIAL_CONTENT: number;
|
||||
export declare const PAYLOAD_TOO_LARGE: number;
|
||||
export declare const PAYMENT_REQUIRED: number;
|
||||
export declare const PERMANENT_REDIRECT: number;
|
||||
export declare const PRECONDITION_FAILED: number;
|
||||
export declare const PRECONDITION_REQUIRED: number;
|
||||
export declare const PROCESSING: number;
|
||||
export declare const PROXY_AUTHENTICATION_REQUIRED: number;
|
||||
export declare const RANGE_NOT_SATISFIABLE: number;
|
||||
export declare const REQUEST_HEADER_FIELDS_TOO_LARGE: number;
|
||||
export declare const REQUEST_TIMEOUT: number;
|
||||
export declare const RESET_CONTENT: number;
|
||||
export declare const SEE_OTHER: number;
|
||||
export declare const SERVICE_UNAVAILABLE: number;
|
||||
export declare const SWITCHING_PROTOCOLS: number;
|
||||
export declare const TEMPORARY_REDIRECT: number;
|
||||
export declare const TOO_MANY_REQUESTS: number;
|
||||
export declare const UNAUTHORIZED: number;
|
||||
export declare const UNAVAILABLE_FOR_LEGAL_REASONS: number;
|
||||
export declare const UNORDERED_COLLECTION: number;
|
||||
export declare const UNPROCESSABLE_ENTITY: number;
|
||||
export declare const UNSUPPORTED_MEDIA_TYPE: number;
|
||||
export declare const UPGRADE_REQUIRED: number;
|
||||
export declare const URI_TOO_LONG: number;
|
||||
export declare const USE_PROXY: number;
|
||||
export declare const VARIANT_ALSO_NEGOTIATES: number;
|
||||
@@ -1,6 +0,0 @@
|
||||
import jmespath = require("jmespath");
|
||||
|
||||
const a = jmespath.search({foo: {bar: {baz: [0, 1, 2, 3, 4]}}}, "foo.bar.baz[2]");
|
||||
const b = jmespath.search({foo: {bar: {baz: [0, 1, 2, 3, 4]}}}, "foo.bar")
|
||||
const c = jmespath.search({"foo": [{"first": "a", "last": "b"}, {"first": "c", "last": "d"}]}, "foo[*].first");
|
||||
const d = jmespath.search({"foo": [{"age": 20}, {"age": 25}, {"age": 30}, {"age": 35}, {"age": 40}]}, "foo[?age > `30`]");
|
||||
@@ -1,85 +0,0 @@
|
||||
/* code examples from documentation */
|
||||
|
||||
$().toastmessage('showNoticeToast', 'some message here');
|
||||
$().toastmessage('showSuccessToast', "some message here");
|
||||
$().toastmessage('showWarningToast', "some message here");
|
||||
$().toastmessage('showErrorToast', "some message here");
|
||||
|
||||
// user configured toastmessage:
|
||||
const toastObject = $().toastmessage('showToast', {
|
||||
text : 'Hello World',
|
||||
sticky : true,
|
||||
position : 'top-right',
|
||||
type : 'success',
|
||||
close : function () {console.log("toast is closed ...");}
|
||||
});
|
||||
|
||||
$().toastmessage('removeToast', toastObject);
|
||||
|
||||
// reconfiguring the toasts as sticky
|
||||
$().toastmessage({sticky : true});
|
||||
|
||||
// saving the newly created toast into a variable
|
||||
var myToast = $().toastmessage('showNoticeToast', 'some message here');
|
||||
|
||||
// removing the toast
|
||||
$().toastmessage('removeToast', myToast);
|
||||
|
||||
// user configuration of all toastmessages to come:
|
||||
$().toastmessage({
|
||||
text : 'Hello World',
|
||||
sticky : true,
|
||||
position : 'top-right',
|
||||
type : 'success',
|
||||
close : function () {console.log("toast is closed ...");}
|
||||
});
|
||||
|
||||
$().toastmessage({
|
||||
inEffectDuration: 600, // in effect duration in miliseconds
|
||||
stayTime: 3000, // time in miliseconds before the item has to disappear
|
||||
text: '', // content of the item
|
||||
sticky: false, // should the toast item sticky or not?
|
||||
type: 'notice', // notice, warning, error, success
|
||||
position: 'top-right', // top-left, top-center, top-right, middle-left, middle-center, middle-right
|
||||
// Position of the toast container holding different toast.
|
||||
// Position can be set only once at the very first call,
|
||||
// changing the position after the first call does nothing
|
||||
closeText: '', // text which will be shown as close button,
|
||||
// set to '' when you want to introduce an image via css
|
||||
close: undefined // callback function when the toastmessage is closed
|
||||
});
|
||||
|
||||
/* code examples from tests */
|
||||
|
||||
$('.toast-container').remove();
|
||||
|
||||
$().toastmessage('showSuccessToast', "SUCCESS");
|
||||
$().toastmessage('showNoticeToast', "NOTICE");
|
||||
$().toastmessage('showWarningToast', "WARNING");
|
||||
$().toastmessage('showErrorToast', "ERROR");
|
||||
$().toastmessage({
|
||||
sticky : true,
|
||||
position : 'top-right',
|
||||
closeText: ''
|
||||
});
|
||||
$().toastmessage('showToast', {
|
||||
text : 'Success Dialog',
|
||||
type : 'success'
|
||||
});
|
||||
$().toastmessage('showToast', {
|
||||
text : 'Success Dialog',
|
||||
sticky : true,
|
||||
position : 'top-right',
|
||||
type : 'success',
|
||||
closeText: '',
|
||||
close : () => {}
|
||||
});
|
||||
var toast = $().toastmessage('showToast', {
|
||||
text : 'Success Dialog',
|
||||
sticky : true,
|
||||
position : 'top-right',
|
||||
type : 'success',
|
||||
closeText: '',
|
||||
close : () => {}
|
||||
});
|
||||
$().toastmessage('removeToast', toast, { close : () => {} });
|
||||
Vendored
-16
@@ -1,16 +0,0 @@
|
||||
// Type definitions for jump.js 1.0
|
||||
// Project: https://github.com/callmecavs/jump.js
|
||||
// Definitions by: rhysd <https://rhysd.github.io>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare type TransitionFunc = (t: number, b: number, c: number, d: number) => number;
|
||||
declare interface JumpOptions {
|
||||
duration?: number;
|
||||
offset?: number;
|
||||
callback?: () => void;
|
||||
easing?: TransitionFunc;
|
||||
a11y?: boolean;
|
||||
}
|
||||
declare type Jump = (target: string | Element | number, opts?: JumpOptions) => void;
|
||||
declare const jump: Jump;
|
||||
export = jump;
|
||||
@@ -1,43 +0,0 @@
|
||||
|
||||
import { KramedOptions, kramed, KramedParser, KramedStatic, KramedRenderer } from 'kramed';
|
||||
|
||||
var options: KramedOptions = {
|
||||
gfm: true,
|
||||
tables: true,
|
||||
breaks: false,
|
||||
pedantic: false,
|
||||
sanitize: true,
|
||||
smartLists: true,
|
||||
silent: false,
|
||||
highlight: function (code: string, lang: string) {
|
||||
return '';
|
||||
},
|
||||
langPrefix: 'lang-',
|
||||
smartypants: false,
|
||||
renderer: new kramed.Renderer()
|
||||
};
|
||||
|
||||
function callback() {
|
||||
console.log('callback called');
|
||||
}
|
||||
|
||||
kramed.setOptions(options);
|
||||
|
||||
console.log(kramed('i am using __kramdown__.'));
|
||||
console.log(kramed('i am using __kramdown__.', options));
|
||||
console.log(kramed('i am using __kramdown__.', callback));
|
||||
console.log(kramed('i am using __kramdown__.', options, callback));
|
||||
|
||||
console.log(kramed.parse('i am using __kramdown__.'));
|
||||
console.log(kramed.parse('i am using __kramdown__.', options));
|
||||
console.log(kramed.parse('i am using __kramdown__.', callback));
|
||||
console.log(kramed.parse('i am using __kramdown__.', options, callback));
|
||||
|
||||
var text = 'something';
|
||||
var tokens = kramed.lexer(text, options);
|
||||
console.log(kramed.parser(tokens));
|
||||
|
||||
var renderer = new kramed.Renderer();
|
||||
renderer.heading = function(text, level, raw) {
|
||||
return text + level.toString() + raw;
|
||||
};
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
// Type definitions for leaflet-imageoverlay-rotated 0.1
|
||||
// Project: https://github.com/IvanSanchez/Leaflet.ImageOverlay.Rotated
|
||||
// Definitions by: Thomas Kleinke <https://github.com/tkleinke>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="leaflet" />
|
||||
|
||||
declare namespace L {
|
||||
|
||||
namespace ImageOverlay {
|
||||
|
||||
export interface Rotated extends L.ImageOverlay {
|
||||
reposition(topleft: L.LatLngExpression,
|
||||
topright: L.LatLngExpression,
|
||||
bottomleft: L.LatLngExpression): void;
|
||||
}
|
||||
}
|
||||
|
||||
namespace imageOverlay {
|
||||
|
||||
export function rotated(imgSrc: string | HTMLImageElement | HTMLCanvasElement,
|
||||
topleft: L.LatLngExpression,
|
||||
topright: L.LatLngExpression,
|
||||
bottomleft: L.LatLngExpression,
|
||||
options?: L.ImageOverlayOptions): L.ImageOverlay.Rotated;
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
var topleft = L.latLng(40.52256691873593, -3.7743186950683594);
|
||||
var topright = L.latLng(40.5210255066156, -3.7734764814376835);
|
||||
var bottomleft = L.latLng(40.52180437272552, -3.7768453359603886);
|
||||
|
||||
var overlay = L.imageOverlay.rotated("image.jpg", topleft, topright, bottomleft, {
|
||||
opacity: 0.5,
|
||||
interactive: true
|
||||
});
|
||||
|
||||
overlay.reposition(topleft, topright, bottomleft);
|
||||
@@ -1,5 +0,0 @@
|
||||
import "linq4js";
|
||||
|
||||
let array: Array<string> = ["test", "test2", "test3", "test4", "test5"];
|
||||
|
||||
array.Add("test6").Remove("test3").Insert("test3", 2).Distinct().OrderBy(x => x).OrderByDescending(x => x).Select(x => x.length).Average();
|
||||
@@ -1,14 +0,0 @@
|
||||
import * as React from "react";
|
||||
import ReactPaginate = require("react-paginate");
|
||||
|
||||
class Test extends React.Component<{}, {}> {
|
||||
public render() {
|
||||
return (
|
||||
<ReactPaginate
|
||||
pageCount={1}
|
||||
pageRangeDisplayed={10}
|
||||
marginPagesDisplayed={2}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -2,16 +2,11 @@
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
import assert = require("assert");
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import * as fs from "fs";
|
||||
import * as path from "path";
|
||||
import JSON = require("comment-json");
|
||||
|
||||
function repeat(s: string, count: number) {
|
||||
return Array(count + 1).join(s);
|
||||
}
|
||||
|
||||
const home = path.join(__dirname, '..');
|
||||
const home = path.join(__dirname, "..", "types");
|
||||
|
||||
for (const dirName of fs.readdirSync(home)) {
|
||||
if (dirName.startsWith(".") || dirName === "node_modules" || dirName === "scripts") {
|
||||
|
||||
+5
-3
@@ -4,9 +4,11 @@ const execSync = require("child_process").execSync;
|
||||
const existsSync = require("fs").existsSync;
|
||||
const path = require("path");
|
||||
|
||||
const pkgPath = path.join("types", pkg);
|
||||
|
||||
// Path of tslint when `types-publisher` is symlinked
|
||||
const symlinkedTslintPath = "../node_modules/types-publisher/node_modules/tslint"
|
||||
let tslintPath = existsSync(path.join(pkg, symlinkedTslintPath)) ? symlinkedTslintPath : "../node_modules/tslint";
|
||||
const symlinkedTslintPath = "../../node_modules/types-publisher/node_modules/tslint"
|
||||
let tslintPath = existsSync(path.join(pkgPath, symlinkedTslintPath)) ? symlinkedTslintPath : "../node_modules/tslint";
|
||||
// An older version (e.g. abs/v0) is in a nested directory, so needs to look one more level up for tslint.
|
||||
if (pkg.includes("/") && pkg[pkg.length - 1] !== "/") {
|
||||
tslintPath = path.join("..", tslintPath);
|
||||
@@ -17,7 +19,7 @@ console.log(cmd);
|
||||
|
||||
try {
|
||||
// Child process writes directly to our own stdout
|
||||
execSync(cmd, { cwd: pkg, stdio: "inherit" });
|
||||
execSync(cmd, { cwd: pkgPath, stdio: "inherit" });
|
||||
} catch (_) {
|
||||
// Process should have printed out error info
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ if (process.argv.length !== 5 && process.argv.length !== 6) {
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
rmdirRecursive(typingsPackageName);
|
||||
rmdirRecursive(path.join("types", typingsPackageName));
|
||||
const notNeededPackages = JSON.parse(fs.readFileSync("notNeededPackages.json", "utf-8"));
|
||||
notNeededPackages.packages.push({ libraryName, typingsPackageName, sourceRepoURL, asOfVersion });
|
||||
notNeededPackages.packages.sort((x, y) => x.typingsPackageName < y.typingsPackageName ? -1 : 1);
|
||||
|
||||
@@ -4,9 +4,13 @@
|
||||
"target": "es6",
|
||||
"noImplicitAny": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"noImplicitReturns": true,
|
||||
"noImplicitThis": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"baseUrl": "../types",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
"../types"
|
||||
],
|
||||
"types": [],
|
||||
"forceConsistentCasingInFileNames": true
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
{ "extends": "./node_modules/types-publisher/tslint-definitions.json" }
|
||||
Vendored
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user