Skip to content

Commit

Permalink
Publish dist as a workaround
Browse files Browse the repository at this point in the history
...for the issue: npm/cli#1287
  • Loading branch information
luin committed Jun 14, 2021
1 parent 6ddb8dd commit 37b73be
Show file tree
Hide file tree
Showing 13 changed files with 792 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/.coverage
/coverage
/dist
/node_modules
npm-debug.log
10 changes: 10 additions & 0 deletions dist/AttributeMap.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
interface AttributeMap {
[key: string]: any;
}
declare namespace AttributeMap {
function compose(a: AttributeMap | undefined, b: AttributeMap | undefined, keepNull: boolean): AttributeMap | undefined;
function diff(a?: AttributeMap, b?: AttributeMap): AttributeMap | undefined;
function invert(attr?: AttributeMap, base?: AttributeMap): AttributeMap;
function transform(a: AttributeMap | undefined, b: AttributeMap | undefined, priority?: boolean): AttributeMap | undefined;
}
export default AttributeMap;
96 changes: 96 additions & 0 deletions dist/AttributeMap.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/AttributeMap.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 42 additions & 0 deletions dist/Delta.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import diff from 'fast-diff';
import AttributeMap from './AttributeMap';
import Op from './Op';
interface EmbedHandler {
compose<T>(a: T, b: T, keepNull: boolean): T;
invert<T>(a: T, b: T): T;
transform<T>(a: T, b: T, priority: boolean): T;
}
declare class Delta {
static Op: typeof Op;
static AttributeMap: typeof AttributeMap;
private static handlers;
static registerEmbed(embedType: string, handler: EmbedHandler): void;
static unregisterEmbed(embedType: string): void;
private static getHandler;
ops: Op[];
constructor(ops?: Op[] | {
ops: Op[];
});
insert(arg: string | object, attributes?: AttributeMap): this;
delete(length: number): this;
retain(length: number | Record<string, any>, attributes?: AttributeMap): this;
push(newOp: Op): this;
chop(): this;
filter(predicate: (op: Op, index: number) => boolean): Op[];
forEach(predicate: (op: Op, index: number) => void): void;
map<T>(predicate: (op: Op, index: number) => T): T[];
partition(predicate: (op: Op) => boolean): [Op[], Op[]];
reduce<T>(predicate: (accum: T, curr: Op, index: number) => T, initialValue: T): T;
changeLength(): number;
length(): number;
slice(start?: number, end?: number): Delta;
compose(other: Delta): Delta;
concat(other: Delta): Delta;
diff(other: Delta, cursor?: number | diff.CursorInfo): Delta;
eachLine(predicate: (line: Delta, attributes: AttributeMap, index: number) => boolean | void, newline?: string): void;
invert(base: Delta): Delta;
transform(index: number, priority?: boolean): number;
transform(other: Delta, priority?: boolean): Delta;
transformPosition(index: number, priority?: boolean): number;
}
export = Delta;
Loading

0 comments on commit 37b73be

Please sign in to comment.