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
<NotepadPlus> | |
<UserLang name="TypeScript" ext="ts" udlVersion="2.1"> | |
<Settings> | |
<Global caseIgnored="no" allowFoldOfComments="yes" foldCompact="no" forcePureLC="0" decimalSeparator="0" /> | |
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" /> | |
</Settings> | |
<KeywordLists> | |
<Keywords name="Comments">00// 01 02 03/* 04*/</Keywords> | |
<Keywords name="Numbers, prefix1"></Keywords> | |
<Keywords name="Numbers, prefix2"></Keywords> |
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
<NotepadPlus> | |
<UserLang name="TypeScript" ext="ts" udlVersion="2.1"> | |
<Settings> | |
<Global caseIgnored="no" allowFoldOfComments="yes" foldCompact="no" forcePureLC="0" decimalSeparator="0" /> | |
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" /> | |
</Settings> | |
<KeywordLists> | |
<Keywords name="Comments">00// 01 02 03/* 04*/</Keywords> | |
<Keywords name="Numbers, prefix1"></Keywords> | |
<Keywords name="Numbers, prefix2"></Keywords> |
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
angular | |
.module("DemoApp", []) | |
.controller("DemoController", DemoController) | |
.config(["$provide", $provide => | |
{ | |
$provide.decorator("ngModelDirective", ["$delegate", $delegate => | |
{ | |
var directive = <angular.IDirective>$delegate[0]; | |
var oldCompile = directive.compile; | |
directive.compile = (element, attr, trans) => |
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
public delegate void ValuesGetter(params Object[] values); | |
private const char Comma = ','; | |
private static readonly Regex _escapedChars = new Regex(@"[,""\r\n]"); | |
public static string ToCsv<T>(IEnumerable<T> enumerable, string headers, Action<T, ValuesGetter> valuesGetter) | |
{ | |
var columnCount = headers.Count(c => c == Comma) + 1; | |
var result = new StringBuilder(); |
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
// Type definitions for React: | |
// https://raw.githubusercontent.com/borisyankov/DefinitelyTyped/master/react/react-global.d.ts | |
declare var __extends: (derived: Object, base: Object) => void; | |
declare var JSXTransformer: { transform: (jsx: string, opts: Object) => { code: string } }; | |
class ReactUtils { | |
private static _extends: typeof __extends; | |
private static _compiled = <{ [key: string]: () => React.ReactElement<any> }>{}; |
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
using System.ComponentModel; | |
using System.Drawing; | |
using System.Globalization; | |
using System.Runtime.InteropServices; | |
using System.Security.Permissions; | |
namespace System.Windows.Forms | |
{ | |
/// <summary> | |
/// Represents a splitter control that enables the user to resize docked controls. |
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
var module: { exports }; | |
var exports = { | |
sham: (() => { | |
var sham = <{ | |
(moduleName: string): void; | |
modules: { [moduleName: string]: { exports } }; | |
}>(moduleName => { | |
exports = { sham }; | |
module = sham.modules[moduleName] = { exports }; | |
}); |
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
// Windows Script Host APIS | |
// http://blogs.msdn.com/b/freik/archive/2012/10/19/goofing-around-with-typescript-amp-windows-script-host.aspx | |
declare var ActiveXObject: { new (s: string): any; }; | |
interface IWScriptStringCollection { | |
Item(n: number): string; | |
Count: number; | |
length: number; | |
} |
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
public static class AnonymousTypeHelper | |
{ | |
public static T Cast<T>(T typeHolder, object x) | |
{ | |
return (T)x; | |
} | |
public static T GetNull<T>(T typeHolder) where T : class | |
{ | |
return null; |
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
/** | |
* Returns a function mixed with an object. | |
* @param obj - Object to mix. | |
* @param func - Target function. | |
*/ | |
function mixWithFunc<T extends Function>(obj: { __proto__?}, func: T) { | |
var objProto = <{ constructor }>obj.__proto__; | |
var objClass = <{ __mixedProto__ }>objProto.constructor; | |
var proto = <typeof obj>objClass.__mixedProto__; | |
if (!proto) { |
OlderNewer