Skip to content

Instantly share code, notes, and snippets.

declare function defineCore(name: string, deps: string[], f: (require, exports,...deps: string[]) => void);
function define(name: string, deps: string[], f: (require, exports,...deps: string[]) => void) {
defineCore(name, deps, (require, exports, deps) => {
require(name);
f(require, exports, deps);
})
}
class UnmanagedMemoryWriter: Stream
{
private static T NotImplemented<T>()
{
throw new NotImplementedException();
}
private UnmanagedMemoryWriter()
{
}
function foo(t: any) {
var $isMobile = t.mobile() !== null;
if (
// Apple iOS 3.2-5.1 - Tested on the original iPad (4.3 / 5.0), iPad 2 (4.3), iPad 3 (5.1), original iPhone (3.1), iPhone 3 (3.2), 3GS (4.3), 4 (4.3 / 5.0), and 4S (5.1)
t.os('iOS') && t.version('iPad')>=4.3 ||
t.os('iOS') && t.version('iPhone')>=3.1 ||
t.os('iOS') && t.version('iPod')>=3.1 ||
// Android 2.1-2.3 - Tested on the HTC Incredible (2.2), original Droid (2.2), HTC Aria (2.1), Google Nexus S (2.3). Functional on 1.5 & 1.6 but performance may be sluggish, tested on Google G1 (1.5)
// Android 3.1 (Honeycomb) - Tested on the Samsung Galaxy Tab 10.1 and Motorola XOOM
@vladima
vladima / output.txt
Created February 23, 2017 18:16
Compiling TypeScript language service
vladima@vladima-HP:~/Sources/git/TypeScript$ node --version
v7.6.0
vladima@vladima-HP:~/Sources/git/TypeScript$ node -e "console.log(process.versions.v8)"
5.5.372.40
vladima@vladima-HP:~/Sources/git/TypeScript$ node built/local/tsc.js -p src/server/ --noEmit --diagnostics
Files: 99
Lines: 120541
Nodes: 579310
Identifiers: 213907
Symbols: 118481
var process = ...
var timeout = ...
var tcs = new TaskCompletionSource<object>();
process.Exited += delegate {
tcs.SetResult(null);
};
if (await Task.WhenAny(tcs.Task, Task.Delay(timeout)) != tcs.Task)
{
process.Kill();
}