commit stringlengths 40 40 | old_file stringlengths 4 150 | new_file stringlengths 4 150 | old_contents stringlengths 0 3.26k | new_contents stringlengths 1 4.43k | subject stringlengths 15 501 | message stringlengths 15 4.06k | lang stringclasses 4
values | license stringclasses 13
values | repos stringlengths 5 91.5k | diff stringlengths 0 4.35k |
|---|---|---|---|---|---|---|---|---|---|---|
cdc06ec8c611156a879deee78768ce3b1ec93d37 | app/src/lib/progress/fetch-progress-parser.ts | app/src/lib/progress/fetch-progress-parser.ts | import { StepProgressParser } from './step-progress'
/**
* Highly approximate (some would say outright inaccurate) division
* of the individual progress reporting steps in a fetch operation
*/
const steps = [
{ title: 'remote: Compressing objects', weight: 0.1 },
{ title: 'Receiving objects', weight: 0.7 },
{... | Add a fetch progress parser | Add a fetch progress parser
| TypeScript | mit | say25/desktop,artivilla/desktop,hjobrien/desktop,desktop/desktop,desktop/desktop,artivilla/desktop,BugTesterTest/desktops,kactus-io/kactus,say25/desktop,j-f1/forked-desktop,shiftkey/desktop,BugTesterTest/desktops,artivilla/desktop,shiftkey/desktop,gengjiawen/desktop,j-f1/forked-desktop,j-f1/forked-desktop,gengjiawen/de... | ---
+++
@@ -0,0 +1,22 @@
+import { StepProgressParser } from './step-progress'
+
+/**
+ * Highly approximate (some would say outright inaccurate) division
+ * of the individual progress reporting steps in a fetch operation
+ */
+const steps = [
+ { title: 'remote: Compressing objects', weight: 0.1 },
+ { title: 'Re... | |
e0e03a2a792c2f36b268d4d9cdcd95988fcb70e6 | app/modules/OptionsBar/FontSize/FontSize.tsx | app/modules/OptionsBar/FontSize/FontSize.tsx | import * as React from 'react';
import { Menu, MenuDivider, MenuItem, Popover, Position } from "@blueprintjs/core";
interface FontSizeProps {
pluginState: any;
updateCurrentPlugin: Function;
}
const FontSize = ({ pluginState, updateCurrentPlugin }: FontSizeProps) => {
const DEFAULT_SIZE = 100;
const MAGNIFIER... | Add ability to change font size | feat: Add ability to change font size
| TypeScript | mit | chengsieuly/devdecks,chengsieuly/devdecks,chengsieuly/devdecks,DevDecks/devdecks,Team-CHAD/DevDecks,DevDecks/devdecks,DevDecks/devdecks,Team-CHAD/DevDecks,Team-CHAD/DevDecks | ---
+++
@@ -0,0 +1,36 @@
+import * as React from 'react';
+import { Menu, MenuDivider, MenuItem, Popover, Position } from "@blueprintjs/core";
+
+interface FontSizeProps {
+ pluginState: any;
+ updateCurrentPlugin: Function;
+}
+
+const FontSize = ({ pluginState, updateCurrentPlugin }: FontSizeProps) => {
+ const ... | |
9835651432a733c4b18f2d452ab8a00a07f8ac23 | app/src/lib/stores/helpers/pull-request-updater.ts | app/src/lib/stores/helpers/pull-request-updater.ts | import { PullRequestStore } from '../pull-request-store'
import { Repository } from '../../../models/repository'
import { Account } from '../../../models/account'
import { fatalError } from '../../fatal-error'
const PullRequestInterval = 1000 * 60 * 3
const StatusInterval = 1000 * 60
enum TimeoutHandles {
PullReque... | Add service to handle updating PRs | Add service to handle updating PRs
| TypeScript | mit | say25/desktop,desktop/desktop,artivilla/desktop,shiftkey/desktop,j-f1/forked-desktop,kactus-io/kactus,desktop/desktop,desktop/desktop,say25/desktop,artivilla/desktop,shiftkey/desktop,artivilla/desktop,shiftkey/desktop,j-f1/forked-desktop,kactus-io/kactus,desktop/desktop,j-f1/forked-desktop,say25/desktop,j-f1/forked-des... | ---
+++
@@ -0,0 +1,69 @@
+import { PullRequestStore } from '../pull-request-store'
+import { Repository } from '../../../models/repository'
+import { Account } from '../../../models/account'
+import { fatalError } from '../../fatal-error'
+
+const PullRequestInterval = 1000 * 60 * 3
+const StatusInterval = 1000 * 60
... | |
e4fe82d63f9a23d98f4952611fa7ae082645f8b5 | dom_hr.ts | dom_hr.ts | <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="hr_HR">
<context>
<name>TreeWindow</name>
<message>
<location filename="../treewindow.ui" line="14"/>
<source>Panel DOM tree</source>
<translation type="unfinished"></translation>
</message>
<message... | Create HR translations for panel and plugins | Create HR translations for panel and plugins
| TypeScript | lgpl-2.1 | lxde/lxqt-l10n | ---
+++
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="hr_HR">
+<context>
+ <name>TreeWindow</name>
+ <message>
+ <location filename="../treewindow.ui" line="14"/>
+ <source>Panel DOM tree</source>
+ <translation type="unfinished"></tran... | |
f9639d2f3809b7ca165f90d21e602789ef285708 | src/resources/qna.ts | src/resources/qna.ts | import * as request from "request";
let qnaSubKey = process.env["qnaSubKey"];
/**
* Returns an answer to a question.
*/
export const ask = function (questionText: string, kb: string): Promise<string> {
return new Promise(resolve => {
try {
request.post({
headers: {
... | Add helper for Microsoft QnA service. | Add helper for Microsoft QnA service.
| TypeScript | agpl-3.0 | deegles/cookietime,deegles/cookietime | ---
+++
@@ -0,0 +1,32 @@
+import * as request from "request";
+
+let qnaSubKey = process.env["qnaSubKey"];
+
+/**
+ * Returns an answer to a question.
+ */
+export const ask = function (questionText: string, kb: string): Promise<string> {
+ return new Promise(resolve => {
+ try {
+ request.post({... | |
a538358862e0f4f0187a44a6227d6d092f5afe50 | types/iopipe__iopipe/index.d.ts | types/iopipe__iopipe/index.d.ts | // Type definitions for iopipe__iopipe 1.12
// Project: https://github.com/iopipe/iopipe (Does not have to be to GitHub, but prefer linking to a source code repository rather than to a project website.)
// Definitions by: Javon Harper <https://github.com/javonharper>
// Definitions: https://github.com/DefinitelyTyped/D... | // Type definitions for iopipe__iopipe 1.12
// Project: https://github.com/iopipe/iopipe (Does not have to be to GitHub, but prefer linking to a source code repository rather than to a project website.)
// Definitions by: Javon Harper <https://github.com/javonharper>
// Definitions: https://github.com/DefinitelyTyped/D... | Move implicit exports into the namespace. | Move implicit exports into the namespace. | TypeScript | mit | dsebastien/DefinitelyTyped,georgemarshall/DefinitelyTyped,mcliment/DefinitelyTyped,borisyankov/DefinitelyTyped,magny/DefinitelyTyped,georgemarshall/DefinitelyTyped,georgemarshall/DefinitelyTyped,magny/DefinitelyTyped,dsebastien/DefinitelyTyped,markogresak/DefinitelyTyped,borisyankov/DefinitelyTyped,georgemarshall/Defin... | ---
+++
@@ -3,16 +3,7 @@
// Definitions by: Javon Harper <https://github.com/javonharper>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-interface LibraryConfig {
- debug?: boolean;
- token?: string;
- networkTimeout?: number;
- timeoutWindow?: number;
-}
-
-type FunctionWrapper =... |
9dfface8db1a19d367f1efc925590e7c754cadec | src/utils/hots-commons.ts | src/utils/hots-commons.ts | export enum HeroRoles {
Assassin,
Warrior,
Specialist,
Support
}
export interface Skill{
name: string;
level: number;
description: string;
}
export interface Build{
name: string;
skills: Array<Skill>;
}
export interface Hero{
name: string;
role: HeroRoles|Array<HeroRoles>;
builds: Array<Build... | Add basic interfaces about HotS elements (Hero, Build, Role, Skill) | Add basic interfaces about HotS elements (Hero, Build, Role, Skill)
| TypeScript | mit | jchakra/hots-parser | ---
+++
@@ -0,0 +1,23 @@
+export enum HeroRoles {
+ Assassin,
+ Warrior,
+ Specialist,
+ Support
+}
+
+export interface Skill{
+ name: string;
+ level: number;
+ description: string;
+}
+
+export interface Build{
+ name: string;
+ skills: Array<Skill>;
+}
+
+export interface Hero{
+ name: string;
+ role: H... | |
4718ce3c11aef0c4858b52fd4d5a59b39e56af79 | ui/src/tempVars/components/TemplatePreviewListItem.tsx | ui/src/tempVars/components/TemplatePreviewListItem.tsx | import React, {PureComponent} from 'react'
import classNames from 'classnames'
import {TemplateValue} from 'src/types'
interface Props {
item: TemplateValue
onClick: (item: TemplateValue) => void
style: {
height: string
marginBottom: string
}
}
class TemplatePreviewListItem extends PureComponent<Prop... | import React, {PureComponent} from 'react'
import classNames from 'classnames'
import {TemplateValue} from 'src/types'
interface Props {
item: TemplateValue
onClick: (item: TemplateValue) => void
style: React.CSSProperties
}
class TemplatePreviewListItem extends PureComponent<Props> {
public render() {
c... | Update tempvar preview list to accept CSSProperties for style | Update tempvar preview list to accept CSSProperties for style
| TypeScript | mit | mark-rushakoff/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,li-ang/influxdb,nooproblem/influxdb,nooproblem/influxdb,nooproblem/influxdb,influxdb/influxdb,influxdb/influxdb,nooproblem/influxdb,influxdb/influxdb,influxdata/influxdb,mark-rushakoff/influxdb,li-ang/influxdb,mark-rushakoff/influxdb,influxdata/influxdb,... | ---
+++
@@ -6,10 +6,7 @@
interface Props {
item: TemplateValue
onClick: (item: TemplateValue) => void
- style: {
- height: string
- marginBottom: string
- }
+ style: React.CSSProperties
}
class TemplatePreviewListItem extends PureComponent<Props> { |
dd81f4381de8e663c17e12595b33b46020c153cf | public/app/plugins/datasource/influxdb/specs/datasource.jest.ts | public/app/plugins/datasource/influxdb/specs/datasource.jest.ts | import InfluxDatasource from '../datasource';
import $q from 'q';
import { TemplateSrvStub } from 'test/specs/helpers';
describe('InfluxDataSource', () => {
let ctx: any = {
backendSrv: {},
$q: $q,
templateSrv: new TemplateSrvStub(),
instanceSettings: { url: 'url', name: 'influxDb', jsonData... | Add unit test for InfluxDB datasource | Add unit test for InfluxDB datasource
| TypeScript | agpl-3.0 | grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana | ---
+++
@@ -0,0 +1,53 @@
+import InfluxDatasource from '../datasource';
+import $q from 'q';
+import { TemplateSrvStub } from 'test/specs/helpers';
+
+describe('InfluxDataSource', () => {
+ let ctx: any = {
+ backendSrv: {},
+ $q: $q,
+ templateSrv: new TemplateSrvStub(),
+ instanceSettings: { url: 'url'... | |
8d8ed5e2ed383bda78866593b116e947a71732e5 | desktop/app/src/ui/components/__tests__/ToolbarIcon.node.tsx | desktop/app/src/ui/components/__tests__/ToolbarIcon.node.tsx | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
import React from 'react';
import {render, fireEvent} from '@testing-library/react';
import ToolbarIcon from '../To... | Add Unit Test to ToolbarIcon | Add Unit Test to ToolbarIcon
Summary: per title
Reviewed By: mweststrate
Differential Revision: D21663253
fbshipit-source-id: de1eff5a3500473082973a27d0b72479407cbebe
| TypeScript | mit | facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper | ---
+++
@@ -0,0 +1,74 @@
+/**
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ * @format
+ */
+
+import React from 'react';
+import {render, fireEvent} from '@testing-library/r... | |
7a02938e5bdb3566e8777a258f084b94b4000286 | src/Zombie.ts | src/Zombie.ts | module Lowrezjam {
export class Zombie extends Phaser.Sprite {
game: Lowrezjam.Game;
constructor() {
this.game = window["game"];
super(this.game, 1, 1, 'player');
this.game.add.existing(this);
this.smoothed = false;
this.scale.x = this... | Add zombie, copied from player. | Add zombie, copied from player.
| TypeScript | mit | bbqcode/lowrezjam-2014,bbqcode/lowrezjam-2014 | ---
+++
@@ -0,0 +1,19 @@
+module Lowrezjam {
+
+ export class Zombie extends Phaser.Sprite {
+ game: Lowrezjam.Game;
+
+
+ constructor() {
+ this.game = window["game"];
+ super(this.game, 1, 1, 'player');
+ this.game.add.existing(this);
+ this.smoothed = f... | |
580245e33060fb3c93a0bf16c34ec3318bf06fa2 | src/app/shared/mrs.service.spec.ts | src/app/shared/mrs.service.spec.ts | 'use strict';
import {
it,
describe,
expect,
inject,
beforeEachProviders,
beforeEach,
fakeAsync,
tick
} from '@angular/core/testing';
import { MRSService } from './mrs.service';
import { StorageService } from './storage.service';
describe('MRS Service', () => {
beforeEachProviders(() => [
Stor... | Add unit tests for MRS Service | Add unit tests for MRS Service
| TypeScript | mit | SBats/marvel-reading-stats-frontend,SBats/marvel-reading-stats-frontend,SBats/marvel-reading-stats-frontend | ---
+++
@@ -0,0 +1,78 @@
+'use strict';
+
+import {
+ it,
+ describe,
+ expect,
+ inject,
+ beforeEachProviders,
+ beforeEach,
+ fakeAsync,
+ tick
+} from '@angular/core/testing';
+
+import { MRSService } from './mrs.service';
+import { StorageService } from './storage.service';
+
+describe('MRS Service', () ... | |
e5973b8daa325344cf55b4c2840dd235e5e4e4f4 | tests/cases/fourslash/completionForStringLiteral4.ts | tests/cases/fourslash/completionForStringLiteral4.ts | /// <reference path='fourslash.ts'/>
// @allowJs: true
// @Filename: in.js
/////** I am documentation
//// * @param {'literal'} p1
//// * @param {"literal"} p2
//// * @param {'other1' | 'other2'} p3
//// * @param {'literal' | number} p4
//// */
////function f(p1, p2, p3, p4) {
//// return p1 + p2 + p3 + p4... | Add string-literal completion test for jsdoc | Add string-literal completion test for jsdoc
| TypeScript | apache-2.0 | chuckjaz/TypeScript,weswigham/TypeScript,kitsonk/TypeScript,nojvek/TypeScript,synaptek/TypeScript,erikmcc/TypeScript,mihailik/TypeScript,synaptek/TypeScript,thr0w/Thr0wScript,Eyas/TypeScript,minestarks/TypeScript,microsoft/TypeScript,Microsoft/TypeScript,erikmcc/TypeScript,kpreisser/TypeScript,donaldpipowitch/TypeScrip... | ---
+++
@@ -0,0 +1,22 @@
+/// <reference path='fourslash.ts'/>
+// @allowJs: true
+// @Filename: in.js
+/////** I am documentation
+//// * @param {'literal'} p1
+//// * @param {"literal"} p2
+//// * @param {'other1' | 'other2'} p3
+//// * @param {'literal' | number} p4
+//// */
+////function f(p1, p2, p3, p4) {
+////... | |
7cfe7f8a0aaf5e3c1d42d5ca7766c1e3a0983780 | lib/item_store_test.ts | lib/item_store_test.ts | import item_store = require('./item_store');
import testLib = require('./test');
testLib.addTest('default item properties', (assert) => {
var item = new item_store.Item();
assert.notEqual(item.uuid.match(/^[0-9A-F]{32}$/), null);
assert.ok(!item.isSaved());
assert.equal(item.primaryLocation(), '');
});
testLib.ad... | Add basic test case for default item_store.Item properties | Add basic test case for default item_store.Item properties
| TypeScript | bsd-3-clause | robertknight/passcards,robertknight/passcards,robertknight/passcards,robertknight/passcards | ---
+++
@@ -0,0 +1,19 @@
+import item_store = require('./item_store');
+import testLib = require('./test');
+
+testLib.addTest('default item properties', (assert) => {
+ var item = new item_store.Item();
+ assert.notEqual(item.uuid.match(/^[0-9A-F]{32}$/), null);
+ assert.ok(!item.isSaved());
+ assert.equal(item.prim... | |
2af7ccae6b0aff481100609dfd09f4a7776fab49 | saleor/static/dashboard-next/components/DebounceForm.tsx | saleor/static/dashboard-next/components/DebounceForm.tsx | import * as React from "react";
import Debounce from "./Debounce";
export interface DebounceFormProps {
change: (event: React.ChangeEvent<any>) => void;
children: ((
props: (event: React.ChangeEvent<any>) => void
) => React.ReactNode);
submit: (event: React.FormEvent<any>) => void;
time?: number;
}
expo... | import * as React from "react";
import Debounce from "./Debounce";
export interface DebounceFormProps {
change: (event: React.ChangeEvent<any>, cb?: () => void) => void;
children: ((
props: (event: React.ChangeEvent<any>) => void
) => React.ReactNode);
submit: (event: React.FormEvent<any>) => void;
time?... | Use callback after form's setState | Use callback after form's setState
| TypeScript | bsd-3-clause | UITools/saleor,maferelo/saleor,UITools/saleor,maferelo/saleor,mociepka/saleor,UITools/saleor,mociepka/saleor,UITools/saleor,UITools/saleor,maferelo/saleor,mociepka/saleor | ---
+++
@@ -2,7 +2,7 @@
import Debounce from "./Debounce";
export interface DebounceFormProps {
- change: (event: React.ChangeEvent<any>) => void;
+ change: (event: React.ChangeEvent<any>, cb?: () => void) => void;
children: ((
props: (event: React.ChangeEvent<any>) => void
) => React.ReactNode);
@@ ... |
da208c9e6da278ce358bdb779fbfbfe727367143 | data_structures/Queue/ts/queue.ts | data_structures/Queue/ts/queue.ts | interface Queue<T> {
readonly length: number;
enqueue(value: T): number;
dequeue(): T | undefined;
peek(): T | undefined;
isEmpty(): boolean;
[Symbol.iterator](): IterableIterator<T>;
}
class QueueImpl<T> implements Queue<T> {
private _store: Array<T> = [];
get length(): number {
return this._store.length;
... | Add implementation of Queue in TypeScript | Add implementation of Queue in TypeScript
| TypeScript | cc0-1.0 | ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovs... | ---
+++
@@ -0,0 +1,63 @@
+interface Queue<T> {
+ readonly length: number;
+ enqueue(value: T): number;
+ dequeue(): T | undefined;
+ peek(): T | undefined;
+ isEmpty(): boolean;
+ [Symbol.iterator](): IterableIterator<T>;
+}
+
+class QueueImpl<T> implements Queue<T> {
+ private _store: Array<T> = [];
+
+ get length()... | |
d9fbf2fe9e0c2be51976539b393302729f15c58a | application/confagrid-frontend/src/main/frontend/root/modules/main/models/mex/word-grid-update-request.ts | application/confagrid-frontend/src/main/frontend/root/modules/main/models/mex/word-grid-update-request.ts | /*
* word-grid-update-request.ts
*
* Copyright (C) 2018 [ A Legge Up ]
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
import { BaseRequest } from './base-request';
export interface WordGridUpdateRequest extends BaseRequest {
id: s... | Add simple update request for adding phrase to word-grid | Add simple update request for adding phrase to word-grid
| TypeScript | mit | ALeggeUp/confagrid,ALeggeUp/confagrid,ALeggeUp/confagrid,ALeggeUp/confagrid,ALeggeUp/confagrid | ---
+++
@@ -0,0 +1,15 @@
+/*
+ * word-grid-update-request.ts
+ *
+ * Copyright (C) 2018 [ A Legge Up ]
+ *
+ * This software may be modified and distributed under the terms
+ * of the MIT license. See the LICENSE file for details.
+ */
+
+import { BaseRequest } from './base-request';
+
+export interface WordGridUpda... | |
e5261df82d291449d95de3d9de6a914e2bae4bc9 | src/Parsing/Outline/ParseInlineOnlyIfParagraph.ts | src/Parsing/Outline/ParseInlineOnlyIfParagraph.ts | import { TextConsumer } from '../TextConsumer'
import { ParagraphNode } from '../../SyntaxNodes/ParagraphNode'
import { SyntaxNode } from '../../SyntaxNodes/SyntaxNode'
import { getOutlineNodes } from './GetOutlineNodes'
import { NON_BLANK } from './Patterns'
import { OutlineParser, OutlineParserArgs, } from './Outline... | Add helper for excluding fancy outline lines | Add helper for excluding fancy outline lines
| TypeScript | mit | start/up,start/up | ---
+++
@@ -0,0 +1,39 @@
+import { TextConsumer } from '../TextConsumer'
+import { ParagraphNode } from '../../SyntaxNodes/ParagraphNode'
+import { SyntaxNode } from '../../SyntaxNodes/SyntaxNode'
+import { getOutlineNodes } from './GetOutlineNodes'
+import { NON_BLANK } from './Patterns'
+import { OutlineParser, Out... | |
4b2cf4df1a1d1cef2fe14b9a48d8529f331185cc | src/utils/outputSvg.ts | src/utils/outputSvg.ts | import { select } from 'd3-selection';
export type TOutputType = 'png' | 'blob';
// Method to combine an svg specified by id with the InfoSum watermark and
// produce a blob or png output that can be used for download
export const outputSvg = (
svgId: string,
width: number,
height: number,
callback: (outpuDa... | Add svgOutput utility to combine svgs and output to blob or png | Add svgOutput utility to combine svgs and output to blob or png
| TypeScript | mit | cognitivelogic/cl-react-graph,cognitivelogic/cl-react-graph,cognitivelogic/cl-react-graph | ---
+++
@@ -0,0 +1,67 @@
+import { select } from 'd3-selection';
+
+export type TOutputType = 'png' | 'blob';
+
+// Method to combine an svg specified by id with the InfoSum watermark and
+// produce a blob or png output that can be used for download
+export const outputSvg = (
+ svgId: string,
+ width: number,
+ ... | |
dddc76b15675621d6996a45549f386a5a8630831 | tests/cases/fourslash/quickInfoDisplayPartsTypeParameterInTypeAlias.ts | tests/cases/fourslash/quickInfoDisplayPartsTypeParameterInTypeAlias.ts | /// <reference path='fourslash.ts'/>
////type /*0*/List</*1*/T> = /*2*/T[]
type L<T> = T[]
let typeAliashDisplayParts = [{ text: "type", kind: "keyword" }, { text: " ", kind: "space" }, { text: "List", kind: "aliasName" },
{ text: "<", kind: "punctuation" }, { text: "T", kind: "typeParameterName" }, { text... | Add quick info test for type parameter in type alias | Add quick info test for type parameter in type alias
| TypeScript | apache-2.0 | Mqgh2013/TypeScript,kimamula/TypeScript,DanielRosenwasser/TypeScript,fabioparra/TypeScript,Eyas/TypeScript,kimamula/TypeScript,fabioparra/TypeScript,nojvek/TypeScript,mcanthony/TypeScript,evgrud/TypeScript,chuckjaz/TypeScript,mmoskal/TypeScript,basarat/TypeScript,nojvek/TypeScript,moander/TypeScript,kimamula/TypeScript... | ---
+++
@@ -0,0 +1,22 @@
+/// <reference path='fourslash.ts'/>
+
+////type /*0*/List</*1*/T> = /*2*/T[]
+
+type L<T> = T[]
+let typeAliashDisplayParts = [{ text: "type", kind: "keyword" }, { text: " ", kind: "space" }, { text: "List", kind: "aliasName" },
+ { text: "<", kind: "punctuation" }, { text: "T", kind: "... | |
187332e26777bbd1e08c7c96c365c0b3e1f88482 | src/channel-members-view.tsx | src/channel-members-view.tsx | // tslint:disable-next-line:no-unused-variable
import * as React from 'react';
import { Api } from './lib/models/api-call';
import { UserViewModel, UserListItem } from './user-list-item';
import { CollectionView } from './lib/collection-view';
import { Model } from './lib/model';
import { Store } from './store';
expo... | Add a ChannelMembersView that's just a collection of users. | Add a ChannelMembersView that's just a collection of users.
| TypeScript | bsd-3-clause | paulcbetts/trickline,paulcbetts/trickline,paulcbetts/trickline,paulcbetts/trickline | ---
+++
@@ -0,0 +1,36 @@
+// tslint:disable-next-line:no-unused-variable
+import * as React from 'react';
+
+import { Api } from './lib/models/api-call';
+import { UserViewModel, UserListItem } from './user-list-item';
+import { CollectionView } from './lib/collection-view';
+import { Model } from './lib/model';
+imp... | |
e563a663d95e499ccdc03c615722d530c7c7a2db | test/routes/dslRouterTest.ts | test/routes/dslRouterTest.ts | import * as DSLRouter from "../../src/routes/dslRouter";
import * as express from "express";
import * as Chai from "chai";
/**
* This is the test for DatabaseRouter class
*
* @history
* | Author | Action Performed | Data |
* | --- | --- | --- |
* | Emanuele Carraro | Create class DSLRouter | 10/... | Add test file (to be implemented) | Add test file (to be implemented)
| TypeScript | mit | BugBusterSWE/MaaS,BugBusterSWE/MaaS,BugBusterSWE/MaaS,BugBusterSWE/MaaS | ---
+++
@@ -0,0 +1,32 @@
+import * as DSLRouter from "../../src/routes/dslRouter";
+import * as express from "express";
+import * as Chai from "chai";
+
+/**
+ * This is the test for DatabaseRouter class
+ *
+ * @history
+ * | Author | Action Performed | Data |
+ * | --- | --- | --- |
+ * | Emanuele ... | |
aa0c43fed16b610195a351b8fab973d7b9575325 | src/app/tech-list.ts | src/app/tech-list.ts | import { Tech } from './tech';
export const techs: Tech[] = [
{
id: 1,
name: 'Angular'
},
{
id: 2,
name: 'EcmaScript'
},
{
id: 3,
name: 'TypeScript'
},
{
id: 4,
name: 'Java'
},
{
id: 5,
name: 'Spring'
},
{
id: 6,
name: 'JQuery'
},
{
id: 7,
... | Create a list of technologies. | Create a list of technologies.
| TypeScript | mit | EtienneMiret/angular-quickstart,EtienneMiret/angular-quickstart,EtienneMiret/angular-quickstart | ---
+++
@@ -0,0 +1,44 @@
+import { Tech } from './tech';
+
+export const techs: Tech[] = [
+ {
+ id: 1,
+ name: 'Angular'
+ },
+ {
+ id: 2,
+ name: 'EcmaScript'
+ },
+ {
+ id: 3,
+ name: 'TypeScript'
+ },
+ {
+ id: 4,
+ name: 'Java'
+ },
+ {
+ id: 5,
+ name: 'Spring'
+ },
+ {
... | |
8613f648bb75b234864c798064cbb93042263c7f | app/ui/pages/crumpet-page.ts | app/ui/pages/crumpet-page.ts | /**
* Created by lthompson on 28/05/2016.
*/
import {Component} from "@angular/core";
import {AppStore} from "angular2-redux";
import {Crumpet} from "../../data/Crumpet";
import {Observable} from "rxjs/Rx";
import {CrumpetListView} from "../views/crumpet-list-view";
import {CrumpetActions} from "../../actions/crumpet... | Create a routable page view for the main application page, which hosts the crumpet list view and an about page. | Create a routable page view for the main application page, which hosts the crumpet list view and an about page.
| TypeScript | unlicense | luketn/WonderCrumpet | ---
+++
@@ -0,0 +1,39 @@
+/**
+ * Created by lthompson on 28/05/2016.
+ */
+import {Component} from "@angular/core";
+import {AppStore} from "angular2-redux";
+import {Crumpet} from "../../data/Crumpet";
+import {Observable} from "rxjs/Rx";
+import {CrumpetListView} from "../views/crumpet-list-view";
+import {Crumpet... | |
799b78488d95996a67837ace1baf88830d3456c8 | saleor/static/dashboard-next/components/DateFormatter/DateProvider.tsx | saleor/static/dashboard-next/components/DateFormatter/DateProvider.tsx | import * as React from "react";
import { Provider } from "./DateContext";
interface DateProviderState {
date: number;
}
export class DateProvider extends React.Component<{}, DateProviderState> {
static contextTypes = {};
intervalId: number;
state = {
date: Date.now()
};
componentDidMount() {
t... | import * as React from "react";
import { Provider } from "./DateContext";
interface DateProviderState {
date: number;
}
export class DateProvider extends React.Component<{}, DateProviderState> {
static contextTypes = {};
intervalId: number;
state = {
date: Date.now()
};
componentDidMount() {
t... | Fix bug causing to display in a few seconds instead of few seconds ago | Fix bug causing to display in a few seconds instead of few seconds ago
| TypeScript | bsd-3-clause | UITools/saleor,mociepka/saleor,UITools/saleor,mociepka/saleor,maferelo/saleor,maferelo/saleor,mociepka/saleor,maferelo/saleor,UITools/saleor,UITools/saleor,UITools/saleor | ---
+++
@@ -18,7 +18,7 @@
componentDidMount() {
this.intervalId = window.setInterval(
() => this.setState({ date: Date.now() }),
- 60_000
+ 10_000
);
}
|
be2fb5c73379ff3dc7fb6924fa0c0f2fab4621ac | tests/DTMtest.ts | tests/DTMtest.ts | import "should";
import { parseNmeaSentence } from "../index";
describe("DTM", (): void => {
it("parser", (): void => {
const packet = parseNmeaSentence("$GNDTM,W84,,0.0,N,0.0,E,0.0,W84*71");
packet.should.have.property("sentenceId", "DTM");
packet.should.have.property("sentenceName", "Datum referenc... | Add test for DTM packet decoding | Add test for DTM packet decoding
| TypeScript | mit | 101100/nmea-simple | ---
+++
@@ -0,0 +1,22 @@
+import "should";
+
+import { parseNmeaSentence } from "../index";
+
+
+describe("DTM", (): void => {
+
+ it("parser", (): void => {
+ const packet = parseNmeaSentence("$GNDTM,W84,,0.0,N,0.0,E,0.0,W84*71");
+
+ packet.should.have.property("sentenceId", "DTM");
+ packet.should.have.p... | |
bd6674859cb23500fd24d4cfbdf5503aeef0c831 | ui/test/kapacitor/components/KapacitorRulesTable.test.tsx | ui/test/kapacitor/components/KapacitorRulesTable.test.tsx | import React from 'react'
import {shallow} from 'enzyme'
import KapacitorRulesTable from 'src/kapacitor/components/KapacitorRulesTable'
import {source, kapacitorRules} from 'test/resources'
const setup = () => {
const props = {
source,
rules: kapacitorRules,
onDelete: () => {},
onChangeRuleStatus: ... | import React from 'react'
import {shallow} from 'enzyme'
import {isUUIDv4} from 'src/utils/stringValidators'
import KapacitorRulesTable from 'src/kapacitor/components/KapacitorRulesTable'
import {source, kapacitorRules} from 'test/resources'
const setup = () => {
const props = {
source,
rules: kapacitorRu... | Test KapacitorRulesTable tr keys to be UUIDv4 | Test KapacitorRulesTable tr keys to be UUIDv4
| TypeScript | mit | influxdb/influxdb,li-ang/influxdb,li-ang/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,nooproblem/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,nooproblem/influxdb,influxdb/influxdb,nooproblem/influxdb,nooproblem/influxd... | ---
+++
@@ -1,5 +1,7 @@
import React from 'react'
import {shallow} from 'enzyme'
+
+import {isUUIDv4} from 'src/utils/stringValidators'
import KapacitorRulesTable from 'src/kapacitor/components/KapacitorRulesTable'
@@ -10,14 +12,14 @@
source,
rules: kapacitorRules,
onDelete: () => {},
- onCha... |
f75499a7cb363279a2cce55d5fb5296851092259 | saleor/static/dashboard-next/components/Tab/Tab.tsx | saleor/static/dashboard-next/components/Tab/Tab.tsx | import {
createStyles,
Theme,
withStyles,
WithStyles
} from "@material-ui/core/styles";
import Typography from "@material-ui/core/Typography";
import * as classNames from "classnames";
import * as React from "react";
const styles = (theme: Theme) =>
createStyles({
active: {},
root: {
"&$active"... | import {
createStyles,
Theme,
withStyles,
WithStyles
} from "@material-ui/core/styles";
import Typography from "@material-ui/core/Typography";
import * as classNames from "classnames";
import * as React from "react";
const styles = (theme: Theme) =>
createStyles({
active: {},
root: {
"&$active"... | Add some padding to tab | Add some padding to tab
| TypeScript | bsd-3-clause | UITools/saleor,maferelo/saleor,maferelo/saleor,UITools/saleor,mociepka/saleor,maferelo/saleor,UITools/saleor,mociepka/saleor,UITools/saleor,mociepka/saleor,UITools/saleor | ---
+++
@@ -27,6 +27,7 @@
fontWeight: theme.typography.fontWeightRegular,
marginRight: theme.spacing.unit * 4,
minWidth: 40,
+ padding: `0 ${theme.spacing.unit}px`,
transition: theme.transitions.duration.short + "ms"
}
}); |
8435bb05c38fa9af4d84a277a9cc86eeaa3ea629 | src/resources/MSATokenService.ts | src/resources/MSATokenService.ts | import * as request from "request";
export interface Token {
token_type: string;
expires_in: number;
ext_expires_in: number;
access_token: string;
}
interface CachedToken extends Token {
expires_on: number;
}
let cachedToken: CachedToken;
export function getBotframeworkToken(): Promise<Token> {
... | Add helper for MSA auth tokens. | Add helper for MSA auth tokens.
| TypeScript | agpl-3.0 | deegles/cookietime,deegles/cookietime | ---
+++
@@ -0,0 +1,59 @@
+import * as request from "request";
+
+export interface Token {
+ token_type: string;
+ expires_in: number;
+ ext_expires_in: number;
+ access_token: string;
+}
+
+interface CachedToken extends Token {
+ expires_on: number;
+}
+
+let cachedToken: CachedToken;
+
+export functio... | |
663791f844168c13ad2312e63f0923ad65ccca25 | ngLabels/App_Script/contenteditable.ts | ngLabels/App_Script/contenteditable.ts | /// <reference path="../scripts/typings/angularjs/angular.d.ts" />
module LabelApplication {
class ContentEditable implements ng.IDirective {
static factory(): ng.IDirectiveFactory {
return () => new ContentEditable();
}
restrict = 'A';
require = 'ngModel';
lin... | Add the content editable typescript file | Add the content editable typescript file
| TypeScript | apache-2.0 | BillWagner/TypeScriptAngular,BillWagner/TypeScriptAngular,BillWagner/TypeScriptAngular,BillWagner/TypeScriptAngular | ---
+++
@@ -0,0 +1,26 @@
+/// <reference path="../scripts/typings/angularjs/angular.d.ts" />
+
+module LabelApplication {
+ class ContentEditable implements ng.IDirective {
+ static factory(): ng.IDirectiveFactory {
+ return () => new ContentEditable();
+ }
+
+ restrict = 'A';
+ ... | |
1eda190dd7136fb387c2b6cccc84f8d42c3088f4 | test/whatwgTest.ts | test/whatwgTest.ts | 'use strict';
import * as assert from 'power-assert';
import * as url from 'url';
import * as whatwg from '../rules/whatwg';
//
describe('whatwg', () => {
it('should normalize protocol', () => {
const httpURL = 'http://dom.spec.whatwg.org/';
const actual = whatwg.normalize(url.parse(httpURL));
... | Add test for whatwg normalizer | Add test for whatwg normalizer
| TypeScript | mit | takenspc/ps-url-normalizer | ---
+++
@@ -0,0 +1,39 @@
+'use strict';
+import * as assert from 'power-assert';
+import * as url from 'url';
+import * as whatwg from '../rules/whatwg';
+
+//
+describe('whatwg', () => {
+ it('should normalize protocol', () => {
+ const httpURL = 'http://dom.spec.whatwg.org/';
+ const actual = whatw... | |
6231645016dc4bf46e5db5940be48c9c8802c9c2 | tests/ls/fourslash/formattingAfterChainedFatArrow.ts | tests/ls/fourslash/formattingAfterChainedFatArrow.ts | /// <reference path="fourslash.ts" />
////var x = n => p => {
//// while (true) {
//// void 0;
//// }/**/
////};
goTo.marker();
format.document();
// Bug 17854: Bad formatting after chained fat arrow
// verify.currentLineContentIs(' }');
verify.currentLineContentIs('}');
| Test for indent formatting after x => y => z | Test for indent formatting after x => y => z
| TypeScript | apache-2.0 | vcsjones/typescript,fdecampredon/jsx-typescript-old-version,hippich/typescript,tarruda/typescript,bolinfest/typescript,rbirkby/typescript,mbrowne/typescript-dci,mbebenita/shumway.ts,mbrowne/typescript-dci,hippich/typescript,bolinfest/typescript,mbrowne/typescript-dci,popravich/typescript,turbulenz/typescript,guidobouma... | ---
+++
@@ -0,0 +1,14 @@
+/// <reference path="fourslash.ts" />
+
+////var x = n => p => {
+//// while (true) {
+//// void 0;
+//// }/**/
+////};
+
+goTo.marker();
+format.document();
+// Bug 17854: Bad formatting after chained fat arrow
+// verify.currentLineContentIs(' }');
+verify.currentLineConten... | |
dda07d32cd6f7bbf0fd03423354974ed30d25095 | src/app/error/error.component.stories.ts | src/app/error/error.component.stories.ts | import { NgModule } from '@angular/core';
import { storiesOf } from '@storybook/angular';
import { TitleService } from '../shared/title.service';
import { ErrorComponent } from './error.component';
const mockTitle = {
resetTitle: () => {}
};
const moduleMetadata: NgModule = {
providers: [{ provide: TitleService,... | Add story for error page | Add story for error page
| TypeScript | apache-2.0 | jbrowneuk/jblog,jbrowneuk/jblog,jbrowneuk/jblog,jbrowneuk/jblog | ---
+++
@@ -0,0 +1,18 @@
+import { NgModule } from '@angular/core';
+import { storiesOf } from '@storybook/angular';
+
+import { TitleService } from '../shared/title.service';
+import { ErrorComponent } from './error.component';
+
+const mockTitle = {
+ resetTitle: () => {}
+};
+
+const moduleMetadata: NgModule = {
... | |
81aacb0ce7cf9f953590521d16f487cdc48d6ab2 | src/test/Apha/Projections/Storage/MemoryVersionStorage.spec.ts | src/test/Apha/Projections/Storage/MemoryVersionStorage.spec.ts |
import {expect} from "chai";
import {MemoryVersionStorage} from "../../../../main/Apha/Projections/Storage/MemoryVersionStorage";
describe("MemoryVersionStorage", () => {
let storage;
beforeEach(() => {
storage = new MemoryVersionStorage();
});
describe("findByName", () => {
it("shou... | Add test for memory version storage. | Add test for memory version storage.
| TypeScript | mit | martyn82/aphajs | ---
+++
@@ -0,0 +1,42 @@
+
+import {expect} from "chai";
+import {MemoryVersionStorage} from "../../../../main/Apha/Projections/Storage/MemoryVersionStorage";
+
+describe("MemoryVersionStorage", () => {
+ let storage;
+
+ beforeEach(() => {
+ storage = new MemoryVersionStorage();
+ });
+
+ describe... | |
1fc65b22c8f2f56025eddffc6a53bc89fa12b812 | src/panels/itab.ts | src/panels/itab.ts | /*-----------------------------------------------------------------------------
| Copyright (c) 2014-2015, S. Chris Colbert
|
| Distributed under the terms of the BSD 3-Clause License.
|
| The full license is in the file LICENSE, distributed with this software.
|---------------------------------------------------------... | Move ITab interface to panels. | Move ITab interface to panels.
| TypeScript | bsd-3-clause | Carreau/phosphor-notebook-old-orig,dwillmer/phosphor,KesterTong/phoshpor-notebook,blink1073/phosphor,KesterTong/phoshpor-notebook,phosphorjs/phosphor,KesterTong/phoshpor-notebook,dwillmer/phosphor,Carreau/phosphor-notebook-old-orig,Carreau/phosphor-notebook-old-orig,dwillmer/phosphor,phosphorjs/phosphor,blink1073/phosp... | ---
+++
@@ -0,0 +1,41 @@
+/*-----------------------------------------------------------------------------
+| Copyright (c) 2014-2015, S. Chris Colbert
+|
+| Distributed under the terms of the BSD 3-Clause License.
+|
+| The full license is in the file LICENSE, distributed with this software.
+|-----------------------... | |
5df7cf64f2c0f066fc150d1e0b1dbce726887d61 | src/lib/directives/set-element.ts | src/lib/directives/set-element.ts | import { directive } from '../../../node_modules/lit-html/lit-html.js';
/**
* Sets the part to a new element of the type selector with the given props, attributes and innerHTML
*
* @param {string} selector
* @param {any} [{ props={}, attributes={}, innerHTML = '' }={}]
*/
export const setElement = (selector: s... | Add setElement directive (for HOE) | Add setElement directive (for HOE)
| TypeScript | apache-2.0 | DiiLord/lit-element,DiiLord/lit-element,DiiLord/lit-element | ---
+++
@@ -0,0 +1,17 @@
+import { directive } from '../../../node_modules/lit-html/lit-html.js';
+
+/**
+ * Sets the part to a new element of the type selector with the given props, attributes and innerHTML
+ *
+ * @param {string} selector
+ * @param {any} [{ props={}, attributes={}, innerHTML = '' }={}]
+ */
+ex... | |
2cb45c47a5b22010e0343b515000128f013b6038 | client/Library/StatBlockLibrary.test.ts | client/Library/StatBlockLibrary.test.ts | import { StatBlock } from "../../common/StatBlock";
import { AccountClient } from "../Account/AccountClient";
import { Store } from "../Utility/Store";
import { StatBlockLibrary } from "./StatBlockLibrary";
describe("StatBlock Library", () => {
test("", async done => {
localStorage.clear();
Store.Save(Store... | Test AddListings and GetWithTemplate on localstorage | Test AddListings and GetWithTemplate on localstorage
| TypeScript | mit | cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative | ---
+++
@@ -0,0 +1,41 @@
+import { StatBlock } from "../../common/StatBlock";
+import { AccountClient } from "../Account/AccountClient";
+import { Store } from "../Utility/Store";
+import { StatBlockLibrary } from "./StatBlockLibrary";
+
+describe("StatBlock Library", () => {
+ test("", async done => {
+ localSto... | |
f7f9bd1d2431c1b2cc2d80f6344d552f0230fb11 | tests/cases/fourslash/parameterWithNestedDestructuring.ts | tests/cases/fourslash/parameterWithNestedDestructuring.ts | /// <reference path='fourslash.ts'/>
////[[{foo: 'hello', bar: [1]}]]
//// .map(([{foo, bar: [baz]}]) => /*1*/foo + /*2*/baz);
goTo.marker('1');
verify.quickInfoIs('var foo: string');
goTo.marker('2');
verify.quickInfoIs('var baz: number');
| Add tests for nested destructuring | Add tests for nested destructuring
| TypeScript | apache-2.0 | Eyas/TypeScript,fabioparra/TypeScript,kimamula/TypeScript,RyanCavanaugh/TypeScript,mihailik/TypeScript,ziacik/TypeScript,weswigham/TypeScript,donaldpipowitch/TypeScript,ziacik/TypeScript,synaptek/TypeScript,synaptek/TypeScript,SaschaNaz/TypeScript,TukekeSoft/TypeScript,chuckjaz/TypeScript,alexeagle/TypeScript,TukekeSof... | ---
+++
@@ -0,0 +1,10 @@
+/// <reference path='fourslash.ts'/>
+
+////[[{foo: 'hello', bar: [1]}]]
+//// .map(([{foo, bar: [baz]}]) => /*1*/foo + /*2*/baz);
+
+goTo.marker('1');
+verify.quickInfoIs('var foo: string');
+
+goTo.marker('2');
+verify.quickInfoIs('var baz: number'); | |
b9f4ae435cdacd83d7af7e21256a0f0c55ba015f | app/components/resources/base-list.ts | app/components/resources/base-list.ts | import {ResourcesComponent} from './resources.component';
import {ViewFacade} from './view/view-facade';
import {Loading} from '../../widgets/loading';
import {NavigationPath} from './navigation-path';
/**
* A base class for all lists, e.g. sidebarList and List components
*
* @author Philipp Gerth
*/
export class... | Create new abstract class for lists | Create new abstract class for lists
| TypeScript | apache-2.0 | codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client | ---
+++
@@ -0,0 +1,34 @@
+import {ResourcesComponent} from './resources.component';
+import {ViewFacade} from './view/view-facade';
+import {Loading} from '../../widgets/loading';
+import {NavigationPath} from './navigation-path';
+
+/**
+ * A base class for all lists, e.g. sidebarList and List components
+ *
+ * @au... | |
cf969e29d54fe0077c7114df07298ca2605c6b8c | app/ui/views/crumpet-list-view.ts | app/ui/views/crumpet-list-view.ts | import {Component,Input,Output,EventEmitter} from "@angular/core";
import {Crumpet} from "../../data/Crumpet";
@Component({
selector: "crumpet-list-view",
template: `<GridLayout rows="auto, *">
<ListView [items]="list" row="1" class="small-spacing">
<template let-ite... | Create a 'dumb view' component which can render a list of crumpets | Create a 'dumb view' component which can render a list of crumpets
| TypeScript | unlicense | luketn/WonderCrumpet | ---
+++
@@ -0,0 +1,22 @@
+import {Component,Input,Output,EventEmitter} from "@angular/core";
+import {Crumpet} from "../../data/Crumpet";
+
+@Component({
+ selector: "crumpet-list-view",
+ template: `<GridLayout rows="auto, *">
+ <ListView [items]="list" row="1" class="small-spacing">
+ ... | |
8f12ad6516c3f9937942a62b50d6b92649c554ac | src/app/editor/components/menu/custom-modal.component.ts | src/app/editor/components/menu/custom-modal.component.ts | import {Modal} from "../../../core/services/jetpad-modal.service";
import {Component, OnInit} from "@angular/core";
@Component({
selector: "my-custom-modal",
template: `
<div class="my-custom-modal">
<h1>Modal (todo)</h1>
<button (click)="onCancel()">×</button>
<ul>
<li *ngFor=... | Create example of custom modal using modal service | Create example of custom modal using modal service
| TypeScript | agpl-3.0 | P2Pvalue/jetpad,P2Pvalue/jetpad,P2Pvalue/jetpad | ---
+++
@@ -0,0 +1,66 @@
+import {Modal} from "../../../core/services/jetpad-modal.service";
+import {Component, OnInit} from "@angular/core";
+@Component({
+ selector: "my-custom-modal",
+ template: `
+ <div class="my-custom-modal">
+ <h1>Modal (todo)</h1>
+ <button (click)="onCancel()">×</button>... | |
35a78dd7bc018bcae86ee371c67df83a54013ef1 | spec/polymorphism-root-abstract-class.spec.ts | spec/polymorphism-root-abstract-class.spec.ts | import { jsonObject, jsonMember, TypedJSON } from "../js/typedjson";
describe('single class', function () {
abstract class Person {
@jsonMember
firstName?: string;
@jsonMember
lastName?: string;
public getFullName() {
return this.firstName + " " + this.lastNa... | Add test for a direct deserialization of an abstract class | Add test for a direct deserialization of an abstract class
| TypeScript | mit | JohnWhiteTB/TypedJSON,JohnWhiteTB/TypedJSON,JohnWeisz/TypedJSON,JohnWhiteTB/TypedJSON,JohnWeisz/TypedJSON | ---
+++
@@ -0,0 +1,57 @@
+import { jsonObject, jsonMember, TypedJSON } from "../js/typedjson";
+
+describe('single class', function () {
+
+ abstract class Person {
+ @jsonMember
+ firstName?: string;
+
+ @jsonMember
+ lastName?: string;
+
+ public getFullName() {
+ r... | |
e440d7355c16d98024190030ed9c93bde8709974 | src/lib/textfield/textfield-box.component.ts | src/lib/textfield/textfield-box.component.ts | import {
Component,
HostBinding,
OnInit,
} from '@angular/core';
import { Ripple } from '.././ripple/ripple.directive';
import { TextfieldComponent } from './textfield.component';
@Component({
selector: 'mdc-textfield-box',
template:
`
<input #input class="mdc-textfield__input"
[type]="type"
[id]="id... | Implement MDC Text field boxes | feat(textfield): Implement MDC Text field boxes
Text field boxes support all of the same features as normal textfields, including help text,
validation, and dense UI.
Closes #57
| TypeScript | mit | trimox/angular-mdc-web,trimox/angular-mdc-web | ---
+++
@@ -0,0 +1,37 @@
+import {
+ Component,
+ HostBinding,
+ OnInit,
+} from '@angular/core';
+import { Ripple } from '.././ripple/ripple.directive';
+import { TextfieldComponent } from './textfield.component';
+
+@Component({
+ selector: 'mdc-textfield-box',
+ template:
+ `
+ <input #input class="mdc-text... | |
565423d192c67bd5ea6477b217eccb43b416ffaa | src/core/Channel.ts | src/core/Channel.ts | /**
* Signature for the functions that are called when an event is sent.
*/
type Listener<TMessage> = (message: TMessage) => void
/**
* Type-safe event mini-bus, or publisher/subscriber system. It is a useful way to establish communication between
* components which are far away in the shared component hierarchy.
... | Add communication mechanism for separated components | Add communication mechanism for separated components
| TypeScript | agpl-3.0 | inad9300/Soil,inad9300/Soil | ---
+++
@@ -0,0 +1,65 @@
+/**
+ * Signature for the functions that are called when an event is sent.
+ */
+type Listener<TMessage> = (message: TMessage) => void
+
+/**
+ * Type-safe event mini-bus, or publisher/subscriber system. It is a useful way to establish communication between
+ * components which are far away ... | |
91900e122bf626e34da7087c452e46a863d7a842 | src/app/shared/title.service.spec.ts | src/app/shared/title.service.spec.ts | import { Title } from '@angular/platform-browser';
import { It, IMock, Mock, Times } from 'typemoq';
import { TitleService } from './title.service';
describe('Title Service wrapper', () => {
let mockTitle: IMock<Title>;
beforeEach(() => {
mockTitle = Mock.ofType<Title>();
});
it ('should set and format ... | Add unit tests for page title service | Add unit tests for page title service
| TypeScript | apache-2.0 | jbrowneuk/jblog,jbrowneuk/jblog,jbrowneuk/jblog,jbrowneuk/jblog | ---
+++
@@ -0,0 +1,47 @@
+import { Title } from '@angular/platform-browser';
+import { It, IMock, Mock, Times } from 'typemoq';
+
+import { TitleService } from './title.service';
+
+describe('Title Service wrapper', () => {
+ let mockTitle: IMock<Title>;
+
+ beforeEach(() => {
+ mockTitle = Mock.ofType<Title>();... | |
0e55ab17fc8eac97d856284c954fba717b5900b3 | types/koa-websocket/index.d.ts | types/koa-websocket/index.d.ts | // Type definitions for koa-websocket 2.1
// Project: https://github.com/kudos/koa-websocket
// Definitions by: My Self <https://github.com/me>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import Koa = require('koa');
import * as ws from 'ws';
import * as http from 'htt... | // Type definitions for koa-websocket 5.0
// Project: https://github.com/kudos/koa-websocket
// Definitions by: Maël Lavault <https://github.com/moimael>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import Koa = require('koa');
import * as ws from 'ws';
import * as http... | Support passing ws options to listen. | Support passing ws options to listen.
Fix ts breaking when passing anything to listen.
Signed-off-by: Maël Lavault <80a5833c0cb45e7ff3bf6d5c5214e811c56ae7c5@izettle.com>
| TypeScript | mit | magny/DefinitelyTyped,AgentME/DefinitelyTyped,borisyankov/DefinitelyTyped,georgemarshall/DefinitelyTyped,georgemarshall/DefinitelyTyped,markogresak/DefinitelyTyped,dsebastien/DefinitelyTyped,dsebastien/DefinitelyTyped,borisyankov/DefinitelyTyped,mcliment/DefinitelyTyped,magny/DefinitelyTyped,AgentME/DefinitelyTyped,Age... | ---
+++
@@ -1,6 +1,6 @@
-// Type definitions for koa-websocket 2.1
+// Type definitions for koa-websocket 5.0
// Project: https://github.com/kudos/koa-websocket
-// Definitions by: My Self <https://github.com/me>
+// Definitions by: Maël Lavault <https://github.com/moimael>
// Definitions: https://github.com/Defini... |
e7730542be624cfb569aea201cbdc89101367a9f | client/Library/Components/Listing.tsx | client/Library/Components/Listing.tsx | import * as React from "react";
import { MouseEvent } from "react";
import { Listing, Listable } from "../Listing";
import { Button } from "./Button";
export interface ListingProps<T extends Listable> {
name: string;
listing: Listing<T>;
onAdd: (listing: Listing<T>) => void;
onDelete?: (listing: Listin... | import * as React from "react";
import { MouseEvent } from "react";
import { Listing, Listable } from "../Listing";
import { Button } from "./Button";
export interface ListingProps<T extends Listable> {
name: string;
listing: Listing<T>;
onAdd: (listing: Listing<T>) => void;
onDelete?: (listing: Listin... | Check props to hide unused listing buttons | Check props to hide unused listing buttons
| TypeScript | mit | cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative | ---
+++
@@ -21,9 +21,9 @@
public render() {
return <li>
<Button text={this.props.name} onClick={this.addFn} />
- {this.editFn && <Button faClass="edit" onClick={this.editFn} />}
- {this.deleteFn && <Button faClass="trash" onClick={this.deleteFn} />}
- {this.... |
c2dbe1d02ceb9987f9002eedf0cdb21d74de0019 | test/reflect-other.ts | test/reflect-other.ts | import * as fs from "fs";
import { assert } from "chai";
describe("Reflect", () => {
it("does not overwrite existing implementation", () => {
const defineMetadata = Reflect.defineMetadata;
const reflectPath = require.resolve("../Reflect.js");
const reflectContent = fs.readFileSync(... | Add test to verify does not overwrite existing implementation | Add test to verify does not overwrite existing implementation
| TypeScript | apache-2.0 | rbuckton/ReflectDecorators,rbuckton/ReflectDecorators,rbuckton/ReflectDecorators,rbuckton/reflect-metadata,rbuckton/reflect-metadata,rbuckton/reflect-metadata | ---
+++
@@ -0,0 +1,15 @@
+import * as fs from "fs";
+import { assert } from "chai";
+
+describe("Reflect", () => {
+ it("does not overwrite existing implementation", () => {
+ const defineMetadata = Reflect.defineMetadata;
+
+ const reflectPath = require.resolve("../Reflect.js");
+ const refle... | |
524ddf729bbffb8d2295ad91c3b31f3cb5800718 | client/Commands/LegacyCommandSettingsKeys.ts | client/Commands/LegacyCommandSettingsKeys.ts | export const LegacyCommandSettingsKeys = {
"toggle-menu": "Toggle Menu",
"start-encounter": "Start Encounter",
"reroll-initiative": "Reroll Initiative",
"end-encounter": "End Encounter",
"clear-encounter": "Clear Encounter",
"open-library": "Open Library",
"quick-add": "Quick Add Combatant",... | Add legacy command settings keys | Add legacy command settings keys
| TypeScript | mit | cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative | ---
+++
@@ -0,0 +1,26 @@
+export const LegacyCommandSettingsKeys = {
+ "toggle-menu": "Toggle Menu",
+ "start-encounter": "Start Encounter",
+ "reroll-initiative": "Reroll Initiative",
+ "end-encounter": "End Encounter",
+ "clear-encounter": "Clear Encounter",
+ "open-library": "Open Library",
+ ... | |
92ce9af47d45f57bae62f7d7be74ff0a10a9cbfa | src/client/src/apps/MainRoute/widgets/contact-us/ContactUs.stories.tsx | src/client/src/apps/MainRoute/widgets/contact-us/ContactUs.stories.tsx | import { storiesOf } from '@storybook/react'
import React from 'react'
import { Story } from 'rt-storybook'
import { styled } from 'rt-theme'
import ContactUsButton from './ContactUsButton'
const stories = storiesOf('Contact Us', module)
const Centered = styled('div')`
height: 100%;
width: 100%;
display: flex;
... | Add CTA button to storybook | chore(storybook): Add CTA button to storybook
| TypeScript | apache-2.0 | AdaptiveConsulting/ReactiveTraderCloud,AdaptiveConsulting/ReactiveTraderCloud,AdaptiveConsulting/ReactiveTraderCloud,AdaptiveConsulting/ReactiveTraderCloud | ---
+++
@@ -0,0 +1,27 @@
+import { storiesOf } from '@storybook/react'
+import React from 'react'
+import { Story } from 'rt-storybook'
+import { styled } from 'rt-theme'
+import ContactUsButton from './ContactUsButton'
+
+const stories = storiesOf('Contact Us', module)
+
+const Centered = styled('div')`
+ height: 1... | |
5799667bcac2feaa0d57fb3da2422ee571b52d0c | src/elmTest.ts | src/elmTest.ts | import * as utils from './elmUtils';
import * as vscode from 'vscode';
import * as path from 'path';
export function fileIsTestFile(filename) {
const config: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration(
'elm',
);
const elmTestLocationMatcher: string = <string>(
config.get('elmTestFi... | Create funciton to detect elm-test files | Create funciton to detect elm-test files
| TypeScript | mit | Krzysztof-Cieslak/vscode-elm,sbrink/vscode-elm | ---
+++
@@ -0,0 +1,25 @@
+import * as utils from './elmUtils';
+import * as vscode from 'vscode';
+import * as path from 'path';
+
+export function fileIsTestFile(filename) {
+ const config: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration(
+ 'elm',
+ );
+ const elmTestLocationMatcher: string =... | |
cdd5ef9644e421a8ee79064beba821ef77de1a0b | src/renderer/matchTimestamps.ts | src/renderer/matchTimestamps.ts | interface Match {
index: number
length: number
}
export const matchTimestamps = (inputText: string): Match[] => {
const lengthOfDelimiter = 1 // Have to advance past/before the opening/closing brackets
let bracketPattern = /\[(\d|:|.)+\]/g
let match = bracketPattern.exec(inputText)
let matches: Match[] = [... | Add function to match timestamps | Add function to match timestamps
| TypeScript | agpl-3.0 | briandk/transcriptase,briandk/transcriptase | ---
+++
@@ -0,0 +1,24 @@
+interface Match {
+ index: number
+ length: number
+}
+
+export const matchTimestamps = (inputText: string): Match[] => {
+ const lengthOfDelimiter = 1 // Have to advance past/before the opening/closing brackets
+ let bracketPattern = /\[(\d|:|.)+\]/g
+ let match = bracketPattern.exec(i... | |
4380ac0abff9be20252ad105faae616fe5668960 | src/migration/1541082619105-AddForeignKeyConstraints.ts | src/migration/1541082619105-AddForeignKeyConstraints.ts | import {MigrationInterface, QueryRunner} from "typeorm";
export class AddForeignKeyConstraints1541082619105 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<any> {
// Remove duplicate foreign key
await queryRunner.query("ALTER TABLE `datasets` DROP FOREIGN KEY `FK... | Add & deduplicate foreign key constraints | Add & deduplicate foreign key constraints
| TypeScript | mit | OurWorldInData/owid-grapher,OurWorldInData/our-world-in-data-grapher,owid/owid-grapher,OurWorldInData/our-world-in-data-grapher,owid/owid-grapher,OurWorldInData/our-world-in-data-grapher,owid/owid-grapher,owid/owid-grapher,owid/owid-grapher,OurWorldInData/owid-grapher,OurWorldInData/owid-grapher,OurWorldInData/our-worl... | ---
+++
@@ -0,0 +1,21 @@
+import {MigrationInterface, QueryRunner} from "typeorm";
+
+export class AddForeignKeyConstraints1541082619105 implements MigrationInterface {
+
+ public async up(queryRunner: QueryRunner): Promise<any> {
+ // Remove duplicate foreign key
+ await queryRunner.query("ALTER TAB... | |
05ff8971e636967219f088bf247de616d897cbab | test/lib/mock-store.ts | test/lib/mock-store.ts | import { RecursiveProxyHandler } from 'electron-remote';
import { Store } from '../../src/lib/store';
import { Updatable } from '../../src/lib/updatable';
import { ChannelBase, User } from '../../src/lib/models/api-shapes';
export function createMockStore(seedData: any): Store {
return RecursiveProxyHandler.create(... | Use Proxies to make a Mock store that returns what we tell it. | Use Proxies to make a Mock store that returns what we tell it.
| TypeScript | bsd-3-clause | paulcbetts/trickline,paulcbetts/trickline,paulcbetts/trickline,paulcbetts/trickline | ---
+++
@@ -0,0 +1,21 @@
+import { RecursiveProxyHandler } from 'electron-remote';
+
+import { Store } from '../../src/lib/store';
+import { Updatable } from '../../src/lib/updatable';
+import { ChannelBase, User } from '../../src/lib/models/api-shapes';
+
+export function createMockStore(seedData: any): Store {
+ r... | |
9ec6265a7ac6ead18b802e9413d310202cf1f8aa | lib/router/utils.d.ts | lib/router/utils.d.ts | interface StoryData {
viewMode?: string;
storyId?: string;
}
interface SeparatorOptions {
rootSeparator: string | RegExp;
groupSeparator: string | RegExp;
}
export declare const knownNonViewModesRegex: RegExp;
export declare const sanitize: (string: string) => string;
export declare const toId: (kind: string, n... | REFACTOR lib/router to make creating themes work for react15 | REFACTOR lib/router to make creating themes work for react15
| TypeScript | mit | storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/react-storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,kadirahq/react-storybook | ---
+++
@@ -0,0 +1,33 @@
+interface StoryData {
+ viewMode?: string;
+ storyId?: string;
+}
+interface SeparatorOptions {
+ rootSeparator: string | RegExp;
+ groupSeparator: string | RegExp;
+}
+export declare const knownNonViewModesRegex: RegExp;
+export declare const sanitize: (string: string) => string;
+expor... | |
8fc2bcc5ddc7827afd17262c560b75263dbd0032 | src/crystalHover.ts | src/crystalHover.ts | import * as vscode from 'vscode'
import { CrystalContext } from './crystalContext'
export class CrystalHoverProvider extends CrystalContext implements vscode.HoverProvider {
public currentLine
public crystalOutput
public crystalMessageObject
constructor() {
super()
this.currentLine = -1
this.crystalOutput ... | Add support to show variable type on Hover. | Add support to show variable type on Hover.
| TypeScript | mit | faustinoaq/vscode-crystal-lang,faustinoaq/vscode-crystal-lang | ---
+++
@@ -0,0 +1,43 @@
+import * as vscode from 'vscode'
+import { CrystalContext } from './crystalContext'
+
+export class CrystalHoverProvider extends CrystalContext implements vscode.HoverProvider {
+
+ public currentLine
+ public crystalOutput
+ public crystalMessageObject
+
+ constructor() {
+ super()
+ this... | |
53a7848f4e2e57612e5531037e1fc2bf29d77986 | lib/omnisharp-atom/services/apply-changes.ts | lib/omnisharp-atom/services/apply-changes.ts | var Range = require('atom').Range;
import {Observable} from "rx";
export function applyChanges(editor: Atom.TextEditor, response: { Changes: OmniSharp.Models.LinePositionSpanTextChange[]; });
export function applyChanges(editor: Atom.TextEditor, response: { Buffer: string });
export function applyChanges(editor: Atom... | Fix apply changes to work when response is null | Fix apply changes to work when response is null
| TypeScript | mit | OmniSharp/omnisharp-atom,OmniSharp/omnisharp-atom,OmniSharp/omnisharp-atom | ---
+++
@@ -0,0 +1,51 @@
+var Range = require('atom').Range;
+import {Observable} from "rx";
+
+
+export function applyChanges(editor: Atom.TextEditor, response: { Changes: OmniSharp.Models.LinePositionSpanTextChange[]; });
+export function applyChanges(editor: Atom.TextEditor, response: { Buffer: string });
+export ... | |
fc192d4c0baa70da3e523f069d2332ee3a3278b5 | lib/asyncutil_test.ts | lib/asyncutil_test.ts | import Q = require('q');
import testLib = require('./test');
import asyncutil = require('./asyncutil');
testLib.addAsyncTest('test run sequence', (assert) => {
var values = [1, 1, 2, 3, 5, 8, 13];
var runOrder : number[] = [];
var funcs : Array<() => Q.Promise<number>> = [];
values.forEach((value, index) => {
... | Add a missing unit test suite file to Git | Add a missing unit test suite file to Git
| TypeScript | bsd-3-clause | robertknight/passcards,robertknight/passcards,robertknight/passcards,robertknight/passcards | ---
+++
@@ -0,0 +1,26 @@
+import Q = require('q');
+
+import testLib = require('./test');
+import asyncutil = require('./asyncutil');
+
+testLib.addAsyncTest('test run sequence', (assert) => {
+ var values = [1, 1, 2, 3, 5, 8, 13];
+ var runOrder : number[] = [];
+
+ var funcs : Array<() => Q.Promise<number>> = [];
+... | |
a500f5ce64c3994f25721970c00e1c84eee15148 | server/src/util/util.ts | server/src/util/util.ts |
export function asPromise<T>(thenable: { then(fnOnFulfil: (value: T) => T | Promise<T> | void, fnOnReject?: (reason?: any) => any): any }) {
return new Promise<T>((resolve, reject) => {
thenable.then(resolve, reject);
});
}
| Convert Rx.Promise to ES2015 Promise | Convert Rx.Promise to ES2015 Promise
| TypeScript | mit | Jason-Rev/vscode-spell-checker,Jason-Rev/vscode-spell-checker,Jason-Rev/vscode-spell-checker,Jason-Rev/vscode-spell-checker,Jason-Rev/vscode-spell-checker | ---
+++
@@ -0,0 +1,6 @@
+
+export function asPromise<T>(thenable: { then(fnOnFulfil: (value: T) => T | Promise<T> | void, fnOnReject?: (reason?: any) => any): any }) {
+ return new Promise<T>((resolve, reject) => {
+ thenable.then(resolve, reject);
+ });
+} | |
6869a05090fae498c711f1bbfa691f2cec59b3f1 | lib/query/context.ts | lib/query/context.ts | /**
* Copyright 2018 The Lovefield Project Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless... | Add Context to setup query/ dir | Add Context to setup query/ dir
| TypeScript | apache-2.0 | arthurhsu/lovefield-ts,arthurhsu/lovefield-ts | ---
+++
@@ -0,0 +1,88 @@
+/**
+ * Copyright 2018 The Lovefield Project Authors. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.or... | |
2c073ed4302f88ed088d24c18389d1ae0cef408f | test/server/requests.ts | test/server/requests.ts | // NOTE Running these tests requires the crossroads-education/eta-web-test module to be installed.
process.env.ETA_TESTING = "true";
process.env.ETA_AUTH_PROVIDER = "cre-web-test";
import tests from "../../server/api/tests";
before(function(done) {
this.timeout(20000); // plenty of time to initialize the server
... | Implement basic initial integration tests for 404 and 500 | Implement basic initial integration tests for 404 and 500
| TypeScript | mit | crossroads-education/eta,crossroads-education/eta | ---
+++
@@ -0,0 +1,26 @@
+// NOTE Running these tests requires the crossroads-education/eta-web-test module to be installed.
+
+process.env.ETA_TESTING = "true";
+process.env.ETA_AUTH_PROVIDER = "cre-web-test";
+
+import tests from "../../server/api/tests";
+
+before(function(done) {
+ this.timeout(20000); // plen... | |
84ec5813b66df26a172c3166aaedc21ddf327536 | desktop/app/src/sandy-chrome/appinspect/troubleshooting/GuideEndScreen.tsx | desktop/app/src/sandy-chrome/appinspect/troubleshooting/GuideEndScreen.tsx | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
import React from 'react';
import {Button, Modal} from 'antd';
import {Layout} from 'flipper-plugin';
import {getIns... | Add modal dialogue for the end screen | Add modal dialogue for the end screen
Summary:
- Added a dialogue with 2 possible end state buttons
- Problem Solved
- File Support Request
- This diff is the start of the implementation of the troubleshooting wizard.
- The previously implemented troubleshooting button (D29993355 (https://github.com/facebook/f... | TypeScript | mit | facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper | ---
+++
@@ -0,0 +1,58 @@
+/**
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ * @format
+ */
+
+import React from 'react';
+import {Button, Modal} from 'antd';
+import {Layout... | |
e437bae6e3d475d52c261eee51bf430df156ab59 | test/property-decorators/to-lowercase.spec.ts | test/property-decorators/to-lowercase.spec.ts | import { ToLowercase } from './../../src/';
describe('ToLowercase decorator', () => {
it('should throw an error when is applied over non string property', () => {
class TestClassToLowercaseProperty {
@ToLowercase() myProp: number;
}
let testClass = new TestClassToLowercasePrope... | Add unit test cases for toLowercase decorator | Add unit test cases for toLowercase decorator
| TypeScript | mit | semagarcia/typescript-decorators,semagarcia/typescript-decorators | ---
+++
@@ -0,0 +1,35 @@
+import { ToLowercase } from './../../src/';
+
+describe('ToLowercase decorator', () => {
+
+ it('should throw an error when is applied over non string property', () => {
+ class TestClassToLowercaseProperty {
+ @ToLowercase() myProp: number;
+ }
+ let testC... | |
29c4fef65a897b146d780319037ad547a6061541 | src/components/Watchers/EmptyWatchers.tsx | src/components/Watchers/EmptyWatchers.tsx | import * as React from 'react';
import { NonIdealState } from '@blueprintjs/core';
export interface Props {}
class EmptyWatchers extends React.PureComponent<Props, never> {
public render() {
return (
<NonIdealState
title="You have no watchers."
description="Watchers periodically will accep... | Add empty state for watchers. | Add empty state for watchers.
| TypeScript | mit | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | ---
+++
@@ -0,0 +1,18 @@
+import * as React from 'react';
+import { NonIdealState } from '@blueprintjs/core';
+
+export interface Props {}
+
+class EmptyWatchers extends React.PureComponent<Props, never> {
+ public render() {
+ return (
+ <NonIdealState
+ title="You have no watchers."
+ descrip... | |
0764c64dde659ca9d06c7cb3124677c4efd2785a | db/migration/1559633072583-AddForeignKeyConstraints.ts | db/migration/1559633072583-AddForeignKeyConstraints.ts | import {MigrationInterface, QueryRunner} from "typeorm";
export class AddForeignKeyConstraints1559633072583 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<any> {
// Remove all chart_slug_redirects that have had their chart deleted
await queryRunner.query(`
... | Add foreign keys for chart_revisions & chart_slug_redirects | Add foreign keys for chart_revisions & chart_slug_redirects
Ideally, chart_revisions should also have a chartId foreign key, but then charts that get deleted must have all revisions deleted. It's better to not enforce this constraint.
In the future, we should really just *mark* charts as deleted, not delete the chart... | TypeScript | mit | owid/owid-grapher,owid/owid-grapher,OurWorldInData/owid-grapher,owid/owid-grapher,OurWorldInData/owid-grapher,OurWorldInData/owid-grapher,OurWorldInData/owid-grapher,owid/owid-grapher,OurWorldInData/owid-grapher,owid/owid-grapher | ---
+++
@@ -0,0 +1,21 @@
+import {MigrationInterface, QueryRunner} from "typeorm";
+
+export class AddForeignKeyConstraints1559633072583 implements MigrationInterface {
+
+ public async up(queryRunner: QueryRunner): Promise<any> {
+ // Remove all chart_slug_redirects that have had their chart deleted
+ ... | |
d90b63ede980d5b3dd5962f6881b8b1a0b8286d9 | connect/connect-tests.ts | connect/connect-tests.ts | /// <reference path="./connect.d.ts" />
import * as http from "http";
import * as connect from "connect";
const app = connect();
// log all requests
app.use((req, res, next) => {
console.log(req, res);
next();
});
// Stop on errors
app.use((err, req, res, next) => {
if (err) {
return res.end(`Er... | Add tests for connect typings | Add tests for connect typings | TypeScript | mit | teves-castro/DefinitelyTyped,arusakov/DefinitelyTyped,stacktracejs/DefinitelyTyped,donnut/DefinitelyTyped,mattanja/DefinitelyTyped,pwelter34/DefinitelyTyped,xStrom/DefinitelyTyped,borisyankov/DefinitelyTyped,behzad888/DefinitelyTyped,abbasmhd/DefinitelyTyped,schmuli/DefinitelyTyped,glenndierckx/DefinitelyTyped,greglo/D... | ---
+++
@@ -0,0 +1,32 @@
+/// <reference path="./connect.d.ts" />
+
+import * as http from "http";
+import * as connect from "connect";
+
+const app = connect();
+
+// log all requests
+app.use((req, res, next) => {
+ console.log(req, res);
+ next();
+});
+
+// Stop on errors
+app.use((err, req, res, next) => {... | |
5d79995db954c8ec568cc64fab27c9c4d21ffad6 | src/components/Watchers/AddWatcherToast.tsx | src/components/Watchers/AddWatcherToast.tsx | import { connect, Dispatch } from 'react-redux';
import { TextContainer } from '@shopify/polaris';
import { AddWatcher, addWatcher } from '../../actions/watcher';
import * as React from 'react';
import { Watcher, SearchResult } from '../../types';
export interface OwnProps {
readonly hit: SearchResult;
}
export int... | Add a connected component to add watchers from a toast. | Add a connected component to add watchers from a toast.
| TypeScript | mit | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | ---
+++
@@ -0,0 +1,25 @@
+import { connect, Dispatch } from 'react-redux';
+import { TextContainer } from '@shopify/polaris';
+import { AddWatcher, addWatcher } from '../../actions/watcher';
+import * as React from 'react';
+import { Watcher, SearchResult } from '../../types';
+
+export interface OwnProps {
+ readon... | |
16a87c59ee14e75fc2e55d4d129f62bd2dde90e2 | src/modal/modal-options.ts | src/modal/modal-options.ts | /**
* Created by William on 10/07/2017.
*/
export interface ModalOptions {
icon: string;
title: string;
color?: string;
height?: number;
width?: number;
draggable?: boolean;
maximizable?: boolean;
minimizable?: boolean;
}
| Create interface for modal options. | feat(modal): Create interface for modal options.
| TypeScript | mit | TemainfoSistemas/truly-ui,TemainfoSistemas/truly-ui,TemainfoSistemas/truly-ui | ---
+++
@@ -0,0 +1,13 @@
+/**
+ * Created by William on 10/07/2017.
+ */
+export interface ModalOptions {
+ icon: string;
+ title: string;
+ color?: string;
+ height?: number;
+ width?: number;
+ draggable?: boolean;
+ maximizable?: boolean;
+ minimizable?: boolean;
+} | |
1e123fc91a0d23f65c4b42b063b9422c62314823 | app/src/ui/lib/tooltipped-content.tsx | app/src/ui/lib/tooltipped-content.tsx | import * as React from 'react'
import { ITooltipProps, Tooltip } from './tooltip'
import { createObservableRef } from './observable-ref'
interface ITooltippedContentProps
extends Omit<ITooltipProps<HTMLElement>, 'target'> {
readonly tooltip: JSX.Element | string
readonly wrapperElement?: 'span' | 'div'
}
/** A ... | Add a simpler tooltip component | Add a simpler tooltip component
| TypeScript | mit | shiftkey/desktop,say25/desktop,shiftkey/desktop,j-f1/forked-desktop,say25/desktop,say25/desktop,j-f1/forked-desktop,desktop/desktop,artivilla/desktop,desktop/desktop,artivilla/desktop,j-f1/forked-desktop,desktop/desktop,say25/desktop,shiftkey/desktop,shiftkey/desktop,j-f1/forked-desktop,artivilla/desktop,desktop/deskto... | ---
+++
@@ -0,0 +1,32 @@
+import * as React from 'react'
+import { ITooltipProps, Tooltip } from './tooltip'
+import { createObservableRef } from './observable-ref'
+
+interface ITooltippedContentProps
+ extends Omit<ITooltipProps<HTMLElement>, 'target'> {
+ readonly tooltip: JSX.Element | string
+ readonly wrappe... | |
8c4257bd4d441b017df4c75a0ac133462227a22a | src/components/AccordionItemHeading.spec.tsx | src/components/AccordionItemHeading.spec.tsx | import * as React from 'react';
import { cleanup, render } from 'react-testing-library';
import Accordion from './Accordion';
import AccordionItem from './AccordionItem';
import AccordionItemHeading from './AccordionItemHeading';
enum UUIDS {
FOO = 'FOO',
BAR = 'Bar',
}
describe('AccordionItem', () => {
a... | Add unit tests for classnames in AccordionItemHeading | Add unit tests for classnames in AccordionItemHeading
| TypeScript | mit | springload/react-accessible-accordion,springload/react-accessible-accordion,springload/react-accessible-accordion | ---
+++
@@ -0,0 +1,74 @@
+import * as React from 'react';
+import { cleanup, render } from 'react-testing-library';
+import Accordion from './Accordion';
+import AccordionItem from './AccordionItem';
+import AccordionItemHeading from './AccordionItemHeading';
+
+enum UUIDS {
+ FOO = 'FOO',
+ BAR = 'Bar',
+}
+
+... | |
4859ec67e7dccfadf4602fd53af97c9dda836101 | src/parser/shared/modules/helpers/Stacks.tsx | src/parser/shared/modules/helpers/Stacks.tsx | import { EventType } from 'parser/core/Events';
/**
* Returns the current stacks on a given event
* @param event
*/
export function currentStacks(event: any) {
switch (event.type) {
case EventType.RemoveBuff || EventType.RemoveDebuff:
return 0;
case EventType.ApplyBuff || EventType.ApplyDebuff:
... | Add a shared stacks helper | Add a shared stacks helper
| TypeScript | agpl-3.0 | anom0ly/WoWAnalyzer,sMteX/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,anom0ly/WoWAnalyzer,yajinni/WoWAnalyzer,sMteX/WoWAnalyzer,Juko8/WoWAnalyzer,anom0ly/WoWAnalyzer,sMteX/WoWAnalyzer,yajinni/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,yajinni/WoWAnalyzer,yajinni/WoWAnalyzer,Juko8/WoWAnalyzer,anom0ly/WoWAnalyze... | ---
+++
@@ -0,0 +1,18 @@
+import { EventType } from 'parser/core/Events';
+
+/**
+ * Returns the current stacks on a given event
+ * @param event
+ */
+export function currentStacks(event: any) {
+ switch (event.type) {
+ case EventType.RemoveBuff || EventType.RemoveDebuff:
+ return 0;
+ case EventType.Ap... | |
a7d85383fcabf87f49d347a9e9e2263067d0a149 | src/utils/parseStatus.ts | src/utils/parseStatus.ts | import { statusDate } from '../constants/querySelectors';
import { List } from 'immutable';
/**
* Returns a list of Mturk's URL encoded date strings for each day that has
* HIT data.
* @param html
*/
export const parseStatusPage = (html: Document): List<string> => {
const dateCells = html.querySelector... | Add parsing functions for status summary page. | Add parsing functions for status summary page.
| TypeScript | mit | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | ---
+++
@@ -0,0 +1,31 @@
+import { statusDate } from '../constants/querySelectors';
+import { List } from 'immutable';
+
+/**
+ * Returns a list of Mturk's URL encoded date strings for each day that has
+ * HIT data.
+ * @param html
+ */
+export const parseStatusPage = (html: Document): List<string> => {
+ const da... | |
c77b2cdeda8ba93982b01a43c1f6988de73eaef7 | tests/cypress/tests/unit/loadingState.ts | tests/cypress/tests/unit/loadingState.ts | import dataLoading from 'dash-table/derived/table/data_loading';
describe('loading state uneditable', () => {
it('returns true when data are loading', () => {
const loading = dataLoading({
is_loading: true,
prop_name: 'data',
component_name: ''
});
expe... | Add unit test for data_loading. | Add unit test for data_loading.
| TypeScript | mit | plotly/dash-table,plotly/dash-table,plotly/dash-table | ---
+++
@@ -0,0 +1,35 @@
+import dataLoading from 'dash-table/derived/table/data_loading';
+
+describe('loading state uneditable', () => {
+
+ it('returns true when data are loading', () => {
+ const loading = dataLoading({
+ is_loading: true,
+ prop_name: 'data',
+ componen... | |
62e6b1ffe5ed78f23ebd249ac1c7ea14dc115259 | platforms/platform-alexa/src/AlexaHandles.ts | platforms/platform-alexa/src/AlexaHandles.ts | import { PermissionStatus } from './interfaces';
import { HandleOptions, Jovo } from '@jovotech/framework';
import { AlexaRequest } from './AlexaRequest';
export type PermissionType = 'timers' | 'reminders';
export class AlexaHandles {
static onPermission(status: PermissionStatus, type?: PermissionType): HandleOpti... | Add initial handle helpers for Alexa | :sparkles: Add initial handle helpers for Alexa
| TypeScript | apache-2.0 | jovotech/jovo-framework-nodejs,jovotech/jovo-framework-nodejs | ---
+++
@@ -0,0 +1,29 @@
+import { PermissionStatus } from './interfaces';
+import { HandleOptions, Jovo } from '@jovotech/framework';
+import { AlexaRequest } from './AlexaRequest';
+
+export type PermissionType = 'timers' | 'reminders';
+
+export class AlexaHandles {
+ static onPermission(status: PermissionStatus,... | |
d784f019c33d1e85969f6c0a97689273d3efd8c7 | src/Test/Ast/Config/Nsfw.ts | src/Test/Ast/Config/Nsfw.ts | import { expect } from 'chai'
import Up from '../../../index'
import { insideDocumentAndParagraph } from '../Helpers'
import { PlainTextNode } from '../../../SyntaxNodes/PlainTextNode'
import { NotSafeForWorkNode } from '../../../SyntaxNodes/NotSafeForWorkNode'
describe('The term that represents NSFW conventions', ()... | Add 2 failing nsfw tests | Add 2 failing nsfw tests
| TypeScript | mit | start/up,start/up | ---
+++
@@ -0,0 +1,30 @@
+import { expect } from 'chai'
+import Up from '../../../index'
+import { insideDocumentAndParagraph } from '../Helpers'
+import { PlainTextNode } from '../../../SyntaxNodes/PlainTextNode'
+import { NotSafeForWorkNode } from '../../../SyntaxNodes/NotSafeForWorkNode'
+
+
+describe('The term th... | |
2cdbc68f690138410785db1cb4fcbd64e36e4203 | node-progress/node-progress-test.ts | node-progress/node-progress-test.ts | /// <reference path="node-progress.d.ts"/>
var ProgressBar = require('progress');
/**
* Usage example from https://github.com/tj/node-progress
*/
var bar = new ProgressBar(':bar', { total: 10 });
var timer = setInterval(function () {
bar.tick();
if (bar.complete) {
console.log('\ncomplete\n');
clearInt... | Add test case for node-progress | Add test case for node-progress | TypeScript | mit | stephenjelfs/DefinitelyTyped,isman-usoh/DefinitelyTyped,applesaucers/lodash-invokeMap,use-strict/DefinitelyTyped,wkrueger/DefinitelyTyped,OfficeDev/DefinitelyTyped,aldo-roman/DefinitelyTyped,Dominator008/DefinitelyTyped,chrootsu/DefinitelyTyped,lbesson/DefinitelyTyped,sandersky/DefinitelyTyped,chrismbarr/DefinitelyType... | ---
+++
@@ -0,0 +1,32 @@
+/// <reference path="node-progress.d.ts"/>
+
+var ProgressBar = require('progress');
+
+
+/**
+ * Usage example from https://github.com/tj/node-progress
+ */
+var bar = new ProgressBar(':bar', { total: 10 });
+var timer = setInterval(function () {
+ bar.tick();
+ if (bar.complete) {
+ c... | |
0f91dec2bf5daecce65cb16ba95189061ef4ce31 | packages/ivi/__tests__/element_factory.spec.ts | packages/ivi/__tests__/element_factory.spec.ts | import { VNodeFlags } from "../src/vdom/flags";
import { elementFactory } from "../src/vdom/element";
import * as h from "./utils/html";
const div = h.div();
const input = h.input();
const divFactory = elementFactory(div);
const inputFactory = elementFactory(input);
test(`div flags`, () => {
expect(divFactory()._fl... | Add more element factory tests | Add more element factory tests
| TypeScript | mit | ivijs/ivi,ivijs/ivi | ---
+++
@@ -0,0 +1,36 @@
+import { VNodeFlags } from "../src/vdom/flags";
+import { elementFactory } from "../src/vdom/element";
+import * as h from "./utils/html";
+
+const div = h.div();
+const input = h.input();
+const divFactory = elementFactory(div);
+const inputFactory = elementFactory(input);
+
+test(`div flag... | |
fb042657ab2579469a8f3d73b306516d15da3a0d | saleor/static/dashboard-next/home/queries.ts | saleor/static/dashboard-next/home/queries.ts | import gql from "graphql-tag";
import { TypedQuery } from "../queries";
import { Home } from "./types/Home";
const home = gql`
query Home {
salesToday: ordersTotal(period: TODAY) {
gross {
amount
currency
}
}
ordersToday: orders(created: TODAY) {
totalCount
}
or... | import gql from "graphql-tag";
import { TypedQuery } from "../queries";
import { Home } from "./types/Home";
const home = gql`
query Home {
salesToday: ordersTotal(period: TODAY) {
gross {
amount
currency
}
}
ordersToday: orders(created: TODAY) {
totalCount
}
or... | Use all-time values to order stats | Use all-time values to order stats
| TypeScript | bsd-3-clause | UITools/saleor,mociepka/saleor,UITools/saleor,maferelo/saleor,maferelo/saleor,UITools/saleor,UITools/saleor,mociepka/saleor,UITools/saleor,maferelo/saleor,mociepka/saleor | ---
+++
@@ -14,10 +14,10 @@
ordersToday: orders(created: TODAY) {
totalCount
}
- ordersToFulfill: orders(status: READY_TO_FULFILL, created: TODAY) {
+ ordersToFulfill: orders(status: READY_TO_FULFILL) {
totalCount
}
- ordersToCapture: orders(status: READY_TO_CAPTURE, created: TOD... |
0b3e6e213573706155aa46f92da8c645ace66688 | app/src/main-process/authenticated-avatar-filter.ts | app/src/main-process/authenticated-avatar-filter.ts | import { EndpointToken } from '../lib/endpoint-token'
import { OrderedWebRequest } from './ordered-webrequest'
export function installAuthenticatedAvatarFilter(
orderedWebRequest: OrderedWebRequest
) {
let originTokens = new Map<string, string>()
orderedWebRequest.onBeforeSendHeaders.addEventListener(async deta... | Add a filter which populates the auth header for avatar requests | Add a filter which populates the auth header for avatar requests
| TypeScript | mit | j-f1/forked-desktop,shiftkey/desktop,shiftkey/desktop,j-f1/forked-desktop,shiftkey/desktop,j-f1/forked-desktop,desktop/desktop,j-f1/forked-desktop,desktop/desktop,desktop/desktop,desktop/desktop,shiftkey/desktop | ---
+++
@@ -0,0 +1,30 @@
+import { EndpointToken } from '../lib/endpoint-token'
+import { OrderedWebRequest } from './ordered-webrequest'
+
+export function installAuthenticatedAvatarFilter(
+ orderedWebRequest: OrderedWebRequest
+) {
+ let originTokens = new Map<string, string>()
+
+ orderedWebRequest.onBeforeSen... | |
862c769f8dc224adfb362e9d22a2a9693e5c9292 | ui/test/statusbar.spec.ts | ui/test/statusbar.spec.ts | "use strict";
import {Statusbar} from "../src/app/statusbar";
describe("Statusbar Test ", () => {
it("should start and finish", () => {
Statusbar.Start();
Statusbar.Inc();
Statusbar.Done();
});
});
| Add a simple unit test for the statusbar. | Add a simple unit test for the statusbar.
| TypeScript | mit | jp7677/hellocoreclr,jp7677/hellocoreclr,jp7677/hellocoreclr,jp7677/hellocoreclr | ---
+++
@@ -0,0 +1,13 @@
+"use strict";
+
+import {Statusbar} from "../src/app/statusbar";
+
+describe("Statusbar Test ", () => {
+
+ it("should start and finish", () => {
+ Statusbar.Start();
+ Statusbar.Inc();
+ Statusbar.Done();
+ });
+
+}); | |
ddda6853a2ddc38cf09e0b2d12dd7c45d90ba713 | test/reducers/slides/actions/addPluginToCurrentSlide-spec.ts | test/reducers/slides/actions/addPluginToCurrentSlide-spec.ts | import { expect } from 'chai';
import { ADD_PLUGIN_TO_CURRENT_SLIDE } from '../../../../app/constants/slides.constants';
export default function(initialState: any, reducer: any, slide: any) {
const plugin1 = 'plugin1';
describe('ADD_PLUGIN_TO_CURRENT_SLIDE', () => {
it('should add a new plugin to selected sli... | Add ADD_PLUGIN_TO_CURRENT_SLIDE spec for slides reducer | test: Add ADD_PLUGIN_TO_CURRENT_SLIDE spec for slides reducer
| TypeScript | mit | DevDecks/devdecks,chengsieuly/devdecks,chengsieuly/devdecks,Team-CHAD/DevDecks,DevDecks/devdecks,Team-CHAD/DevDecks,DevDecks/devdecks,Team-CHAD/DevDecks,chengsieuly/devdecks | ---
+++
@@ -0,0 +1,55 @@
+import { expect } from 'chai';
+import { ADD_PLUGIN_TO_CURRENT_SLIDE } from '../../../../app/constants/slides.constants';
+
+export default function(initialState: any, reducer: any, slide: any) {
+ const plugin1 = 'plugin1';
+
+ describe('ADD_PLUGIN_TO_CURRENT_SLIDE', () => {
+ it('shou... | |
5a9471e2204a1aca3ddecce67bf26995b97b2596 | src/angular-app/bellows/apps/changepassword/change-password-app.component.ts | src/angular-app/bellows/apps/changepassword/change-password-app.component.ts | import * as angular from 'angular';
import { UserService } from '../../core/api/user.service';
import { NoticeService } from '../../core/notice/notice.service';
import { SessionService } from '../../core/session.service';
export class ChangePasswordAppController implements angular.IController {
old_password: string... | import * as angular from 'angular';
import { UserService } from '../../core/api/user.service';
import { NoticeService } from '../../core/notice/notice.service';
import { SessionService } from '../../core/session.service';
export class ChangePasswordAppController implements angular.IController {
password: string;
... | Revert "Added new field to password change" | Revert "Added new field to password change"
This reverts commit 3664fab3e0f5155dc2c824894b715f98ede4159e.
| TypeScript | mit | sillsdev/web-scriptureforge,ermshiperete/web-languageforge,ermshiperete/web-languageforge,ermshiperete/web-languageforge,sillsdev/web-scriptureforge,sillsdev/web-scriptureforge,sillsdev/web-scriptureforge,ermshiperete/web-languageforge,ermshiperete/web-languageforge,ermshiperete/web-languageforge,sillsdev/web-scripture... | ---
+++
@@ -5,7 +5,6 @@
import { SessionService } from '../../core/session.service';
export class ChangePasswordAppController implements angular.IController {
- old_password: string;
password: string;
confirm_password: string;
|
773edddcf2a4060fe7b368ab0313ddbcea6f4305 | src/tsa.ts | src/tsa.ts | /// <reference path="../typings/main.d.ts" />
/// <reference path="../node_modules/typescript/lib/typescript.d.ts" />
var vorpal = require('vorpal')();
vorpal
.command('foo', 'Outputs "bar".')
.action(function(args, callback) {
this.log('bar');
callback();
});
vorpal
.show()
.parse(process.argv); | Use parse instead of just show | Use parse instead of just show
| TypeScript | mit | sandermvanvliet/tsa,sandermvanvliet/tsa | ---
+++
@@ -0,0 +1,15 @@
+/// <reference path="../typings/main.d.ts" />
+/// <reference path="../node_modules/typescript/lib/typescript.d.ts" />
+
+var vorpal = require('vorpal')();
+
+vorpal
+ .command('foo', 'Outputs "bar".')
+ .action(function(args, callback) {
+ this.log('bar');
+ callback();
+ });
+
+vo... | |
6756d3e3e21e5663a81e63ecb2b8f058ea1ae3ad | src/lib/ogs-rr6-shims.tsx | src/lib/ogs-rr6-shims.tsx | /*
* Copyright 2012-2022 Online-Go.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Add missing ogs rr6 shims | Add missing ogs rr6 shims
| TypeScript | agpl-3.0 | online-go/online-go.com,online-go/online-go.com,online-go/online-go.com,online-go/online-go.com,online-go/online-go.com | ---
+++
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2012-2022 Online-Go.com
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unles... | |
f5f183801b55d65fa20661f2c77b71d144083bbe | src/browser/vcs/dummies.ts | src/browser/vcs/dummies.ts | import * as path from 'path';
import { Dummy, TextDummy, TypesDummy } from '../../../test/helpers';
import { VcsFileChange, VcsFileChangeStatusTypes } from '../../core/vcs';
export class VcsFileChangeDummy implements Dummy<VcsFileChange> {
private filePath = new TextDummy('file');
private status = new TypesDu... | Add vcs file change dummy | Add vcs file change dummy
| TypeScript | mit | seokju-na/geeks-diary,seokju-na/geeks-diary,seokju-na/geeks-diary | ---
+++
@@ -0,0 +1,39 @@
+import * as path from 'path';
+import { Dummy, TextDummy, TypesDummy } from '../../../test/helpers';
+import { VcsFileChange, VcsFileChangeStatusTypes } from '../../core/vcs';
+
+
+export class VcsFileChangeDummy implements Dummy<VcsFileChange> {
+ private filePath = new TextDummy('file')... | |
f04db92629c50c8a88768591f46bbd5f23989448 | db/migration/1551319875625-DataValuesYearIndex.ts | db/migration/1551319875625-DataValuesYearIndex.ts | import {MigrationInterface, QueryRunner} from "typeorm";
export class DataValuesYearIndex1551319875625 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<any> {
await queryRunner.query("CREATE INDEX data_values_year ON data_values (year);")
}
public async down(quer... | Add index on year data_values | Add index on year data_values
| TypeScript | mit | owid/owid-grapher,owid/owid-grapher,OurWorldInData/owid-grapher,OurWorldInData/owid-grapher,OurWorldInData/owid-grapher,owid/owid-grapher,owid/owid-grapher,OurWorldInData/owid-grapher,OurWorldInData/owid-grapher,owid/owid-grapher | ---
+++
@@ -0,0 +1,12 @@
+import {MigrationInterface, QueryRunner} from "typeorm";
+
+export class DataValuesYearIndex1551319875625 implements MigrationInterface {
+
+ public async up(queryRunner: QueryRunner): Promise<any> {
+ await queryRunner.query("CREATE INDEX data_values_year ON data_values (year);")
... | |
563b8d29f43b406b8ab126d5ba16bf30df377eea | scripts/android/postlink.ts | scripts/android/postlink.ts | import { modifyManifest } from './modifyManifest';
export function postlinkAndroid() {
try {
modifyManifest();
} catch (e) {
console.warn('Failed to automatically update android manifest. Please continue manually');
}
}
| Refactor - split script into small modules | Refactor - split script into small modules
| TypeScript | mit | doomsower/react-native-vkontakte-login,doomsower/react-native-vkontakte-login,doomsower/react-native-vkontakte-login,doomsower/react-native-vkontakte-login | ---
+++
@@ -0,0 +1,9 @@
+import { modifyManifest } from './modifyManifest';
+
+export function postlinkAndroid() {
+ try {
+ modifyManifest();
+ } catch (e) {
+ console.warn('Failed to automatically update android manifest. Please continue manually');
+ }
+} | |
52d360a3f24387114b7e4be637aeabb10f0a9c72 | webpack/refresh_token.ts | webpack/refresh_token.ts | import axios from "axios";
import { API } from "./api/index";
import { AuthState } from "./auth/interfaces";
import { HttpData } from "./util";
import { setToken } from "./auth/actions";
/** Grab a new token from the API (won't extend token's exp. date).
* Redirect to home page on failure. */
export let maybeRefreshT... | import axios from "axios";
import { API } from "./api/index";
import { AuthState } from "./auth/interfaces";
import { HttpData, goHome } from "./util";
import { setToken } from "./auth/actions";
type Resp = HttpData<AuthState>;
/** What to do when the Token refresh request completes. */
const ok = (x: Resp) => {
se... | Reduce block nesting level. NEXT: Tests | Reduce block nesting level. NEXT: Tests
| TypeScript | mit | RickCarlino/farmbot-web-app,FarmBot/farmbot-web-app,gabrielburnworth/Farmbot-Web-App,FarmBot/Farmbot-Web-API,RickCarlino/farmbot-web-app,gabrielburnworth/Farmbot-Web-App,FarmBot/Farmbot-Web-API,FarmBot/Farmbot-Web-API,FarmBot/farmbot-web-app,RickCarlino/farmbot-web-app,RickCarlino/farmbot-web-app,gabrielburnworth/Farmb... | ---
+++
@@ -1,20 +1,21 @@
import axios from "axios";
import { API } from "./api/index";
import { AuthState } from "./auth/interfaces";
-import { HttpData } from "./util";
+import { HttpData, goHome } from "./util";
import { setToken } from "./auth/actions";
+
+type Resp = HttpData<AuthState>;
+
+/** What to do wh... |
2c771d515d2936909ac559f254234acd1cb35414 | ui/src/timeMachine/constants/queryBuilder.ts | ui/src/timeMachine/constants/queryBuilder.ts | import {WINDOW_PERIOD} from 'src/variables/constants'
export interface QueryFn {
name: string
flux: string
aggregate: boolean
}
export const FUNCTIONS: QueryFn[] = [
{name: 'mean', flux: `|> mean()`, aggregate: true},
{name: 'median', flux: '|> toFloat()\n |> median()', aggregate: true},
{name: 'max', fl... | import {WINDOW_PERIOD, OPTION_NAME} from 'src/variables/constants'
export interface QueryFn {
name: string
flux: string
aggregate: boolean
}
export const FUNCTIONS: QueryFn[] = [
{name: 'mean', flux: `|> mean()`, aggregate: true},
{name: 'median', flux: '|> toFloat()\n |> median()', aggregate: true},
{na... | Fix building queries with derivatives | Fix building queries with derivatives
| TypeScript | mit | mark-rushakoff/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,influxdata/influxdb,li-ang/influxdb,nooproblem/influxdb,li-ang/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,influxdb/influxdb,nooproblem/influxdb,influxdb/influxdb,influxdb/influxdb,ma... | ---
+++
@@ -1,4 +1,4 @@
-import {WINDOW_PERIOD} from 'src/variables/constants'
+import {WINDOW_PERIOD, OPTION_NAME} from 'src/variables/constants'
export interface QueryFn {
name: string
@@ -14,7 +14,7 @@
{name: 'sum', flux: '|> sum()', aggregate: true},
{
name: 'derivative',
- flux: `|> derivativ... |
9c27c88bdc91a95c21d18dea899b968d888adddd | CeraonUI/src/Store/CeraonDispatcher.ts | CeraonUI/src/Store/CeraonDispatcher.ts | import CeraonStore from './CeraonStore';
import CeraonAction from '../Actions/CeraonAction';
// Separate dispatch file to hide the rest of the actions that can be taken on CeraonStore
export default function dispatch(action: CeraonAction) {
CeraonStore.dispatch(action);
} | Add dispatcher to hide getState functions from consumers that only need to dispatch | Add dispatcher to hide getState functions from consumers that only need to dispatch
| TypeScript | bsd-3-clause | Rdbaker/Mealbound,Rdbaker/Mealbound,Rdbaker/Mealbound,Rdbaker/Mealbound,Rdbaker/Mealbound | ---
+++
@@ -0,0 +1,7 @@
+import CeraonStore from './CeraonStore';
+import CeraonAction from '../Actions/CeraonAction';
+
+// Separate dispatch file to hide the rest of the actions that can be taken on CeraonStore
+export default function dispatch(action: CeraonAction) {
+ CeraonStore.dispatch(action);
+} | |
ba7340ddbc8af893a3498271b0853bd7f7876305 | test/property-decorators/range.spec.ts | test/property-decorators/range.spec.ts | import { Range } from './../../src/';
describe('Range decorator', () => {
it('should throw an error when no annotations are provided', () => {
expect(() => {
class TestClassRangeValue {
@Range() // This will throw a TypeScript error (obviously)
myNumber: number... | Add unit tests for range decorator | Add unit tests for range decorator
| TypeScript | mit | semagarcia/typescript-decorators,semagarcia/typescript-decorators | ---
+++
@@ -0,0 +1,78 @@
+import { Range } from './../../src/';
+
+describe('Range decorator', () => {
+
+ it('should throw an error when no annotations are provided', () => {
+ expect(() => {
+ class TestClassRangeValue {
+ @Range() // This will throw a TypeScript error (obviousl... | |
6daee807ab903c6730dce84e172b934f3a48e4ca | types/emoji-mart/index.d.ts | types/emoji-mart/index.d.ts | // Type definitions for emoji-mart 2.8
// Project: https://github.com/missive/emoji-mart
// Definitions by: Diogo Franco <https://github.com/Kovensky>
// Nick Winans <https://github.com/Nicell>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.9
export * from '... | // Type definitions for emoji-mart 2.8
// Project: https://github.com/missive/emoji-mart
// Definitions by: Diogo Franco <https://github.com/Kovensky>
// Nick Winans <https://github.com/Nicell>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
export * from '... | Set TypeScript version back to 2.8 | Set TypeScript version back to 2.8
| TypeScript | mit | dsebastien/DefinitelyTyped,magny/DefinitelyTyped,mcliment/DefinitelyTyped,magny/DefinitelyTyped,AgentME/DefinitelyTyped,borisyankov/DefinitelyTyped,AgentME/DefinitelyTyped,AgentME/DefinitelyTyped,georgemarshall/DefinitelyTyped,georgemarshall/DefinitelyTyped,AgentME/DefinitelyTyped,dsebastien/DefinitelyTyped,markogresak... | ---
+++
@@ -3,6 +3,6 @@
// Definitions by: Diogo Franco <https://github.com/Kovensky>
// Nick Winans <https://github.com/Nicell>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-// TypeScript Version: 2.9
+// TypeScript Version: 2.8
export * from './dist-es'; |
9e7c61b5779ed9985955d62a838af34a17b08487 | server/src/SettingsCache.ts | server/src/SettingsCache.ts | import { TextDocument, WorkspaceFolder } from 'vscode-languageserver';
export type RubyEnvironment = {
PATH: string;
RUBY_VERSION: string;
RUBY_ROOT: string;
GEM_HOME: string;
GEM_PATH: string;
GEM_ROOT: string;
};
export interface RubyConfiguration {}
class SettingsCache<P extends WorkspaceFolder | TextDocume... | Add generic SettingCache for caching configuration and environments | Add generic SettingCache for caching configuration and environments
| TypeScript | mit | rubyide/vscode-ruby,rubyide/vscode-ruby,rubyide/vscode-ruby,rubyide/vscode-ruby,rubyide/vscode-ruby | ---
+++
@@ -0,0 +1,78 @@
+import { TextDocument, WorkspaceFolder } from 'vscode-languageserver';
+
+export type RubyEnvironment = {
+ PATH: string;
+ RUBY_VERSION: string;
+ RUBY_ROOT: string;
+ GEM_HOME: string;
+ GEM_PATH: string;
+ GEM_ROOT: string;
+};
+
+export interface RubyConfiguration {}
+
+class SettingsCac... | |
95e97642971ee4b6c5189c41958599f23dcfc175 | javascript/signature/subtle/index.ts | javascript/signature/subtle/index.ts | export {default as EcdsaSign} from 'goog:tink.subtle.EcdsaSign'; // from //third_party/tink/javascript/subtle:signature
export {EcdsaSignatureEncodingType, exportCryptoKey, generateKeyPair, importPrivateKey, importPublicKey} from 'goog:tink.subtle.EllipticCurves'; // from //third_party/tink/javascript/subtle
| Create new TypeScript import paths for signature/subtle | Create new TypeScript import paths for signature/subtle
This is part of the ongoing TypeScript migration efforts. It was omitted from the first round due to open questions about how to handle it.
This change just addresses the import paths; there may be more changes later.
PiperOrigin-RevId: 303225203
| TypeScript | apache-2.0 | google/tink,google/tink,google/tink,google/tink,google/tink,google/tink,google/tink,google/tink | ---
+++
@@ -0,0 +1,2 @@
+export {default as EcdsaSign} from 'goog:tink.subtle.EcdsaSign'; // from //third_party/tink/javascript/subtle:signature
+export {EcdsaSignatureEncodingType, exportCryptoKey, generateKeyPair, importPrivateKey, importPublicKey} from 'goog:tink.subtle.EllipticCurves'; // from //third_party/tin... | |
e9b2da97d237776e2879c33038cd16849a7727d5 | src/constants/google-play.ts | src/constants/google-play.ts | export const GooglePlayConstants = {
PLAY_STORE_ROOT_WEB: `https://play.google.com/store/apps/details?hl=en&id=`,
PLAY_STORE_PACKAGE_NOT_PUBLISHED_IDENTIFIER: `
We're sorry, the requested URL was not found on this server.
`,
VERSION_REGEX: /itemprop="softwareVersion">\s*([0-9.]*)\s*<\/div>\s*<\/div>/gm,
D... | Create google play related constants | Create google play related constants
| TypeScript | apache-2.0 | chronogolf/nativescript-store-update,chronogolf/nativescript-store-update,chronogolf/nativescript-store-update,chronogolf/nativescript-store-update | ---
+++
@@ -0,0 +1,8 @@
+export const GooglePlayConstants = {
+ PLAY_STORE_ROOT_WEB: `https://play.google.com/store/apps/details?hl=en&id=`,
+ PLAY_STORE_PACKAGE_NOT_PUBLISHED_IDENTIFIER: `
+ We're sorry, the requested URL was not found on this server.
+ `,
+ VERSION_REGEX: /itemprop="softwareVersion">\s*([0-9... | |
1a84384b3a464e162783745a7c9e0d7350a67ae0 | tests/test_basic_classes.ts | tests/test_basic_classes.ts | import eventtypes = require('../lib/epcisevents');
var assert = require('assert');
describe('Basic class functionality', () => {
it('check the epcClass parser in the Quantity class', (done) => {
var quantity = new eventtypes.EPCIS.Quantity();
quantity.setEpcClass('urn:epc:idpat:sgtin:myidentifier');
... | Add test for Quantity class | Add test for Quantity class
| TypeScript | mit | matgnt/epcis-js,matgnt/epcis-js | ---
+++
@@ -0,0 +1,20 @@
+import eventtypes = require('../lib/epcisevents');
+var assert = require('assert');
+
+describe('Basic class functionality', () => {
+
+ it('check the epcClass parser in the Quantity class', (done) => {
+ var quantity = new eventtypes.EPCIS.Quantity();
+
+ quantity.setEpcClass('ur... | |
28ef2fe2da17c644ee8991fba5b917a7418f7c5f | app/test/unit/enum-test.ts | app/test/unit/enum-test.ts | import { parseEnumValue } from '../../src/lib/enum'
enum TestEnum {
Foo = 'foo',
Bar = 'bar is the thing',
}
describe('parseEnumValue', () => {
it('parses an enum type from a string', () => {
expect(parseEnumValue(TestEnum, 'foo')).toBe(TestEnum.Foo)
expect(parseEnumValue(TestEnum, TestEnum.Foo)).toBe(T... | Add some tests forr good measure | Add some tests forr good measure
| TypeScript | mit | shiftkey/desktop,desktop/desktop,kactus-io/kactus,kactus-io/kactus,shiftkey/desktop,kactus-io/kactus,desktop/desktop,say25/desktop,desktop/desktop,say25/desktop,shiftkey/desktop,shiftkey/desktop,desktop/desktop,kactus-io/kactus,say25/desktop,say25/desktop,artivilla/desktop,artivilla/desktop,j-f1/forked-desktop,j-f1/for... | ---
+++
@@ -0,0 +1,33 @@
+import { parseEnumValue } from '../../src/lib/enum'
+
+enum TestEnum {
+ Foo = 'foo',
+ Bar = 'bar is the thing',
+}
+
+describe('parseEnumValue', () => {
+ it('parses an enum type from a string', () => {
+ expect(parseEnumValue(TestEnum, 'foo')).toBe(TestEnum.Foo)
+ expect(parseEnu... | |
a4be682d87b359713fe7f4f9fadeece6ed132ee0 | src/Test/Ast/Config/Table.ts | src/Test/Ast/Config/Table.ts | import { expect } from 'chai'
import Up from '../../../index'
import { DocumentNode } from '../../../SyntaxNodes/DocumentNode'
import { TableNode } from '../../../SyntaxNodes/TableNode'
import { PlainTextNode } from '../../../SyntaxNodes/PlainTextNode'
describe('The term that represents table conventions', () => {
... | Add 2 passing table config tests | Add 2 passing table config tests
| TypeScript | mit | start/up,start/up | ---
+++
@@ -0,0 +1,59 @@
+import { expect } from 'chai'
+import Up from '../../../index'
+import { DocumentNode } from '../../../SyntaxNodes/DocumentNode'
+import { TableNode } from '../../../SyntaxNodes/TableNode'
+import { PlainTextNode } from '../../../SyntaxNodes/PlainTextNode'
+
+
+describe('The term that repres... | |
b6aff98fd7fbb78532de718ff561f26fb7c43c61 | tests/cases/compiler/contravariantInferenceAndTypeGuard.ts | tests/cases/compiler/contravariantInferenceAndTypeGuard.ts | // @strict: true
interface ListItem<TData> {
prev: ListItem<TData> | null;
next: ListItem<TData> | null;
data: TData;
}
type IteratorFn<TData, TResult, TContext = List<TData>> = (this: TContext, item: TData, node: ListItem<TData>, list: List<TData>) => TResult;
type FilterFn<TData, TResult extends TD... | Add test relating type predicates with and without this parameters | Add test relating type predicates with and without this parameters
| TypeScript | apache-2.0 | kpreisser/TypeScript,weswigham/TypeScript,SaschaNaz/TypeScript,microsoft/TypeScript,nojvek/TypeScript,minestarks/TypeScript,nojvek/TypeScript,alexeagle/TypeScript,weswigham/TypeScript,SaschaNaz/TypeScript,minestarks/TypeScript,nojvek/TypeScript,kpreisser/TypeScript,alexeagle/TypeScript,RyanCavanaugh/TypeScript,SaschaNa... | ---
+++
@@ -0,0 +1,27 @@
+// @strict: true
+interface ListItem<TData> {
+ prev: ListItem<TData> | null;
+ next: ListItem<TData> | null;
+ data: TData;
+}
+type IteratorFn<TData, TResult, TContext = List<TData>> = (this: TContext, item: TData, node: ListItem<TData>, list: List<TData>) => TResult;
+type Filter... | |
481a101e6a230f5cb91c3a1b74d24661597d9a6f | src/lib/batcher.ts | src/lib/batcher.ts | /*
* Copyright (C) 2012-2017 Online-Go.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This pr... | Introduce a new Batcher class for batching up multiple operations. | Introduce a new Batcher class for batching up multiple operations.
| TypeScript | agpl-3.0 | lemurek/online-go.com,BarneyStratford/online-go.com,lemurek/online-go.com,online-go/online-go.com,online-go/online-go.com,lemurek/online-go.com,online-go/online-go.com,BarneyStratford/online-go.com,online-go/online-go.com,online-go/online-go.com,BarneyStratford/online-go.com,lemurek/online-go.com,BarneyStratford/online... | ---
+++
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2012-2017 Online-Go.com
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.