Merge pull request #5233 from DanielRosenwasser/handleExtraObjectLiteralProperties

Handle extra object literal properties (Part II)
This commit is contained in:
Dan Quirk
2015-08-06 13:37:36 -07:00
17 changed files with 82 additions and 34 deletions
+1 -2
View File
@@ -27,14 +27,12 @@ bootbox.prompt("Enter 'ok' to pass test", function (result) {
console.log(result);
});
bootbox.prompt({
title: "Wassup?",
message: "Enter 'ok' to pass test", callback: function (result) {
console.log(result);
}
});
bootbox.prompt({
size: "large",
title: "Wassup?",
message: "Enter 'ok' to pass test", callback: function (result) {
console.log(result);
}
@@ -42,6 +40,7 @@ bootbox.prompt({
bootbox.dialog({
title: "Wassup?",
message: "Test Dialog",
callback: function (result) { }
});
+1 -1
View File
@@ -7,7 +7,7 @@ context.settings({compress: true});
context.attach('#test', [
{header: 'header 1'},
{divider: true},
{text:'foobar', submenu: [
{text:'foobar', subMenu: [
{text:'sub1'},
{text:'sub2'}
]}
+1 -1
View File
@@ -26,7 +26,7 @@ $(document).ready(function() {
$('.slider1').bxSlider({
slideWidth: 200,
minSldies: 2,
minSlides: 2,
maxSlides: 3,
slideMargin: 10
});
+2 -2
View File
@@ -70,7 +70,7 @@ function sample2() {
//
// Rendering canvas #2
//
var canvas2 = new fabric.Canvas('c2', { backgroundColor: "#000", renderOnAddition: false }),
var canvas2 = new fabric.Canvas('c2', { backgroundColor: "#000", renderOnAddRemove: false }),
results2 = document.getElementById('results-c2');
startTimer();
@@ -84,7 +84,7 @@ function sample2() {
canvas2.add(dot);
}
canvas2.renderAll(); // Note, calling renderAll() is important in this case
results2.innerHTML = 'Rendering 1000 elements using canvas.renderOnAddition = false in ' + stopTimer() + 'ms';
results2.innerHTML = 'Rendering 1000 elements using canvas.renderOnAddRemove = false in ' + stopTimer() + 'ms';
}
function sample3() {
+2 -1
View File
@@ -125,7 +125,8 @@ declare module Foundation {
timer? : string;
tip? : string;
wrapper? : string;
button? : string;
button?: string;
prev_button?: string;
modal? : string;
expose? : string;
expose_cover? : string;
+1 -1
View File
@@ -20,7 +20,7 @@ c.connect();
c.connect({
host: "127.0.0.1",
port: 21,
username: "Boo",
user: "Boo",
password: "secret"
});
+7
View File
@@ -28,6 +28,13 @@ declare module gulp {
*/
buffer?: boolean;
/**
* The base path of a glob.
*
* Default is everything before a glob starts.
*/
base?: string;
/**
* The current working directory in which to search.
* Defaults to process.cwd().
+10 -1
View File
@@ -6,6 +6,15 @@
/// <reference path="../jquery/jquery.d.ts" />
interface JQueryColorpickerOptions {
// Events
// TODO: Figure out actual types.
cancel: Function,
close: Function,
init: Function,
select: Function,
ok: Function,
open: Function,
alpha?: boolean;
altAlpha?: boolean;
altField?: string;
@@ -21,7 +30,7 @@ interface JQueryColorpickerOptions {
closeOnOutside?: boolean;
color?: string;
colorFormat?: string;
dragggable?: boolean;
draggable?: boolean;
duration?: string;
hsv?: boolean;
inline?: boolean;
+1 -1
View File
@@ -1410,7 +1410,7 @@ result = <string>_.template('<% print("hello " + name); %>!', { 'name': 'larry'
var listTemplate = '<% $.each(people, function(name) { %><li><%- name %></li><% }); %>';
result = <string>_.template(listTemplate, { 'people': ['moe', 'larry'] }, { 'imports': { '$': jQuery } });
result = <_.TemplateExecutor>_.template('hello <%= name %>', null, { 'sourceURL': '/basic/greeting.jst' });
result = <_.TemplateExecutor>_.template('hello <%= name %>', null, /*sourceURL:*/ '/basic/greeting.jst');
result = <_.TemplateExecutor>_.template('hi <%= data.name %>!', null, { 'variable': 'data' });
result = <string>(<_.TemplateExecutor>result).source;
@@ -467,7 +467,7 @@ var calendarCollection: Microsoft.Live.IObjectCollection<Microsoft.Live.ICalenda
var newCalendar: Microsoft.Live.INewCalendar = {
"name": "Summer Events",
"summary": "Things we are doing this summer."
"description": "Things we are doing this summer."
};
var newCalendarSub: Microsoft.Live.INewCalendarSubscription = {
+30 -3
View File
@@ -7,28 +7,55 @@ declare module moment {
interface MomentInput {
/** Year */
years?: number;
/** Year */
year?: number;
/** Year */
y?: number;
/** Month */
months?: number;
/** Month */
month?: number;
/** Month */
M?: number;
weeks?: number;
w?: number;
/** Day/Date */
days?: number;
/** Day/Date */
day?: number;
/** Day/Date */
date?: number;
/** Day/Date */
d?: number;
/** Hour */
hours?: number;
/** Hour */
hour?: number;
/** Hour */
h?: number;
/** Minute */
minutes?: number;
/** Minute */
minute?: number;
/** Minute */
m?: number;
/** Second */
seconds?: number;
/** Second */
second?: number;
/** Second */
s?: number;
/** Millisecond */
milliseconds?: number;
/** Millisecond */
millisecond?: number;
/** Millisecond */
ms?: number;
}
+1 -1
View File
@@ -82,7 +82,7 @@ interface noUiSliderOptions {
animate?: boolean;
/**
* All values on the slider are part of a range. The range has a minimum and maximum value.
*
*/
behaviour?: string;
/**
* To format the slider output, noUiSlider offers a format option.
+1 -1
View File
@@ -24,7 +24,7 @@ doc.addPage({
});
doc.addPage({
margins: {
margin: {
top: 50,
bottom: 50,
left: 72,
+2 -2
View File
@@ -27,7 +27,7 @@ jQuery(document).ready(function () {
fullscreen: {
// fullscreen options go gere
enabled: true,
native: true
nativeFS: true
}
});
});
@@ -49,7 +49,7 @@ jQuery(document).ready(function () {
$(".royalSlider").royalSlider({
// general options go gere
autoScaleSlider: true,
autoPlay: {
autoplay: {
// autoplay options go gere
enabled: true,
pauseOnHover: true
+2 -2
View File
@@ -18,7 +18,7 @@ declare module "smoothie"
export interface ITimeSeriesPresentationOptions
{
stokeStyle?: string;
strokeStyle?: string;
fillStyle?: string;
lineWidth?: number;
}
@@ -73,7 +73,7 @@ declare module "smoothie"
/** The pixel width of grid lines. */
lineWidth?: number;
/** Colour of grid lines. */
stokeStyle?: string;
strokeStyle?: string;
/** Distance between vertical grid lines. */
millisPerLine?: number;
/** Controls whether grid lines are 1px sharp, or softened. */
+16 -12
View File
@@ -9,33 +9,33 @@ declare module moment {
interface Moment {
twix(date: Date): Twix;
twix(date: Date, allDay: boolean): Twix;
twix(date: Date, options: TwixFormatOptions): Twix;
twix(date: Date, format: string, options: TwixFormatOptions): Twix;
twix(date: Date, options: TwixParseAndFormatOptions): Twix;
twix(date: Date, format: string, options: TwixParseAndFormatOptions): Twix;
twix(date: Moment): Twix;
twix(date: Moment, allDay: boolean): Twix;
twix(date: Moment, options: TwixFormatOptions): Twix;
twix(date: Moment, format: string, options: TwixFormatOptions): Twix;
twix(date: Moment, options: TwixParseAndFormatOptions): Twix;
twix(date: Moment, format: string, options: TwixParseAndFormatOptions): Twix;
twix(date: MomentInput): Twix;
twix(date: MomentInput, allDay: boolean): Twix;
twix(date: MomentInput, options: TwixFormatOptions): Twix;
twix(date: MomentInput, format: string, options: TwixFormatOptions): Twix;
twix(date: MomentInput, options: TwixParseAndFormatOptions): Twix;
twix(date: MomentInput, format: string, options: TwixParseAndFormatOptions): Twix;
twix(date: number): Twix;
twix(date: number, allDay: boolean): Twix;
twix(date: number, options: TwixFormatOptions): Twix;
twix(date: number, format: string, options: TwixFormatOptions): Twix;
twix(date: number, options: TwixParseAndFormatOptions): Twix;
twix(date: number, format: string, options: TwixParseAndFormatOptions): Twix;
twix(date: number[]): Twix;
twix(date: number[], allDay: boolean): Twix;
twix(date: number[], options: TwixFormatOptions): Twix;
twix(date: number[], format: string, options: TwixFormatOptions): Twix;
twix(date: number[], options: TwixParseAndFormatOptions): Twix;
twix(date: number[], format: string, options: TwixParseAndFormatOptions): Twix;
twix(date: string): Twix;
twix(date: string, allDay: boolean): Twix;
twix(date: string, options: TwixFormatOptions): Twix;
twix(date: string, format: string, options: TwixFormatOptions): Twix;
twix(date: string, options: TwixParseAndFormatOptions): Twix;
twix(date: string, format: string, options: TwixParseAndFormatOptions): Twix;
}
interface MomentStatic {
@@ -63,6 +63,10 @@ declare module moment {
lastNightEndsAt?: number;
}
interface TwixParseAndFormatOptions extends TwixFormatOptions {
parseStrict?: boolean;
}
interface TwixSimpleFormatOptions {
allDay?: string;
template?: (left: any, right: any) => any;
+3 -2
View File
@@ -291,17 +291,18 @@ _.result(object, 'stuff');
var compiled = _.template("hello: <%= name %>");
compiled({ name: 'moe' });
var list2 = "<% _.each(people, function(name) { %> <li><%= name %></li> <% }); %>";
_.template(list2, { people: ['moe', 'curly', 'larry'] });
_.template(list2)({ people: ['moe', 'curly', 'larry'] });
var template = _.template("<b><%- value %></b>");
template({ value: '<script>' });
var compiled2 = _.template("<% print('Hello ' + epithet); %>");
compiled2({ epithet: "stooge" });
var oldTemplateSettings = _.templateSettings;
_.templateSettings = {
interpolate: /\{\{(.+?)\}\}/g
};
var template2 = _.template("Hello {{ name }}!");
template2({ name: "Mustache" });
_.template("Using 'with': <%= data.answer %>", { variable: 'data' });
_.template("Using 'with': <%= data.answer %>", oldTemplateSettings)({ variable: 'data' });
_(['test', 'test']).pick(['test2', 'test2']);