Skip to content

Commit 559f956

Browse files
committed
bah
1 parent 4d3df2c commit 559f956

3 files changed

Lines changed: 433 additions & 0 deletions

File tree

‎v5-unity/js/_references.ts‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// augment existing interface definitions from typings/
2+
interface JQuery {
3+
// attr can also take a boolean as a second argument
4+
attr(attributeName: string, b: boolean): JQuery;
5+
}
6+
7+
interface JQueryStatic {
8+
doTimeout: any;
9+
}
10+
11+
declare namespace AceAjax {
12+
interface IEditSession {
13+
setFoldStyle: any;
14+
setOption: any;
15+
gutterRenderer: any;
16+
}
17+
18+
interface Editor {
19+
setHighlightGutterLine: any;
20+
setDisplayIndentGuides: any;
21+
on: any;
22+
}
23+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// for reference only -- reconstruct code deltas created by something
2+
// like snapshotCodeDiff()
3+
4+
/*
5+
function reconstructCode() {
6+
var cur = '';
7+
8+
var dmp = new diff_match_patch();
9+
var deltas = [];
10+
var patches = [];
11+
12+
var prevTimestamp = undefined;
13+
$.each(deltaObj.deltas, function(i, e) {
14+
if (prevTimestamp) {
15+
assert(e.t >= prevTimestamp);
16+
prevTimestamp = e.t;
17+
}
18+
deltas.push(e.d);
19+
patches.push(e.p);
20+
});
21+
22+
console.log(patches);
23+
console.log(deltas);
24+
25+
//var d = dmp.diff_fromDelta('', "+x = 1")
26+
//var p = dmp.patch_make(d)
27+
//dmp.patch_apply(p, '')
28+
29+
//x = dmp.patch_fromText("@@ -0,0 +1,5 @@\n+x = 1\n")
30+
//dmp.patch_apply(x, '')
31+
//x = dmp.patch_fromText("@@ -1,5 +1,12 @@\n x = 1\n+%0Ax = 2%0A\n")
32+
//dmp.patch_apply(x, 'x = 1')
33+
}
34+
*/
35+
36+

0 commit comments

Comments
 (0)