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 |
|---|---|---|---|---|---|---|---|---|---|---|
c220163f372e2320eb8b00c5e473dd42e69b9bbb | tools/tasks/seed/css-lint.ts | tools/tasks/seed/css-lint.ts | import * as gulp from 'gulp';
import * as gulpLoadPlugins from 'gulp-load-plugins';
import * as merge from 'merge-stream';
import * as reporter from 'postcss-reporter';
import * as stylelint from 'stylelint';
import * as doiuse from 'doiuse';
import * as colorguard from 'colorguard';
import {join} from 'path';
import {... | import * as gulp from 'gulp';
import * as gulpLoadPlugins from 'gulp-load-plugins';
import * as merge from 'merge-stream';
import * as reporter from 'postcss-reporter';
import * as stylelint from 'stylelint';
import * as doiuse from 'doiuse';
import * as colorguard from 'colorguard';
import {join} from 'path';
import {... | Use ASSET_SRC parameter from SeedConfig instead of reconstructing it | Fix(tools): Use ASSET_SRC parameter from SeedConfig instead of reconstructing it
| TypeScript | mit | davewragg/agot-spa,fr-esco/angular-seed,alexmanning23/uafl-web,rtang03/fabric-seed,liuy97/angular2-material-seed,ysyun/angular-seed-stub-api-environment,suigezi/angular2-seed,nie-ine/raeber-website,jelgar1/fpl-api,osulp/oe-ng2-seed,MgCoders/angular-seed,NathanWalker/angular-seed-advanced,maniche04/ngIntranet,dspies/boo... | ---
+++
@@ -6,7 +6,7 @@
import * as doiuse from 'doiuse';
import * as colorguard from 'colorguard';
import {join} from 'path';
-import {APP_SRC, APP_ASSETS, BROWSER_LIST, ENV} from '../../config';
+import {APP_SRC, APP_ASSETS, ASSETS_SRC, BROWSER_LIST, ENV} from '../../config';
const plugins = <any>gulpLoadPlugin... |
9a4bd65b7e6e84a079493f47192ec07406e63a3f | src/app/home/login/login.component.stories.ts | src/app/home/login/login.component.stories.ts | import { of, throwError } from 'rxjs';
import { NgModule } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { storiesOf } from '@storybook/angular';
import { UserService } from '../../services/user.service';
import { LoginComponent } from './login.component';
const mockUserServi... | Add story for login form | Add story for login form
| TypeScript | apache-2.0 | jbrowneuk/jblog,jbrowneuk/jblog,jbrowneuk/jblog,jbrowneuk/jblog | ---
+++
@@ -0,0 +1,33 @@
+import { of, throwError } from 'rxjs';
+
+import { NgModule } from '@angular/core';
+import { ActivatedRoute, Router } from '@angular/router';
+import { storiesOf } from '@storybook/angular';
+
+import { UserService } from '../../services/user.service';
+import { LoginComponent } from './log... | |
2a850abace3d4e411ced4c0d588e5f3c48c1708e | src/components/SearchBar/TimeNextSearch.tsx | src/components/SearchBar/TimeNextSearch.tsx | import * as React from 'react';
import { connect } from 'react-redux';
import { RootState } from '../../types';
import { Caption } from '@shopify/polaris';
interface Props {
readonly timeNextSearch: Date | null;
}
interface State {
readonly timeUntilNextSearch: number | null;
}
const mapState = (state: RootState... | Add component to display the time until the next scheduled search. | Add component to display the time until the next scheduled search.
| TypeScript | mit | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | ---
+++
@@ -0,0 +1,62 @@
+import * as React from 'react';
+import { connect } from 'react-redux';
+import { RootState } from '../../types';
+import { Caption } from '@shopify/polaris';
+
+interface Props {
+ readonly timeNextSearch: Date | null;
+}
+
+interface State {
+ readonly timeUntilNextSearch: number | null;... | |
89488f83171a0eb9118e825b86410cab88dca4c6 | tests/cases/fourslash/navigationBarJsDoc.ts | tests/cases/fourslash/navigationBarJsDoc.ts | /// <reference path="fourslash.ts"/>
// @Filename: foo.js
/////** @typedef {(number|string)} NumberLike */
/////** @typedef {(string|number)} */
////const x = 0;
verify.navigationBar([
{
"text": "NumberLike",
"kind": "type"
},
{
"text": "x",
"kind": "type"
},
{
"text": "... | Add test for jsdoc in navigation bar | Add test for jsdoc in navigation bar
| TypeScript | apache-2.0 | basarat/TypeScript,vilic/TypeScript,TukekeSoft/TypeScript,kpreisser/TypeScript,donaldpipowitch/TypeScript,erikmcc/TypeScript,Eyas/TypeScript,vilic/TypeScript,SaschaNaz/TypeScript,basarat/TypeScript,jeremyepling/TypeScript,mihailik/TypeScript,mihailik/TypeScript,Microsoft/TypeScript,kpreisser/TypeScript,nojvek/TypeScrip... | ---
+++
@@ -0,0 +1,21 @@
+/// <reference path="fourslash.ts"/>
+
+// @Filename: foo.js
+/////** @typedef {(number|string)} NumberLike */
+/////** @typedef {(string|number)} */
+////const x = 0;
+
+verify.navigationBar([
+ {
+ "text": "NumberLike",
+ "kind": "type"
+ },
+ {
+ "text": "x",
+ "kind": "typ... | |
d73b3126c003dbf63dd4e60525cf55a34effe9db | ui/src/shared/components/TemplateDrawer.tsx | ui/src/shared/components/TemplateDrawer.tsx | import React, {SFC, MouseEvent} from 'react'
import OnClickOutside from 'react-onclickoutside'
import classnames from 'classnames'
import {Template} from 'src/types'
interface Props {
templates: Template[]
selected: Template
onMouseOverTempVar: (
template: Template
) => (e: MouseEvent<HTMLDivElement>) => ... | import React, {SFC, MouseEvent} from 'react'
import OnClickOutside from 'react-onclickoutside'
import classnames from 'classnames'
import {Template} from 'src/types'
interface Props {
templates: Template[]
selected: Template
onMouseOverTempVar: (
template: Template
) => (e: MouseEvent<HTMLDivElement>) => ... | Call onClickTempvar on mouseDown instead of MouseOver | Call onClickTempvar on mouseDown instead of MouseOver
| TypeScript | mit | nooproblem/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,influxdata/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,influxdb/influxdb,li-ang/influxdb,influxdb/influxdb,influxdb/influxdb,nooproblem/influxdb,nooproblem/influxdb,influxdb/influxdb,influxdb/influxdb,mark-rushakoff/inf... | ---
+++
@@ -27,7 +27,7 @@
'template-drawer--selected': t.tempVar === selected.tempVar,
})}
onMouseOver={onMouseOverTempVar(t)}
- onClick={onClickTempVar(t)}
+ onMouseDown={onClickTempVar(t)}
key={t.tempVar}
>
{' '} |
5d5c99b4e618965f1fdc1113ac50983a1b0d665e | client/src/asPromise.ts | client/src/asPromise.ts |
export function asPromise<T, A>(fn: (a: A, cb: (err: Error, data: T) => any) => any): (a: A) => Promise<T>;
export function asPromise<T, A, B>(fn: (a: A, b: B, cb: (err: Error, data: T) => any) => any): (a: A, b: B) => Promise<T>;
export function asPromise<T, A, B, C>(fn: (a: A, b: B, c: C, cb: (err: Error, data: T)... | Make converting node 4 calls to promises easier. | Make converting node 4 calls to promises easier.
| 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,20 @@
+
+
+
+export function asPromise<T, A>(fn: (a: A, cb: (err: Error, data: T) => any) => any): (a: A) => Promise<T>;
+export function asPromise<T, A, B>(fn: (a: A, b: B, cb: (err: Error, data: T) => any) => any): (a: A, b: B) => Promise<T>;
+export function asPromise<T, A, B, C>(fn: (a: A, b: B... | |
4897de1318acac29d974cb0015528373d8b63188 | src/Test/Html/InlineDocument.ts | src/Test/Html/InlineDocument.ts | import { expect } from 'chai'
import Up from '../../index'
import { InlineUpDocument } from '../../SyntaxNodes/InlineUpDocument'
describe('An empty inline document', () => {
it('does not produce any HTML on its own', () => {
expect(Up.toInlineHtml(new InlineUpDocument([]))).to.be.eql('')
})
})
| Add passing inline document HTML test | Add passing inline document HTML test
| TypeScript | mit | start/up,start/up | ---
+++
@@ -0,0 +1,10 @@
+import { expect } from 'chai'
+import Up from '../../index'
+import { InlineUpDocument } from '../../SyntaxNodes/InlineUpDocument'
+
+
+describe('An empty inline document', () => {
+ it('does not produce any HTML on its own', () => {
+ expect(Up.toInlineHtml(new InlineUpDocument([]))).to... | |
91895dee9cb5bfa3b6d262ea9c2522c24c55df9e | ui/src/data_explorer/components/VisHeader.tsx | ui/src/data_explorer/components/VisHeader.tsx | import React, {PureComponent} from 'react'
import {getDataForCSV} from 'src/data_explorer/apis'
import VisHeaderTabs from 'src/data_explorer/components/VisHeaderTabs'
import {OnToggleView} from 'src/data_explorer/components/VisHeaderTab'
import {Source} from 'src/types'
interface Props {
source: Source
views: stri... | import React, {PureComponent} from 'react'
import {getDataForCSV} from 'src/data_explorer/apis'
import RadioButtons, {
RadioButton,
} from 'src/reusable_ui/components/radio_buttons/RadioButtons'
import {OnToggleView} from 'src/data_explorer/components/VisHeaderTab'
import {Source} from 'src/types'
interface Props {
... | Replace DE viz tabs with RadioButtons component | Replace DE viz tabs with RadioButtons component
| TypeScript | mit | influxdb/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,influxdata/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,li-ang/influxdb,influxdata/influxdb,influxdb/influxdb,nooproblem/influxdb,nooproblem/influxdb,influxdb/influxdb,li-ang/influxdb,influxdb/influxdb,mark-r... | ---
+++
@@ -1,6 +1,8 @@
import React, {PureComponent} from 'react'
import {getDataForCSV} from 'src/data_explorer/apis'
-import VisHeaderTabs from 'src/data_explorer/components/VisHeaderTabs'
+import RadioButtons, {
+ RadioButton,
+} from 'src/reusable_ui/components/radio_buttons/RadioButtons'
import {OnToggleVie... |
a60a101ea662409b32ed3f74b5ea4c96d2879ee4 | vpatch.ts | vpatch.ts | /**
* VPatch: the core type indicating changes between two VTrees.
*/
import VTree = require('vtree');
/**
* Patches come in several flavors denoting the behavior of the
* action of this patch on a VTree.
*/
export const enum Flavor {
None,
VText,
VNode,
Widget,
Props,
Order,
Insert,
Remove,... | Introduce the basic patch types. | Introduce the basic patch types.
| TypeScript | mit | tel/typescript-vdom | ---
+++
@@ -0,0 +1,36 @@
+/**
+ * VPatch: the core type indicating changes between two VTrees.
+ */
+
+import VTree = require('vtree');
+
+/**
+ * Patches come in several flavors denoting the behavior of the
+ * action of this patch on a VTree.
+ */
+export const enum Flavor {
+ None,
+ VText,
+ VNode,
+ Wid... | |
09fd55a41a8b67d5b8eece5e77879d58ef18eba4 | lib/services/nativescript-cloud-extension-service.ts | lib/services/nativescript-cloud-extension-service.ts | import * as constants from "../constants";
export class NativescriptCloudExtensionService implements INativescriptCloudExtensionService {
constructor(private $extensibilityService: IExtensibilityService,
private $logger: ILogger) { }
public install(): Promise<IExtensionData> {
const installedExtensions = this.... | import * as constants from "../constants";
export class NativescriptCloudExtensionService implements INativescriptCloudExtensionService {
constructor(private $extensibilityService: IExtensibilityService,
private $logger: ILogger) { }
public install(): Promise<IExtensionData> {
const installedExtensions = this.... | Fix cannot read `nativescript-cloud` of undefined error | Fix cannot read `nativescript-cloud` of undefined error
| TypeScript | apache-2.0 | NathanaelA/nativescript-cli,NathanaelA/nativescript-cli,NativeScript/nativescript-cli,NativeScript/nativescript-cli,NativeScript/nativescript-cli,NativeScript/nativescript-cli,NathanaelA/nativescript-cli,NathanaelA/nativescript-cli | ---
+++
@@ -6,7 +6,7 @@
private $logger: ILogger) { }
public install(): Promise<IExtensionData> {
- const installedExtensions = this.$extensibilityService.getInstalledExtensions();
+ const installedExtensions = this.$extensibilityService.getInstalledExtensions() || {};
if (!installedExtensions[constants.N... |
90a6117709aa6f8320c8e24287852879d631e582 | front_end/src/app/setup/setup.component.spec.ts | front_end/src/app/setup/setup.component.spec.ts | import { SetupComponent } from './setup.component';
import { Observable } from 'rxjs/Observable';
let fixture: SetupComponent;
let routerStub: any = {
navigate(): void {
}
};
let setupServiceStup: any = {
getChildrenByPhoneNumber() {
return Observable.of([1, 2, 3]);
}
};
let rootServiceStub: any = {
a... | Add test around setup component's reset method. | Add test around setup component's reset method.
| TypeScript | bsd-2-clause | crdschurch/crds-signin-checkin,crdschurch/crds-signin-checkin,crdschurch/crds-signin-checkin,crdschurch/crds-signin-checkin | ---
+++
@@ -0,0 +1,43 @@
+import { SetupComponent } from './setup.component';
+import { Observable } from 'rxjs/Observable';
+
+let fixture: SetupComponent;
+
+let routerStub: any = {
+ navigate(): void {
+ }
+};
+
+let setupServiceStup: any = {
+ getChildrenByPhoneNumber() {
+ return Observable.of([1, 2, 3]);
... | |
6f4372c2d950bdcaa83ebda070c3c0a92a13d7f6 | app/test/unit/promise-test.ts | app/test/unit/promise-test.ts | import { timeout, sleep } from '../../src/lib/promise'
jest.useFakeTimers()
describe('timeout', () => {
it('falls back to the fallback value if promise takes too long', async () => {
const promise = timeout(sleep(1000).then(() => 'foo'), 500, 'bar')
jest.advanceTimersByTime(500)
expect(await promise).to... | Add some smoke tests for timeout() | Add some smoke tests for timeout()
Co-Authored-By: Rafael Oleza <2cf5b502deae2e387c60721eb8244c243cb5c4e1@users.noreply.github.com>
| TypeScript | mit | artivilla/desktop,kactus-io/kactus,shiftkey/desktop,artivilla/desktop,desktop/desktop,j-f1/forked-desktop,say25/desktop,artivilla/desktop,j-f1/forked-desktop,shiftkey/desktop,desktop/desktop,shiftkey/desktop,say25/desktop,j-f1/forked-desktop,artivilla/desktop,desktop/desktop,say25/desktop,desktop/desktop,shiftkey/deskt... | ---
+++
@@ -0,0 +1,17 @@
+import { timeout, sleep } from '../../src/lib/promise'
+
+jest.useFakeTimers()
+
+describe('timeout', () => {
+ it('falls back to the fallback value if promise takes too long', async () => {
+ const promise = timeout(sleep(1000).then(() => 'foo'), 500, 'bar')
+ jest.advanceTimersByTim... | |
39528878995e8baef3e3d4797a4a48078d1939d3 | app/javascript/components/Pagination/Pagination.stories.tsx | app/javascript/components/Pagination/Pagination.stories.tsx | import React from 'react'
import type { Story } from '@storybook/react'
import Pagination from './'
export default {
title: 'components/Pagination',
component: Pagination,
decorators: [
(Story: Story) => (
<div style={{ padding: '2rem' }}>
<Story />
</div>
)
]
}
export const Defau... | Add Pagination component to storybook | Add Pagination component to storybook
| TypeScript | agpl-3.0 | skyderby/skyderby,skyderby/skyderby,skyderby/skyderby,skyderby/skyderby,skyderby/skyderby | ---
+++
@@ -0,0 +1,20 @@
+import React from 'react'
+import type { Story } from '@storybook/react'
+
+import Pagination from './'
+
+export default {
+ title: 'components/Pagination',
+ component: Pagination,
+ decorators: [
+ (Story: Story) => (
+ <div style={{ padding: '2rem' }}>
+ <Story />
+ ... | |
04bc2e9995b417fd66530d1def93c7e068fbdd81 | src/components/geo-map/geo-map.component.spec.ts | src/components/geo-map/geo-map.component.spec.ts | import { ComponentFixture, TestBed } from '@angular/core/testing';
import { GeoMapComponent } from './geo-map.component';
import { GeoMapD3 } from '../../d3/geo-map.d3';
describe('GeoMapComponent', () => {
let fixture: ComponentFixture<GeoMapComponent>;
let component: GeoMapComponent;
let geoMapD3: GeoMapD3;
... | Add tests for geo map component | Add tests for geo map component
| TypeScript | apache-2.0 | googleinterns/guide-doge,googleinterns/guide-doge,googleinterns/guide-doge | ---
+++
@@ -0,0 +1,36 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+import { GeoMapComponent } from './geo-map.component';
+import { GeoMapD3 } from '../../d3/geo-map.d3';
+
+describe('GeoMapComponent', () => {
+ let fixture: ComponentFixture<GeoMapComponent>;
+ let component: GeoMapCompon... | |
fbe4e89077f57b73f76641132098832835f64879 | app/test/unit/onboarding-tutorial-test.ts | app/test/unit/onboarding-tutorial-test.ts | import { setupOnboardingTutorialRepo } from '../helpers/repositories'
describe('OnboardingTutorial', () => {
describe('isEditorInstalled()', () => {
it('returns true if step has been skipped', async () => {
const repo = await setupOnboardingTutorialRepo()
})
it('returns true if resolved editor exi... | Add some basic structure for OnboardingTutorial test | Add some basic structure for OnboardingTutorial test
| TypeScript | mit | artivilla/desktop,artivilla/desktop,shiftkey/desktop,j-f1/forked-desktop,kactus-io/kactus,shiftkey/desktop,desktop/desktop,shiftkey/desktop,kactus-io/kactus,j-f1/forked-desktop,desktop/desktop,say25/desktop,desktop/desktop,j-f1/forked-desktop,shiftkey/desktop,kactus-io/kactus,desktop/desktop,artivilla/desktop,say25/des... | ---
+++
@@ -0,0 +1,11 @@
+import { setupOnboardingTutorialRepo } from '../helpers/repositories'
+
+describe('OnboardingTutorial', () => {
+ describe('isEditorInstalled()', () => {
+ it('returns true if step has been skipped', async () => {
+ const repo = await setupOnboardingTutorialRepo()
+ })
+
+ it(... | |
69663a63140981655d282871c76c515aa5a6d938 | server/routes/passport.ts | server/routes/passport.ts | ///<reference path="../../typings/globals/passport/index.d.ts"/>
///<reference path="../../typings/globals/passport-local/index.d.ts"/>
///<reference path="../../typings/globals/bcryptjs/index.d.ts"/>
///<reference path="../../typings/globals/mysql/index.d.ts"/>
///<reference path="../../typings/globals/connect-flash/i... | Add login functionality with Passport JS | Add login functionality with Passport JS
| TypeScript | mit | shavindraSN/examen,shavindraSN/examen,shavindraSN/examen | ---
+++
@@ -0,0 +1,88 @@
+///<reference path="../../typings/globals/passport/index.d.ts"/>
+///<reference path="../../typings/globals/passport-local/index.d.ts"/>
+///<reference path="../../typings/globals/bcryptjs/index.d.ts"/>
+///<reference path="../../typings/globals/mysql/index.d.ts"/>
+///<reference path="../..... | |
f87a85522495a367fda7021172a5c03b211284bb | src/test/components/ng-http-loader.component.on-push.spec.ts | src/test/components/ng-http-loader.component.on-push.spec.ts | /*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,... | Add test with ChangeDetectionStrategy.OnPush on an host component | Add test with ChangeDetectionStrategy.OnPush on an host component
| TypeScript | mit | mpalourdio/ng-http-loader,mpalourdio/ng-http-loader,mpalourdio/ng-http-loader | ---
+++
@@ -0,0 +1,62 @@
+/*
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CL... | |
7c39eaae7e7bd3410a02dd0dec3336429fa36bea | src/Test/Ast/Dash.ts | src/Test/Ast/Dash.ts | import { expect } from 'chai'
import Up from '../../index'
import { insideDocumentAndParagraph } from './Helpers'
import { PlainTextNode } from '../../SyntaxNodes/PlainTextNode'
context('2 consecutive dashes normally produce an en dash.', () => {
specify('This applies in regular text', () => {
expect(Up.toAst("... | Add 2 passing and 1 failing en dash test | Add 2 passing and 1 failing en dash test
| TypeScript | mit | start/up,start/up | ---
+++
@@ -0,0 +1,31 @@
+import { expect } from 'chai'
+import Up from '../../index'
+import { insideDocumentAndParagraph } from './Helpers'
+import { PlainTextNode } from '../../SyntaxNodes/PlainTextNode'
+
+
+context('2 consecutive dashes normally produce an en dash.', () => {
+ specify('This applies in regular t... | |
9297ece17633e28fa2bb97dc1f44d2df3958cd8d | src/test/javascript/e2e/entities/oauth-client.spec.ts | src/test/javascript/e2e/entities/oauth-client.spec.ts | import { browser, element, by, $ } from 'protractor';
describe('Project e2e test', () => {
const username = element(by.id('username'));
const password = element(by.id('password'));
const adminMenu = element(by.id('admin-menu'));
const accountMenu = element(by.id('account-menu'));
const login = ele... | Add e2e test for oauth-client component | Add e2e test for oauth-client component
| TypeScript | apache-2.0 | RADAR-CNS/ManagementPortal,RADAR-CNS/ManagementPortal,RADAR-CNS/ManagementPortal,RADAR-CNS/ManagementPortal,RADAR-CNS/ManagementPortal | ---
+++
@@ -0,0 +1,56 @@
+import { browser, element, by, $ } from 'protractor';
+
+describe('Project e2e test', () => {
+
+ const username = element(by.id('username'));
+ const password = element(by.id('password'));
+ const adminMenu = element(by.id('admin-menu'));
+ const accountMenu = element(by.id('acc... | |
c8fe5a5b94139f9998d1da856e791cb80fa1b6e6 | tests/pos/misc/func-arg.ts | tests/pos/misc/func-arg.ts | // "Fatal error: exception Parsing.Parse_error"
/*@ foo :: (func:number) => number */
function foo(func:number) {
return func
}
// SAFE
/*@ bar :: (xunc:number) => number */
function bar(xunc:number) {
return xunc
}
| Add test for argument named 'func' | Add test for argument named 'func'
| TypeScript | bsd-3-clause | UCSD-PL/RefScript,UCSD-PL/RefScript,UCSD-PL/RefScript | ---
+++
@@ -0,0 +1,11 @@
+// "Fatal error: exception Parsing.Parse_error"
+/*@ foo :: (func:number) => number */
+function foo(func:number) {
+ return func
+}
+
+// SAFE
+/*@ bar :: (xunc:number) => number */
+function bar(xunc:number) {
+ return xunc
+} | |
63211a477b67d9ffbcf62613dc2ab7a41e14130a | types/react-radio-group/react-radio-group-tests.tsx | types/react-radio-group/react-radio-group-tests.tsx | import * as React from 'react';
import { Radio, RadioGroup } from "react-radio-group";
class ReactRadioGroup extends React.Component<RadioGroup.RadioGroupProps> {
handleChange: RadioGroup.RadioGroupProps['onChange'] = value => {
console.log(value);
}
render() {
return (
<div>
... | import * as React from 'react';
import { Radio, RadioGroup } from "react-radio-group";
class ReactRadioGroup extends React.Component<RadioGroup.RadioGroupProps, { selectedValue: React.InputHTMLAttributes<HTMLInputElement>['value'] }> {
state = {
selectedValue: 2,
};
handleChange: RadioGroup.RadioG... | Update test to set state on change | Update test to set state on change
| TypeScript | mit | dsebastien/DefinitelyTyped,AgentME/DefinitelyTyped,georgemarshall/DefinitelyTyped,borisyankov/DefinitelyTyped,AgentME/DefinitelyTyped,markogresak/DefinitelyTyped,dsebastien/DefinitelyTyped,rolandzwaga/DefinitelyTyped,georgemarshall/DefinitelyTyped,AgentME/DefinitelyTyped,AgentME/DefinitelyTyped,magny/DefinitelyTyped,ma... | ---
+++
@@ -1,15 +1,20 @@
import * as React from 'react';
import { Radio, RadioGroup } from "react-radio-group";
-class ReactRadioGroup extends React.Component<RadioGroup.RadioGroupProps> {
- handleChange: RadioGroup.RadioGroupProps['onChange'] = value => {
- console.log(value);
+class ReactRadioGroup e... |
aa247ba4458c734a77209630e303a140f5cf1594 | src/app/home/home.spec.ts | src/app/home/home.spec.ts | import {
beforeEachProviders,
describe,
expect,
it,
inject,
} from '@angular/core/testing';
import { Inject, Injector } from '@angular/core/index';
import { Component, Injectable } from '@angular/core';
import { TestComponentBuilder } from '@angular/compiler/testing';
import { HomeComponent } from './home.com... | Reduce scope of home component unit tests. | Reduce scope of home component unit tests.
| TypeScript | mit | coshx/portfolio_optimizer,coshx/portfolio_optimizer,coshx/portfolio_optimizer,coshx/portfolio_optimizer | ---
+++
@@ -0,0 +1,62 @@
+import {
+ beforeEachProviders,
+ describe,
+ expect,
+ it,
+ inject,
+} from '@angular/core/testing';
+import { Inject, Injector } from '@angular/core/index';
+import { Component, Injectable } from '@angular/core';
+import { TestComponentBuilder } from '@angular/compiler/testing';
+imp... | |
c9167df45d9563d817e9d8d5be580e0ab0c682a7 | spec/mobilev3playerapi.spec.ts | spec/mobilev3playerapi.spec.ts | import { PlayerAPI } from 'bitmovin-player';
import { isMobileV3PlayerAPI, MobileV3PlayerAPI, MobileV3PlayerEvent } from '../src/ts/mobilev3playerapi';
import { PlayerWrapper } from '../src/ts/uimanager';
describe('isMobileV3PlayerAPI', () => {
const playerApi = { exports: { PlayerEvent: { } } } as PlayerAPI;
cons... | Add unit tests for isMobileV3PlayerAPI | Add unit tests for isMobileV3PlayerAPI
| TypeScript | mit | bitmovin/bitmovin-player-ui,bitmovin/bitmovin-player-ui,bitmovin/bitmovin-player-ui,bitmovin/bitmovin-player-ui | ---
+++
@@ -0,0 +1,26 @@
+import { PlayerAPI } from 'bitmovin-player';
+import { isMobileV3PlayerAPI, MobileV3PlayerAPI, MobileV3PlayerEvent } from '../src/ts/mobilev3playerapi';
+import { PlayerWrapper } from '../src/ts/uimanager';
+
+describe('isMobileV3PlayerAPI', () => {
+ const playerApi = { exports: { PlayerEv... | |
c77498da9ee7bcfbbc2129a3bec6d3311cfdd6ed | test/unit/core/images/row/image-row.spec.ts | test/unit/core/images/row/image-row.spec.ts | import {ImageDocument} from 'idai-components-2';
import {ImageRow} from '../../../../../app/core/images/row/image-row';
describe('ImageRow', () => {
it('first page', () => {
const imageDocuments = [
{
resource: {
type: 'Drawing', id: 'i1', identifier: 'I1'... | Add unit test for image-row | Add unit test for image-row
| TypeScript | apache-2.0 | codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client | ---
+++
@@ -0,0 +1,25 @@
+import {ImageDocument} from 'idai-components-2';
+import {ImageRow} from '../../../../../app/core/images/row/image-row';
+
+
+describe('ImageRow', () => {
+
+ it('first page', () => {
+
+ const imageDocuments = [
+ {
+ resource: {
+ type... | |
41a121deab7230ebcfef1ab2fc45af16eaf6dd36 | app/src/ui/ui-view.tsx | app/src/ui/ui-view.tsx | import * as React from 'react'
interface IUiViewProps extends React.Props<UiView> {
id?: string
}
export class UiView extends React.Component<IUiViewProps, void> {
public render() {
return <div id={this.props.id} className='ui-view'>
{this.props.children}
</div>
}
}
| Add a high-order view component | Add a high-order view component
| TypeScript | mit | BugTesterTest/desktops,artivilla/desktop,kactus-io/kactus,j-f1/forked-desktop,shiftkey/desktop,j-f1/forked-desktop,say25/desktop,say25/desktop,BugTesterTest/desktops,gengjiawen/desktop,desktop/desktop,hjobrien/desktop,artivilla/desktop,hjobrien/desktop,shiftkey/desktop,shiftkey/desktop,say25/desktop,say25/desktop,hjobr... | ---
+++
@@ -0,0 +1,13 @@
+import * as React from 'react'
+
+interface IUiViewProps extends React.Props<UiView> {
+ id?: string
+}
+
+export class UiView extends React.Component<IUiViewProps, void> {
+ public render() {
+ return <div id={this.props.id} className='ui-view'>
+ {this.props.children}
+ </div>... | |
958f8cdaa054f333b604020d272c0fd4822955aa | src/actions/databaseFilterSettings.ts | src/actions/databaseFilterSettings.ts | import { updateValue } from './updateValue';
import { UPDATE_DB_SEARCH_TERM } from '../constants';
export interface UpdateDatabaseSearchTerm {
readonly type: UPDATE_DB_SEARCH_TERM;
readonly data: string;
}
export const changeSearchTerm = updateValue<string>(UPDATE_DB_SEARCH_TERM);
| Add action to update database search term. | Add action to update database search term.
| TypeScript | mit | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | ---
+++
@@ -0,0 +1,9 @@
+import { updateValue } from './updateValue';
+import { UPDATE_DB_SEARCH_TERM } from '../constants';
+
+export interface UpdateDatabaseSearchTerm {
+ readonly type: UPDATE_DB_SEARCH_TERM;
+ readonly data: string;
+}
+
+export const changeSearchTerm = updateValue<string>(UPDATE_DB_SEARCH_TERM... | |
8696943a9c3fc4e235b0a25370ae61984fa40792 | src/delir-core/src/renderer/pipeline/ExpressionContext.ts | src/delir-core/src/renderer/pipeline/ExpressionContext.ts | import RenderingRequest from './render-request'
import {Clip} from '../../project'
import {ParameterValueTypes} from '../../plugin-support/type-descriptor'
export interface Exposes {
req: RenderingRequest
clipProperties: {[propName: string]: ParameterValueTypes}
currentValue: any
}
export const makeContex... | Implement expression support (without UI) | Implement expression support (without UI)
| TypeScript | mit | Ragg-/Delir,Ragg-/Delir,Ragg-/Delir,Ragg-/Delir | ---
+++
@@ -0,0 +1,47 @@
+import RenderingRequest from './render-request'
+import {Clip} from '../../project'
+import {ParameterValueTypes} from '../../plugin-support/type-descriptor'
+
+export interface Exposes {
+ req: RenderingRequest
+ clipProperties: {[propName: string]: ParameterValueTypes}
+ currentVa... | |
f0b7dfd49389f0ecba9ee6ccab0825a5fa5fddef | tests/cases/fourslash/quickInfoForIndexerResultWithConstraint.ts | tests/cases/fourslash/quickInfoForIndexerResultWithConstraint.ts | /// <reference path='fourslash.ts'/>
////function foo<T>(x: T) {
//// return x;
////}
////function other2<T extends Date>(arg: T) {
//// var b: { [x: string]: T };
//// var r2/*1*/ = foo(b); // just shows T
////}
goTo.marker('1');
verify.quickInfoIs('{ [x: string]: T; }'); | Test update for resolved bug | Test update for resolved bug
| TypeScript | apache-2.0 | hippich/typescript,mbebenita/shumway.ts,mbebenita/shumway.ts,fdecampredon/jsx-typescript-old-version,fdecampredon/jsx-typescript-old-version,hippich/typescript,popravich/typescript,mbebenita/shumway.ts,hippich/typescript,popravich/typescript,popravich/typescript,fdecampredon/jsx-typescript-old-version | ---
+++
@@ -0,0 +1,13 @@
+/// <reference path='fourslash.ts'/>
+
+////function foo<T>(x: T) {
+//// return x;
+////}
+
+////function other2<T extends Date>(arg: T) {
+//// var b: { [x: string]: T };
+//// var r2/*1*/ = foo(b); // just shows T
+////}
+
+goTo.marker('1');
+verify.quickInfoIs('{ [x: string]... | |
2e44bccb36566596a15a7c1b9763ddb1b88afc7b | tests/cases/fourslash/renameDestructuringNestedBindingElement.ts | tests/cases/fourslash/renameDestructuringNestedBindingElement.ts | /// <reference path='fourslash.ts' />
////interface MultiRobot {
//// name: string;
//// skills: {
//// [|primary|]: string;
//// secondary: string;
//// };
////}
////let multiRobots: MultiRobot[];
////for (let { skills: {[|primary|]: primaryA, secondary: secondaryA } } of multiRobots) {... | Test case for nested binding element's rename | Test case for nested binding element's rename
| TypeScript | apache-2.0 | synaptek/TypeScript,kpreisser/TypeScript,nojvek/TypeScript,thr0w/Thr0wScript,ziacik/TypeScript,erikmcc/TypeScript,kitsonk/TypeScript,synaptek/TypeScript,microsoft/TypeScript,ziacik/TypeScript,TukekeSoft/TypeScript,TukekeSoft/TypeScript,erikmcc/TypeScript,alexeagle/TypeScript,donaldpipowitch/TypeScript,weswigham/TypeScr... | ---
+++
@@ -0,0 +1,22 @@
+/// <reference path='fourslash.ts' />
+
+////interface MultiRobot {
+//// name: string;
+//// skills: {
+//// [|primary|]: string;
+//// secondary: string;
+//// };
+////}
+////let multiRobots: MultiRobot[];
+////for (let { skills: {[|primary|]: primaryA, secondary: se... | |
e2a71ee2882c2c66c7b2dba4507364e792d6c300 | src/components/AccordionItem.spec.tsx | src/components/AccordionItem.spec.tsx | import * as React from 'react';
import { cleanup, render } from 'react-testing-library';
import { default as Accordion } from './Accordion';
import AccordionItem from './AccordionItem';
enum UUIDS {
FOO = 'FOO',
BAR = 'Bar',
}
describe('AccordionItem', () => {
afterEach(() => {
cleanup();
});
... | Add unit tests for AccordionItem's className and expandedClassName props | Add unit tests for AccordionItem's className and expandedClassName props
| TypeScript | mit | springload/react-accessible-accordion,springload/react-accessible-accordion,springload/react-accessible-accordion | ---
+++
@@ -0,0 +1,52 @@
+import * as React from 'react';
+import { cleanup, render } from 'react-testing-library';
+import { default as Accordion } from './Accordion';
+import AccordionItem from './AccordionItem';
+
+enum UUIDS {
+ FOO = 'FOO',
+ BAR = 'Bar',
+}
+
+describe('AccordionItem', () => {
+ afterE... | |
70bb3c2f921a767b43e5792a13709ca2d83c6d63 | source/behaviors/stopEventPropagation/stopEventPropagation.ts | source/behaviors/stopEventPropagation/stopEventPropagation.ts | // uses typings/angular
module rl.utilities.behaviors.stopEventPropogation {
'use strict';
export var moduleName: string = 'rl.utilities.behaviors.stopEventPropogation';
export var directiveName: string = 'rlStopEventPropagation';
export interface IStopEventPropagationAttrs extends ng.IAttributes {
rlStopEvent... | Add stop event propagation behavior. | Add stop event propagation behavior.
| TypeScript | mit | SamGraber/TypeScript-Angular-Utilities,RenovoSolutions/TypeScript-Angular-Utilities,csengineer13/TypeScript-Angular-Utilities,csengineer13/TypeScript-Angular-Utilities,RenovoSolutions/TypeScript-Angular-Utilities,SamGraber/TypeScript-Angular-Utilities | ---
+++
@@ -0,0 +1,30 @@
+// uses typings/angular
+
+module rl.utilities.behaviors.stopEventPropogation {
+ 'use strict';
+
+ export var moduleName: string = 'rl.utilities.behaviors.stopEventPropogation';
+ export var directiveName: string = 'rlStopEventPropagation';
+
+ export interface IStopEventPropagationAttrs ex... | |
93564c7d2efe895aeebd38a9cac578957e9c89c6 | src/vg-controls/vg-playback-button/vg-playback-button.spec.ts | src/vg-controls/vg-playback-button/vg-playback-button.spec.ts | import {it, describe, expect, beforeEach, inject} from 'angular2/testing';
import {VgPlaybackButton} from "./vg-playback-button";
import {VgAPI} from "../../services/vg-api";
import {ElementRef} from "angular2/core";
describe('Play/Pause Button', () => {
let playbackButton:VgPlaybackButton;
let ref:ElementRef;... | Raise coverage. Initial unit tests | test(vgPlaybackButton): Raise coverage. Initial unit tests
#1 Raise coverage to 100%
| TypeScript | mit | videogular/videogular2,videogular/videogular2,amitkumarmahajan/videogular2,kwarismian/videogular2,videogular/videogular2,kwarismian/videogular2,kwarismian/videogular2,amitkumarmahajan/videogular2,amitkumarmahajan/videogular2 | ---
+++
@@ -0,0 +1,96 @@
+import {it, describe, expect, beforeEach, inject} from 'angular2/testing';
+import {VgPlaybackButton} from "./vg-playback-button";
+import {VgAPI} from "../../services/vg-api";
+import {ElementRef} from "angular2/core";
+
+describe('Play/Pause Button', () => {
+ let playbackButton:VgPlayb... | |
3339ab5f4a64da28abb44c3cd3f4c6031fe9b597 | src/reducers/account.ts | src/reducers/account.ts | import { MaybeAccount } from '../types';
import { ConnectAccountAction } from '../actions/connectAccount';
import { CONNECT_ACCOUNT_SUCCESS } from '../constants';
export default (
state: MaybeAccount = null,
action: ConnectAccountAction
): MaybeAccount => {
switch (action.type) {
case CONNECT_ACCOUNT_SUCCE... | Add reducer for responding to CONNECT_ACCOUNT_SUCCESS | Add reducer for responding to CONNECT_ACCOUNT_SUCCESS
| TypeScript | mit | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | ---
+++
@@ -0,0 +1,17 @@
+import { MaybeAccount } from '../types';
+import { ConnectAccountAction } from '../actions/connectAccount';
+import { CONNECT_ACCOUNT_SUCCESS } from '../constants';
+
+
+
+export default (
+ state: MaybeAccount = null,
+ action: ConnectAccountAction
+): MaybeAccount => {
+ switch (action.... | |
db17262ea4f7d1736acd842a3afa9f1a19ee39a4 | public/app/core/utils/CancelablePromise.ts | public/app/core/utils/CancelablePromise.ts | // https://github.com/facebook/react/issues/5465
export interface CancelablePromise<T> {
promise: Promise<T>;
cancel: () => void;
}
export const makePromiseCancelable = <T>(promise: Promise<T>): CancelablePromise<T> => {
let hasCanceled_ = false;
const wrappedPromise = new Promise<T>((resolve, reject) => {
... | Add util for handling promise cancelation to avoid setting state on unmounted components | Add util for handling promise cancelation to avoid setting state on unmounted components
https://github.com/facebook/react/issues/5465
| TypeScript | agpl-3.0 | grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana | ---
+++
@@ -0,0 +1,22 @@
+// https://github.com/facebook/react/issues/5465
+
+export interface CancelablePromise<T> {
+ promise: Promise<T>;
+ cancel: () => void;
+}
+
+export const makePromiseCancelable = <T>(promise: Promise<T>): CancelablePromise<T> => {
+ let hasCanceled_ = false;
+
+ const wrappedPromise = n... | |
ba11c26e9383c2f3f3f6589def1dddee01e590d0 | test/test-wavpack.ts | test/test-wavpack.ts | import {} from "mocha";
import {assert} from "chai";
import * as mm from "../src";
import * as fs from "fs-extra";
import * as path from "path";
import {SourceStream} from "./util";
const t = assert;
describe("WavPack decoding", () => {
const samplePath = path.join(__dirname, 'samples');
const wv1 = path.join(sa... | Add unit dedicated tests for WavPack, ensure MIME-tpe is used once. | Add unit dedicated tests for WavPack, ensure MIME-tpe is used once.
| TypeScript | mit | Borewit/music-metadata,Borewit/music-metadata | ---
+++
@@ -0,0 +1,48 @@
+import {} from "mocha";
+import {assert} from "chai";
+import * as mm from "../src";
+import * as fs from "fs-extra";
+import * as path from "path";
+import {SourceStream} from "./util";
+
+const t = assert;
+
+describe("WavPack decoding", () => {
+
+ const samplePath = path.join(__dirname,... | |
55fa13d1b34191edbddf02606d9ed8fb5ba583e6 | src/app/add-assignment/add-assignment.component.spec.ts | src/app/add-assignment/add-assignment.component.spec.ts | import {
beforeEachProviders,
describe,
inject,
it
} from '@angular/core/testing';
import { AddAssignmentComponent } from './add-assignment.component';
describe('AddAssignmentComponent', () => {
beforeEachProviders(() => [
AddAssignmentComponent
]);
let component: AddAssignmentComponent;
beforeE... | Add tests for add-assignment component | Add tests for add-assignment component
| TypeScript | mit | bryant-pham/brograder,bryant-pham/brograder,bryant-pham/brograder,bryant-pham/brograder | ---
+++
@@ -0,0 +1,32 @@
+import {
+ beforeEachProviders,
+ describe,
+ inject,
+ it
+} from '@angular/core/testing';
+
+import { AddAssignmentComponent } from './add-assignment.component';
+
+describe('AddAssignmentComponent', () => {
+ beforeEachProviders(() => [
+ AddAssignmentComponent
+ ]);
+
+ let com... | |
40c03e5c12223b199f69f5dcccce8d3cf92d7d28 | src/SyntaxNodes/OutlineSyntaxNode.ts | src/SyntaxNodes/OutlineSyntaxNode.ts | import { SyntaxNode } from '../SyntaxNodes/SyntaxNode'
import { PlainTextNode } from '../SyntaxNodes/PlainTextNode'
import { RichSyntaxNode } from '../SyntaxNodes/RichSyntaxNode'
export abstract class OutlineSyntaxNode extends SyntaxNode {
private OUTLINE_SYNTAX_NODE: any = null
} | Add outline syntax node class | Add outline syntax node class
| TypeScript | mit | start/up,start/up | ---
+++
@@ -0,0 +1,7 @@
+import { SyntaxNode } from '../SyntaxNodes/SyntaxNode'
+import { PlainTextNode } from '../SyntaxNodes/PlainTextNode'
+import { RichSyntaxNode } from '../SyntaxNodes/RichSyntaxNode'
+
+export abstract class OutlineSyntaxNode extends SyntaxNode {
+ private OUTLINE_SYNTAX_NODE: any = null
+} | |
a312fb4075ac3d2029172f6894aa4dd1bac2f074 | src/config/editorsImgMap.ts | src/config/editorsImgMap.ts | import {
ANDROIDSTUDIO,
ATOM,
CHROME,
ECLIPSE,
SUBLIMETEXT2,
SUBLIMETEXT3,
VIM,
VSCODE
} from "../constants/editors";
import {
androidStudio128Path,
atom128Path,
chrome128Path,
eclipse128Path,
sublimeText128Path,
vim128Path,
vsCode128Path
} from "../constants/imgPaths";
interface EditorIm... | Create an image map to make it more configurable which Editor to which image | Create an image map to make it more configurable which Editor to which image
| TypeScript | bsd-3-clause | wakatime/desktop,wakatime/wakatime-desktop,wakatime/desktop,wakatime/wakatime-desktop,wakatime/desktop | ---
+++
@@ -0,0 +1,36 @@
+import {
+ ANDROIDSTUDIO,
+ ATOM,
+ CHROME,
+ ECLIPSE,
+ SUBLIMETEXT2,
+ SUBLIMETEXT3,
+ VIM,
+ VSCODE
+} from "../constants/editors";
+import {
+ androidStudio128Path,
+ atom128Path,
+ chrome128Path,
+ eclipse128Path,
+ sublimeText128Path,
+ vim128Path,
+ vsCode128Path
+} fro... | |
7fdeebf2e92c6860a04680cbeefd7a369a22a464 | src/Test/Ast/EdgeCases/UnorderedList.ts | src/Test/Ast/EdgeCases/UnorderedList.ts | /// <reference path="../../../../typings/mocha/mocha.d.ts" />
/// <reference path="../../../../typings/chai/chai.d.ts" />
import { expect } from 'chai'
import * as Up from '../../../index'
import { SyntaxNode } from '../../../SyntaxNodes/SyntaxNode'
import { LinkNode } from '../../../SyntaxNodes/LinkNode'
import { Doc... | Add failing unordered list test | Add failing unordered list test
| TypeScript | mit | start/up,start/up | ---
+++
@@ -0,0 +1,45 @@
+/// <reference path="../../../../typings/mocha/mocha.d.ts" />
+/// <reference path="../../../../typings/chai/chai.d.ts" />
+
+import { expect } from 'chai'
+import * as Up from '../../../index'
+import { SyntaxNode } from '../../../SyntaxNodes/SyntaxNode'
+import { LinkNode } from '../../../... | |
761bdd75c8ddad48bb66fcbc9a81eddff120ced6 | app/src/main-process/menu/get-all-menu-items.ts | app/src/main-process/menu/get-all-menu-items.ts | import { Menu, MenuItem } from 'electron'
/**
* Returns an iterator that traverses the menu and all
* submenus and yields each menu item therein.
*/
export function* getAllMenuItems(menu: Menu): IterableIterator<MenuItem> {
for (const menuItem of menu.items) {
yield menuItem
if (menuItem.type === 'submen... | Add a helper method for recursing through all menu items in a menu | Add a helper method for recursing through all menu items in a menu
| TypeScript | mit | kactus-io/kactus,j-f1/forked-desktop,desktop/desktop,kactus-io/kactus,desktop/desktop,kactus-io/kactus,kactus-io/kactus,artivilla/desktop,j-f1/forked-desktop,artivilla/desktop,j-f1/forked-desktop,say25/desktop,artivilla/desktop,artivilla/desktop,say25/desktop,say25/desktop,desktop/desktop,desktop/desktop,say25/desktop,... | ---
+++
@@ -0,0 +1,15 @@
+import { Menu, MenuItem } from 'electron'
+
+/**
+ * Returns an iterator that traverses the menu and all
+ * submenus and yields each menu item therein.
+ */
+export function* getAllMenuItems(menu: Menu): IterableIterator<MenuItem> {
+ for (const menuItem of menu.items) {
+ yield menuIte... | |
046da41166cfc5248c6e1bd711f5c946dc62af65 | src/angular-cesium/components/ac-static-circle-desc/ac-static-circle-desc.component.spec.ts | src/angular-cesium/components/ac-static-circle-desc/ac-static-circle-desc.component.spec.ts | /* tslint:disable:no-unused-variable */
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AcEllipseStaticDescComponent } from './ac-ellipse-static-desc.component';
describe('AcEllipseStaticDescComponent', () => {
let component: AcEllipseStaticDescComponent;
let fixture: ComponentFix... | Undo remove static desc tests | Undo remove static desc tests
| TypeScript | mit | TGFTech/angular-cesium,TGFTech/angular-cesium,TGFTech/angular-cesium | ---
+++
@@ -0,0 +1,26 @@
+/* tslint:disable:no-unused-variable */
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { AcEllipseStaticDescComponent } from './ac-ellipse-static-desc.component';
+
+describe('AcEllipseStaticDescComponent', () => {
+ let component: AcEllipseStaticDescCom... | |
b0dff0fbfd89912aa84c82d8c3348c72f0974743 | app/src/ui/history/compare-branch-list-item.tsx | app/src/ui/history/compare-branch-list-item.tsx | import * as React from 'react'
import { Octicon, OcticonSymbol } from '../octicons'
import { HighlightText } from '../lib/highlight-text'
import { Branch } from '../../models/branch'
import { ICompareResult } from '../../lib/git'
import { Dispatcher } from '../../lib/dispatcher'
import { Repository } from '../../model... | Add new component for rendering branches with ahead/behind info | Add new component for rendering branches with ahead/behind info
| TypeScript | mit | desktop/desktop,say25/desktop,say25/desktop,desktop/desktop,shiftkey/desktop,say25/desktop,shiftkey/desktop,j-f1/forked-desktop,j-f1/forked-desktop,say25/desktop,artivilla/desktop,artivilla/desktop,desktop/desktop,desktop/desktop,j-f1/forked-desktop,artivilla/desktop,artivilla/desktop,shiftkey/desktop,kactus-io/kactus,... | ---
+++
@@ -0,0 +1,70 @@
+import * as React from 'react'
+
+import { Octicon, OcticonSymbol } from '../octicons'
+import { HighlightText } from '../lib/highlight-text'
+import { Branch } from '../../models/branch'
+import { ICompareResult } from '../../lib/git'
+import { Dispatcher } from '../../lib/dispatcher'
+impo... | |
f7ba7188f3d9b54126605e4ae88105db702cbdd2 | tests/cases/fourslash/completionListInObjectBindingPattern13.ts | tests/cases/fourslash/completionListInObjectBindingPattern13.ts | /// <reference path='fourslash.ts'/>
////interface I {
//// x: number;
//// y: string;
//// z: boolean;
////}
////
////interface J {
//// x: string;
//// y: string;
////}
////
////let { /**/ }: I | J = { x: 10 };
goTo.marker();
verify.completionListContains("x");
verify.completionListC... | Add test case for completion when destructuring from a union type. | Add test case for completion when destructuring from a union type.
| TypeScript | apache-2.0 | billti/TypeScript,jwbay/TypeScript,MartyIX/TypeScript,jbondc/TypeScript,enginekit/TypeScript,nojvek/TypeScript,HereSinceres/TypeScript,jwbay/TypeScript,moander/TypeScript,chuckjaz/TypeScript,ziacik/TypeScript,weswigham/TypeScript,JohnZ622/TypeScript,mmoskal/TypeScript,erikmcc/TypeScript,AbubakerB/TypeScript,jeremyeplin... | ---
+++
@@ -0,0 +1,19 @@
+/// <reference path='fourslash.ts'/>
+
+////interface I {
+//// x: number;
+//// y: string;
+//// z: boolean;
+////}
+////
+////interface J {
+//// x: string;
+//// y: string;
+////}
+////
+////let { /**/ }: I | J = { x: 10 };
+
+goTo.marker();
+verify.completionListContains("... | |
4c6b639e0ceda039ef2b9545eabb75d96a61f7ae | src/search/alphaBeta.ts | src/search/alphaBeta.ts | export function alphaBeta<TNode>(node: TNode, depth: number, alpha: number,
beta: number, isMaximizingPlayer: boolean, evaluate: (node: TNode) => number,
isTerminalNode: (node: TNode) => boolean, getChildren: (node: TNode) => TNode[]) {
if (depth == 0 || isTerminalNode(node)) return evaluate(node);
if (isMaximi... | Add a basic alpha-beta evaluation function | Add a basic alpha-beta evaluation function
| TypeScript | mit | artfuldev/tictactoe-ai,artfuldev/tictactoe-ai | ---
+++
@@ -0,0 +1,29 @@
+export function alphaBeta<TNode>(node: TNode, depth: number, alpha: number,
+ beta: number, isMaximizingPlayer: boolean, evaluate: (node: TNode) => number,
+ isTerminalNode: (node: TNode) => boolean, getChildren: (node: TNode) => TNode[]) {
+ if (depth == 0 || isTerminalNode(node)) return... | |
83b1c102694d394e1212343438b07ec57fd265a3 | src/constants.ts | src/constants.ts | import * as path from 'path';
export const DEFAULT_APP_NAME = 'APP';
// Update both together, and update app / package.json / devDeps / electron
export const DEFAULT_ELECTRON_VERSION = '12.0.2';
export const DEFAULT_CHROME_VERSION = '89.0.4389.90';
export const ELECTRON_MAJOR_VERSION = parseInt(
DEFAULT_ELECTRON_V... | import * as path from 'path';
export const DEFAULT_APP_NAME = 'APP';
// Update both together, and update app / package.json / devDeps / electron
export const DEFAULT_ELECTRON_VERSION = '12.0.4';
export const DEFAULT_CHROME_VERSION = '89.0.4389.114';
export const ELECTRON_MAJOR_VERSION = parseInt(
DEFAULT_ELECTRON_... | Bump to Electron 12.0.4 with Chrome 89.0.4389.114 | Bump to Electron 12.0.4 with Chrome 89.0.4389.114
With recent security fixes.
See https://github.com/electron/electron/releases/tag/v12.0.4
and https://github.com/electron/electron/releases/tag/v12.0.3
| TypeScript | bsd-2-clause | jiahaog/Nativefier,jiahaog/Nativefier,jiahaog/Nativefier | ---
+++
@@ -3,8 +3,8 @@
export const DEFAULT_APP_NAME = 'APP';
// Update both together, and update app / package.json / devDeps / electron
-export const DEFAULT_ELECTRON_VERSION = '12.0.2';
-export const DEFAULT_CHROME_VERSION = '89.0.4389.90';
+export const DEFAULT_ELECTRON_VERSION = '12.0.4';
+export const DEFA... |
a8db9a3b642e5bc2d50496f2352d2529e7a69b32 | client/constants/components.ts | client/constants/components.ts | // Imported from https://github.com/twbs/bootstrap/blob/v4.3.1/scss/_variables.scss
import { gray } from './colors'
export const border = {
width: '1px',
color: gray[300],
radius: '.25rem',
radiusLg: '.3rem',
radiusSm: '.2rem',
}
| Add border constans of Bootstrap | Add border constans of Bootstrap
| TypeScript | mit | crowi/crowi,crowi/crowi,crowi/crowi | ---
+++
@@ -0,0 +1,11 @@
+// Imported from https://github.com/twbs/bootstrap/blob/v4.3.1/scss/_variables.scss
+
+import { gray } from './colors'
+
+export const border = {
+ width: '1px',
+ color: gray[300],
+ radius: '.25rem',
+ radiusLg: '.3rem',
+ radiusSm: '.2rem',
+} | |
d8bf0eb019bcefa6d7cb5e637df81f58cf6ae623 | __tests__/api/index.ts | __tests__/api/index.ts | import { Api } from '../../src/api'
describe('Api class', () => {
let api = new Api();
beforeEach(() => {
api = new Api();
});
test('setAccessToken set Authorization HTTP header', () => {
const token = 'abc';
const expected = `Bearer ${token}`;
api.setAccessToken(token);
expect(api['baseC... | Add Api setAccessToken method test | Add Api setAccessToken method test
| TypeScript | mit | y0za/trumpet,y0za/trumpet,y0za/trumpet,y0za/trumpet | ---
+++
@@ -0,0 +1,16 @@
+import { Api } from '../../src/api'
+
+describe('Api class', () => {
+ let api = new Api();
+
+ beforeEach(() => {
+ api = new Api();
+ });
+
+ test('setAccessToken set Authorization HTTP header', () => {
+ const token = 'abc';
+ const expected = `Bearer ${token}`;
+ api.setA... | |
ab0e2d66e0779f07eeaac1b25322ac4e5190e97a | types/react-router-dom/react-router-dom-tests.tsx | types/react-router-dom/react-router-dom-tests.tsx | import * as React from 'react';
import {
NavLink,
NavLinkProps,
match,
Link,
RouteComponentProps
} from 'react-router-dom';
import * as H from 'history';
const getIsActive = (extraProp: string) => (match: match, location: H.Location) => !!extraProp;
interface Props extends NavLinkProps {
extraProp: string... | import * as React from 'react';
import {
NavLink,
NavLinkProps,
match,
Link,
RouteComponentProps
} from 'react-router-dom';
import * as H from 'history';
const getIsActive = (extraProp: string) => (match: match, location: H.Location) => !!extraProp;
interface Props extends NavLinkProps {
extraProp: string... | Add failing test for ref objects | [react-router-dom] Add failing test for ref objects
| TypeScript | mit | georgemarshall/DefinitelyTyped,mcliment/DefinitelyTyped,borisyankov/DefinitelyTyped,georgemarshall/DefinitelyTyped,dsebastien/DefinitelyTyped,georgemarshall/DefinitelyTyped,dsebastien/DefinitelyTyped,markogresak/DefinitelyTyped,georgemarshall/DefinitelyTyped,borisyankov/DefinitelyTyped | ---
+++
@@ -39,5 +39,7 @@
<Link to="/url" />;
-const acceptRef = (node: HTMLAnchorElement | null) => {};
-<Link to="/url" replace={true} innerRef={acceptRef} />;
+const refCallback: React.Ref<HTMLAnchorElement> = node => {};
+<Link to="/url" replace={true} innerRef={refCallback} />;
+const ref = React.createRef<... |
703defba62b675793e886e930df2d5552d443c5b | tests/ts/query-builder-api/join-methods.ts | tests/ts/query-builder-api/join-methods.ts | import { Person } from '../fixtures/person';
import { raw } from '../../..';
(async () => {
await Person.query()
.joinRelation('pets')
.where('pets.species', 'dog');
await Person.query()
.joinRelation('pets', { alias: 'p' })
.where('p.species', 'dog');
await Person.query()
.joinRelation('[p... | Add tests for join methods | Add tests for join methods
Signed-off-by: Will Soto <willsoto@users.noreply.github.com>
#1431
| TypeScript | mit | Vincit/objection.js,Vincit/objection.js,Vincit/objection.js | ---
+++
@@ -0,0 +1,63 @@
+import { Person } from '../fixtures/person';
+import { raw } from '../../..';
+
+(async () => {
+ await Person.query()
+ .joinRelation('pets')
+ .where('pets.species', 'dog');
+
+ await Person.query()
+ .joinRelation('pets', { alias: 'p' })
+ .where('p.species', 'dog');
+
+ aw... | |
8accf9e0fcfa3142f4c01495b5dcb2f8d8c0df0b | spec/errors.spec.ts | spec/errors.spec.ts | import {jsonMember, jsonObject, TypedJSON} from '../src';
describe('errors', () => {
class CustomType {
}
it('should be thrown when types could not be determined', () => {
@jsonObject
class TestNonDeterminableTypes {
@jsonMember
bar: CustomType;
}
... | Test whether undeterminable types throw errors | Test whether undeterminable types throw errors
| TypeScript | mit | JohnWhiteTB/TypedJSON,JohnWhiteTB/TypedJSON,JohnWeisz/TypedJSON,JohnWeisz/TypedJSON,JohnWhiteTB/TypedJSON | ---
+++
@@ -0,0 +1,24 @@
+import {jsonMember, jsonObject, TypedJSON} from '../src';
+
+describe('errors', () => {
+ class CustomType {
+ }
+
+ it('should be thrown when types could not be determined', () => {
+ @jsonObject
+ class TestNonDeterminableTypes {
+
+ @jsonMember
+ ... | |
ef24732d51a19f174b8025836dc23ad47b7a0f51 | desktop/core/src/desktop/js/components/directives/overflowOnHoverDirective.ts | desktop/core/src/desktop/js/components/directives/overflowOnHoverDirective.ts | // Licensed to Cloudera, Inc. under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. Cloudera, Inc. licenses this file
// to you under the Apache License, Version 2.0 (the
// 'License'); you may not use this f... | Add an overflow on hover Vue directive | [frontend] Add an overflow on hover Vue directive
Similar to the ko binding we have to only show scrollbars when mouse is hovering over an element
| TypeScript | apache-2.0 | cloudera/hue,cloudera/hue,cloudera/hue,kawamon/hue,cloudera/hue,cloudera/hue,cloudera/hue,kawamon/hue,cloudera/hue,kawamon/hue,cloudera/hue,kawamon/hue,kawamon/hue,kawamon/hue,kawamon/hue,cloudera/hue,kawamon/hue,cloudera/hue,kawamon/hue,kawamon/hue,cloudera/hue,cloudera/hue,cloudera/hue,kawamon/hue,cloudera/hue,kawamo... | ---
+++
@@ -0,0 +1,82 @@
+// Licensed to Cloudera, Inc. under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. Cloudera, Inc. licenses this file
+// to you under the Apache License, Version 2.0 (the
+// '... | |
452327be41440ebd0c74a4040a1b4ef7660c206d | packages/material/src/complex/NoBorderTableCell.tsx | packages/material/src/complex/NoBorderTableCell.tsx | import { withStyles } from '@material-ui/core/styles';
import { TableCell } from '@material-ui/core';
import * as React from 'react';
const styles = {
noBottomBorder: {
borderBottom: 'none'
}
};
const NoBorderTableCell = ({ classes, children, ...otherProps }: any) => (
<TableCell className={classe... | Add table cell with disabled bottom border | [material] Add table cell with disabled bottom border
| TypeScript | mit | qb-project/jsonforms,qb-project/jsonforms,qb-project/jsonforms | ---
+++
@@ -0,0 +1,17 @@
+import { withStyles } from '@material-ui/core/styles';
+import { TableCell } from '@material-ui/core';
+import * as React from 'react';
+
+const styles = {
+ noBottomBorder: {
+ borderBottom: 'none'
+ }
+};
+
+const NoBorderTableCell = ({ classes, children, ...otherProps }: any)... | |
9dc66f26d0620ee84442ba1fd13381d854472a02 | src/app/+customer/customer.routes.ts | src/app/+customer/customer.routes.ts | import { RouterConfig } from '@angular/router';
import { CustomerComponent } from './customer.component';
import { CustomerOrdersComponent } from './customerOrders.component';
import { CustomerDetailsComponent } from './customerDetails.component';
import { CustomerEditComponent } from './customerEdit.component';
ex... | import { RouterConfig } from '@angular/router';
import { CustomerComponent } from './customer.component';
import { CustomerOrdersComponent } from './customerOrders.component';
import { CustomerDetailsComponent } from './customerDetails.component';
import { CustomerEditComponent } from './customerEdit.component';
ex... | Add redirect from path to .../id to .../id/details | Add redirect from path to .../id to .../id/details
Routes to customer id only will now redirect to customer details page. | TypeScript | mit | DanWahlin/Angular-JumpStart,m-williams/Angular2-JumpStart,DanWahlin/Angular-JumpStart,DanWahlin/Angular2-JumpStart,m-williams/Angular2-JumpStart,DanWahlin/Angular2-JumpStart,m-williams/Angular2-JumpStart,DanWahlin/Angular2-JumpStart,DanWahlin/Angular-JumpStart | ---
+++
@@ -6,6 +6,7 @@
import { CustomerEditComponent } from './customerEdit.component';
export const CustomerRoutes: RouterConfig = [
+ { path: 'customers/:id', terminal: true, redirectTo: '/customers/:id/details' }, //route path with only a customer id to the details route.
{
path: 'customers/:id',
... |
17772e1b4462b90f76d271bf09dba348797aea64 | src/uri-quickpick.ts | src/uri-quickpick.ts | import * as vscode from 'vscode';
class UriQuickPickItem implements vscode.QuickPickItem {
description = "";
detail = "";
constructor(public label: string, public uri: vscode.Uri) {
}
}
export async function uriQuickPick(uris: vscode.Uri[], placeHolder?: string): Promise<vscode.Uri> {
if (uris.l... | Add a uri quick pick helper | Add a uri quick pick helper
| TypeScript | mpl-2.0 | hashicorp/vscode-terraform,mauve/vscode-terraform,mauve/vscode-terraform,mauve/vscode-terraform,hashicorp/vscode-terraform,mauve/vscode-terraform,hashicorp/vscode-terraform | ---
+++
@@ -0,0 +1,27 @@
+import * as vscode from 'vscode';
+
+class UriQuickPickItem implements vscode.QuickPickItem {
+ description = "";
+ detail = "";
+
+ constructor(public label: string, public uri: vscode.Uri) {
+
+ }
+}
+
+export async function uriQuickPick(uris: vscode.Uri[], placeHolder?: string... | |
aa52f58bcf69c356ca28524168741d855557464e | src/utils/extend.ts | src/utils/extend.ts | export function shallowCopy(target: Object, source: Object) {
for (var key in source)
if (source.hasOwnProperty(key))
target[key] = source[key];
}
export function shallowExtend(target: Object, ...sources: Object[]) {
sources.forEach(source => shallowCopy(target, source));
}
export function shallowEx... | Add utility methods for extensions and copying | Add utility methods for extensions and copying
| TypeScript | mit | cyclic-ui/cyclic-ui,cyclic-ui/cyclic-ui | ---
+++
@@ -0,0 +1,13 @@
+export function shallowCopy(target: Object, source: Object) {
+ for (var key in source)
+ if (source.hasOwnProperty(key))
+ target[key] = source[key];
+}
+
+export function shallowExtend(target: Object, ...sources: Object[]) {
+ sources.forEach(source => shallowCopy(target, sou... | |
eb1fc336fa819437c319e0b11aab1807329c0f2c | tools/packager.ts | tools/packager.ts | import { writeFileSync, readFileSync } from 'fs';
const packageJson = JSON.parse(readFileSync('./package.json').toString());
delete packageJson.devDependencies;
delete packageJson.scripts;
writeFileSync('./dist/package.json', JSON.stringify(packageJson, null, 2));
| Prepare package for npm distribution | Prepare package for npm distribution
| TypeScript | mit | czeckd/angular2-dual-listbox,czeckd/angular-dual-listbox,czeckd/angular2-dual-listbox,czeckd/angular-dual-listbox,czeckd/angular-dual-listbox,czeckd/angular2-dual-listbox | ---
+++
@@ -0,0 +1,6 @@
+import { writeFileSync, readFileSync } from 'fs';
+
+const packageJson = JSON.parse(readFileSync('./package.json').toString());
+delete packageJson.devDependencies;
+delete packageJson.scripts;
+writeFileSync('./dist/package.json', JSON.stringify(packageJson, null, 2)); | |
408c7d5cbee4492361e9122f68301e4e00ee7f1b | src/autocomplete/autocomplete-container-directive.ts | src/autocomplete/autocomplete-container-directive.ts | /*
MIT License
Copyright (c) 2017 Temainfo Sistemas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge,... | Create container directive for items | feat(autocomplete): Create container directive for items
| TypeScript | mit | TemainfoSistemas/truly-ui,TemainfoSistemas/truly-ui,TemainfoSistemas/truly-ui | ---
+++
@@ -0,0 +1,32 @@
+/*
+ MIT License
+
+ Copyright (c) 2017 Temainfo Sistemas
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the r... | |
2fa1d649378af0317583582276f3e33903f73c9d | src/modules/list-toolbar/list-toolbar.component.spec.ts | src/modules/list-toolbar/list-toolbar.component.spec.ts | import {
ComponentFixture,
TestBed
} from '@angular/core/testing';
import {
ListState,
ListStateDispatcher,
ListStateModel
} from '../list/state';
import { SkyListToolbarModule } from './';
import {
ListToolbarTestComponent
} from './fixtures/list-toolbar.component.fixture';
import { BehaviorSubject, Subjec... | import {
ComponentFixture,
TestBed,
async
} from '@angular/core/testing';
import {
ListState,
ListStateDispatcher,
ListStateModel
} from '../list/state';
import { SkyListToolbarModule } from './';
import {
ListToolbarTestComponent
} from './fixtures/list-toolbar.component.fixture';
import { BehaviorSubjec... | Use async() helper instead of jasmine async | Use async() helper instead of jasmine async
| TypeScript | mit | Blackbaud-LuisBello/microedge-skyux2-contrib,Blackbaud-ChrisFranz/microedge-skyux2-contrib,Blackbaud-ChrisFranz/microedge-skyux2-contrib,blackbaud-joshgerdes/microedge-skyux2-contrib,Blackbaud-KristinaDurivage/microedge-skyux2-contrib,Blackbaud-LuisBello/microedge-skyux2-contrib,blackbaud-joshgerdes/microedge-skyux2-co... | ---
+++
@@ -1,6 +1,7 @@
import {
ComponentFixture,
- TestBed
+ TestBed,
+ async
} from '@angular/core/testing';
import {
ListState,
@@ -19,36 +20,31 @@
fixture: any,
element: any;
- beforeEach((done) => {
+ beforeEach(async(() => {
dispatcher = new ListStateDispatcher();
state ... |
8277dea295d72a5063c2c672f4852286fa29ac9f | lib/ts/toZipSlicer.ts | lib/ts/toZipSlicer.ts | module microtome.slicer {
export class ToZipSlicer {
constructor(slicer:AdvancedSlicer){
}
do(cfg: microtome.printer.PrinterConfig):JSZip{
let zip = new JSZip();
return zip;
}
}
}
| Bring in skeleton of new to zipfile slicer | Bring in skeleton of new to zipfile slicer
| TypeScript | apache-2.0 | DanielJoyce/microtome,DanielJoyce/microtome,Microtome/microtome,Microtome/microtome,DanielJoyce/microtome,DanielJoyce/microtome,Microtome/microtome | ---
+++
@@ -0,0 +1,12 @@
+module microtome.slicer {
+ export class ToZipSlicer {
+
+ constructor(slicer:AdvancedSlicer){
+ }
+
+ do(cfg: microtome.printer.PrinterConfig):JSZip{
+ let zip = new JSZip();
+ return zip;
+ }
+ }
+} | |
d14858d32d187797cfbeff7f0963a48a8451da2a | src/SlackResponses.ts | src/SlackResponses.ts | import { WebAPICallResult } from "@slack/web-api";
/**
* Taken from https://api.slack.com/methods/team.info
*/
export interface TeamInfoResponse extends WebAPICallResult {
team: {
id: string;
name: string;
domain: string;
};
}
/**
* Taken from https://api.slack.com/methods/conversat... | Add file to store response formats to slack API calls | Add file to store response formats to slack API calls
| TypeScript | apache-2.0 | matrix-org/matrix-appservice-slack,matrix-org/matrix-appservice-slack,matrix-org/matrix-appservice-slack,matrix-org/matrix-appservice-slack | ---
+++
@@ -0,0 +1,22 @@
+import { WebAPICallResult } from "@slack/web-api";
+
+/**
+ * Taken from https://api.slack.com/methods/team.info
+ */
+export interface TeamInfoResponse extends WebAPICallResult {
+ team: {
+ id: string;
+ name: string;
+ domain: string;
+ };
+}
+
+/**
+ * Taken fr... | |
b56c7d64d2a95e49dd0db81d92da3d0188567243 | tests/cases/fourslash/completionListInvalidMemberNames2.ts | tests/cases/fourslash/completionListInvalidMemberNames2.ts | /// <reference path='fourslash.ts' />
////enum Foo {
//// X, Y, '☆'
////}
////var x = Foo./**/
goTo.marker();
verify.memberListContains("X");
verify.memberListContains("Y");
verify.memberListCount(2); | Add test for enums with members with unicode names | Add test for enums with members with unicode names
| TypeScript | apache-2.0 | fdecampredon/jsx-typescript-old-version,hippich/typescript,mbebenita/shumway.ts,popravich/typescript,hippich/typescript,hippich/typescript,fdecampredon/jsx-typescript-old-version,fdecampredon/jsx-typescript-old-version,mbebenita/shumway.ts,popravich/typescript,mbebenita/shumway.ts,popravich/typescript | ---
+++
@@ -0,0 +1,11 @@
+/// <reference path='fourslash.ts' />
+
+////enum Foo {
+//// X, Y, '☆'
+////}
+////var x = Foo./**/
+
+goTo.marker();
+verify.memberListContains("X");
+verify.memberListContains("Y");
+verify.memberListCount(2); | |
1c53eb937eac55d4c084d24e155ad2ead75eccd8 | app/set/set.service.ts | app/set/set.service.ts | import {Injectable} from 'angular2/core';
import {Http, Response} from 'angular2/http';
import {Observable} from 'rxjs/Rx';
import 'rxjs/add/operator/map';
import {Set} from './set';
@Injectable()
export class SetService {
private setsObservable: Observable<Set[]>;
constructor(
private http: Http) { }
pu... | Add SetService and method to get all Sets | Add SetService and method to get all Sets
| TypeScript | mit | christianhg/magicalc,christianhg/magicalc,christianhg/magicalc | ---
+++
@@ -0,0 +1,26 @@
+import {Injectable} from 'angular2/core';
+import {Http, Response} from 'angular2/http';
+import {Observable} from 'rxjs/Rx';
+import 'rxjs/add/operator/map';
+
+import {Set} from './set';
+
+@Injectable()
+
+export class SetService {
+ private setsObservable: Observable<Set[]>;
+
+ constr... | |
5db64ce545a4a291fa1944b03de974eae11d94f8 | test/reducers/slides/actions/moveSlideDown-spec.ts | test/reducers/slides/actions/moveSlideDown-spec.ts | import { expect } from 'chai';
import { MOVE_SLIDE_DOWN } from '../../../../app/constants/slides.constants';
export default function(initialState: any, reducer: any, slide: any) {
const dummySlide1 = {
plugins: ['plugin1'],
state: {
backgroundColor: { r: 255, g: 255, b: 255, a: 100 },
transition:... | Add MOVE_SLIDE_DOWN test for slide reducer | test: Add MOVE_SLIDE_DOWN test for slide reducer
| TypeScript | mit | Team-CHAD/DevDecks,Team-CHAD/DevDecks,DevDecks/devdecks,chengsieuly/devdecks,DevDecks/devdecks,Team-CHAD/DevDecks,DevDecks/devdecks,chengsieuly/devdecks,chengsieuly/devdecks | ---
+++
@@ -0,0 +1,36 @@
+import { expect } from 'chai';
+import { MOVE_SLIDE_DOWN } from '../../../../app/constants/slides.constants';
+
+export default function(initialState: any, reducer: any, slide: any) {
+ const dummySlide1 = {
+ plugins: ['plugin1'],
+ state: {
+ backgroundColor: { r: 255, g: 255, ... | |
b140e9b8f238b277469930d82353b6c5316b09fd | countdown/countdown-tests.ts | countdown/countdown-tests.ts | // Type definitions for countdown.js
// Project: http://countdownjs.org/
// Definitions by: Gabriel Juchault https://github.com/gjuchault
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="countdown.d.ts" />
import { countdown, Timespan, CountdownStatic, Format } from 'countdown';... | /// <reference path="countdown.d.ts" />
import { countdown, Timespan, CountdownStatic, Format } from 'countdown';
let ts: Timespan;
let interval: number;
ts = <Timespan>countdown(new Date());
ts = <Timespan>countdown(150);
interval = <number>countdown(new Date(),
function (ts: Timespan) {
document.getEl... | Remove header tags from tests | Remove header tags from tests
| TypeScript | mit | jimthedev/DefinitelyTyped,rcchen/DefinitelyTyped,subash-a/DefinitelyTyped,dsebastien/DefinitelyTyped,nainslie/DefinitelyTyped,scriby/DefinitelyTyped,slavomirvojacek/DefinitelyTyped,aciccarello/DefinitelyTyped,arusakov/DefinitelyTyped,micurs/DefinitelyTyped,mcrawshaw/DefinitelyTyped,slavomirvojacek/adbrain-typescript-de... | ---
+++
@@ -1,8 +1,3 @@
-// Type definitions for countdown.js
-// Project: http://countdownjs.org/
-// Definitions by: Gabriel Juchault https://github.com/gjuchault
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
/// <reference path="countdown.d.ts" />
import { countdown, Timespan, Countdown... |
bb916e3c770ee967b3187f3a1863876777ee61f8 | src/examples/union-values.ts | src/examples/union-values.ts | import { Union, Literal } from '../index'
const Day = Union(
Literal('Sunday'),
Literal('Monday'),
Literal('Tuesday'),
Literal('Wednesday'),
Literal('Thursday'),
Literal('Friday'),
Literal('Saturday'),
)
for (const day of Day.Alternatives.map(lit => lit.value)) {
console.log(`Good morning, it's ${day}... | Add an example of iterating over the values of a union of literals | Add an example of iterating over the values of a union of literals
| TypeScript | mit | pelotom/runtypes,typeetfunc/runtypes,pelotom/runtypes | ---
+++
@@ -0,0 +1,15 @@
+import { Union, Literal } from '../index'
+
+const Day = Union(
+ Literal('Sunday'),
+ Literal('Monday'),
+ Literal('Tuesday'),
+ Literal('Wednesday'),
+ Literal('Thursday'),
+ Literal('Friday'),
+ Literal('Saturday'),
+)
+
+for (const day of Day.Alternatives.map(lit => lit.value)) {
... | |
a8d03e63b6cb6e5b21e90d754a3f158f4ea1bef5 | src/marketplace/offerings/store/utils.spec.ts | src/marketplace/offerings/store/utils.spec.ts | import { OfferingComponent } from '@waldur/marketplace/types';
import { formatOfferingRequest } from './utils';
const OFFERING_FORM_DATA = {
name: 'Offering',
category: {
title: 'VMs',
url: 'URL',
icon: 'URL',
offering_count: 1,
sections: [],
},
type: {
value: 'VMware.VirtualMachine',
... | Add unit tests for quota serialization | Add unit tests for quota serialization [WAL-2551]
| TypeScript | mit | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport | ---
+++
@@ -0,0 +1,116 @@
+import { OfferingComponent } from '@waldur/marketplace/types';
+
+import { formatOfferingRequest } from './utils';
+
+const OFFERING_FORM_DATA = {
+ name: 'Offering',
+ category: {
+ title: 'VMs',
+ url: 'URL',
+ icon: 'URL',
+ offering_count: 1,
+ sections: [],
+ },
+ ty... | |
e3a764f6b83628089b294beb85535103ce4f4f75 | abstract-factory/ts-version.ts | abstract-factory/ts-version.ts | abstract class Item {
protected caption: string;
constructor(caption: string) {
this.caption = caption;
}
abstract makeHtml(): string;
}
abstract class Link extends Item {
protected url: string;
constructor(caption: string, url: string) {
super(caption);
this.url = url;
}
abstract make... | Add ts version of Abstract Factory | Add ts version of Abstract Factory
| TypeScript | mit | Erichain/design-patterns-in-typescript,Erichain/design-patterns-in-typescript | ---
+++
@@ -0,0 +1,57 @@
+abstract class Item {
+ protected caption: string;
+
+ constructor(caption: string) {
+ this.caption = caption;
+ }
+
+ abstract makeHtml(): string;
+}
+
+abstract class Link extends Item {
+ protected url: string;
+
+ constructor(caption: string, url: string) {
+ super(caption);... | |
2e9073b507b8209b4ce49d7e0f164f6b6c63f054 | app/test/unit/stats-store-test.ts | app/test/unit/stats-store-test.ts | import { expect } from 'chai'
import { TestStatsDatabase } from '../helpers/databases'
import { StatsStore } from '../../src/lib/stats'
import {
UiActivityKind,
IUiActivityMonitor,
} from '../../src/ui/lib/ui-activity-monitor'
import { Emitter, Disposable } from 'event-kit'
class FakeActivityMonitor implements I... | Add a test to ensure that statsstore unsubscribes | Add a test to ensure that statsstore unsubscribes
| TypeScript | mit | kactus-io/kactus,kactus-io/kactus,say25/desktop,j-f1/forked-desktop,artivilla/desktop,artivilla/desktop,shiftkey/desktop,j-f1/forked-desktop,shiftkey/desktop,artivilla/desktop,say25/desktop,desktop/desktop,kactus-io/kactus,j-f1/forked-desktop,desktop/desktop,desktop/desktop,say25/desktop,desktop/desktop,artivilla/deskt... | ---
+++
@@ -0,0 +1,72 @@
+import { expect } from 'chai'
+
+import { TestStatsDatabase } from '../helpers/databases'
+
+import { StatsStore } from '../../src/lib/stats'
+import {
+ UiActivityKind,
+ IUiActivityMonitor,
+} from '../../src/ui/lib/ui-activity-monitor'
+import { Emitter, Disposable } from 'event-kit'
+
... | |
0e64070d18f0d3ca7984cdc613bf17ccf4a85568 | app/providers/pax-calculator/pax-calculator.ts | app/providers/pax-calculator/pax-calculator.ts | import { Injectable } from '@angular/core';
import { Http } from '@angular/http';
import 'rxjs/add/operator/map';
import { SoloClass } from '../classes/solo-class';
/*
Generated class for the PaxCalculator provider.
See https://angular.io/docs/ts/latest/guide/dependency-injection.html
for more info on providers... | Add a provider to calculate pax times and convert between classes | Add a provider to calculate pax times and convert between classes
| TypeScript | mit | blatzblaster/ionic-solo,blatzblaster/ionic-solo,blatzblaster/ionic-solo | ---
+++
@@ -0,0 +1,28 @@
+import { Injectable } from '@angular/core';
+import { Http } from '@angular/http';
+import 'rxjs/add/operator/map';
+import { SoloClass } from '../classes/solo-class';
+
+/*
+ Generated class for the PaxCalculator provider.
+
+ See https://angular.io/docs/ts/latest/guide/dependency-injecti... | |
cbcea9b119abd120d8287e7dc5d11dcd2371ae34 | test/unit/Document.spec.ts | test/unit/Document.spec.ts | import { ready } from '../../lib/Document';
describe('ready', () => {
it('should execute the callback immediately if the document is ready', () => {
let document: any = {
readyState: 'complete',
addEventListener: jasmine.createSpy('EventListener')
};
let callback: j... | Add unit tests for Document.ready | Add unit tests for Document.ready
| TypeScript | unknown | michaelbull/zoom.ts,MikeBull94/zoom.ts,MikeBull94/zoom.ts,michaelbull/zoom.ts,MikeBull94/zoom.ts | ---
+++
@@ -0,0 +1,29 @@
+import { ready } from '../../lib/Document';
+
+describe('ready', () => {
+ it('should execute the callback immediately if the document is ready', () => {
+ let document: any = {
+ readyState: 'complete',
+ addEventListener: jasmine.createSpy('EventListener')
+... | |
4e5ac7cf9e0b0e45d3ae0fd4e8760721959b5979 | src/migration/1546730871436-CoreEconRemoveLogos.ts | src/migration/1546730871436-CoreEconRemoveLogos.ts | import {MigrationInterface, QueryRunner} from "typeorm";
import {Chart} from '../model/Chart'
export class CoreEconRemoveLogos1546730871436 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<any> {
const charts = await Chart.find()
for (let chart of charts) {
... | Remove logos from core econ charts | Remove logos from core econ charts
| TypeScript | mit | OurWorldInData/our-world-in-data-grapher,OurWorldInData/owid-grapher,OurWorldInData/owid-grapher,OurWorldInData/owid-grapher,owid/owid-grapher,owid/owid-grapher,OurWorldInData/our-world-in-data-grapher,OurWorldInData/our-world-in-data-grapher,owid/owid-grapher,owid/owid-grapher,OurWorldInData/owid-grapher,OurWorldInDat... | ---
+++
@@ -0,0 +1,19 @@
+import {MigrationInterface, QueryRunner} from "typeorm";
+import {Chart} from '../model/Chart'
+
+export class CoreEconRemoveLogos1546730871436 implements MigrationInterface {
+
+ public async up(queryRunner: QueryRunner): Promise<any> {
+ const charts = await Chart.find()
+ ... | |
ef12ada5d7dd4e45f0956ef7070d677c17966662 | demo/57-add-parent-numbered-lists.ts | demo/57-add-parent-numbered-lists.ts | // Numbered lists - Add parent number in sub number
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { AlignmentType, Document, HeadingLevel, Packer, Paragraph } from "../build";
const doc = new Document({
numbering: {
config: [
{
... | Add parent to numbered list | Add parent to numbered list
| TypeScript | mit | dolanmiu/docx,dolanmiu/docx,dolanmiu/docx | ---
+++
@@ -0,0 +1,88 @@
+// Numbered lists - Add parent number in sub number
+// Import from 'docx' rather than '../build' if you install from npm
+import * as fs from "fs";
+import { AlignmentType, Document, HeadingLevel, Packer, Paragraph } from "../build";
+
+const doc = new Document({
+ numbering: {
+ ... | |
ee2e97fc6f68ee30c7c4d9e4fc0dabbe94f039ec | tests/pos/operators/short-circuit.ts | tests/pos/operators/short-circuit.ts | /*@ foo :: (arr: Array<Immutable, string>) => { boolean | true } */
function foo(arr) {
if (arr.length > 0) {
if (arr[0] === "blah") {
return true;
}
}
return false;
}
/*@ bar :: (arr: Array<Immutable, string>) => { boolean | true } */
function bar(arr) {
if ((arr.length > 0) && (arr[0] === "blah... | Add test for short circuiting of && | Add test for short circuiting of &&
| TypeScript | bsd-3-clause | UCSD-PL/RefScript,UCSD-PL/RefScript,UCSD-PL/RefScript | ---
+++
@@ -0,0 +1,17 @@
+/*@ foo :: (arr: Array<Immutable, string>) => { boolean | true } */
+function foo(arr) {
+ if (arr.length > 0) {
+ if (arr[0] === "blah") {
+ return true;
+ }
+ }
+ return false;
+}
+
+/*@ bar :: (arr: Array<Immutable, string>) => { boolean | true } */
+function bar(arr) {
+ i... | |
7f9a43951468f4f0046e6073be178b12e2187a51 | app/services/crumpet-service.ts | app/services/crumpet-service.ts | /**
* Created by lthompson on 18/06/2016.
*/
import {Injectable} from "@angular/core";
import {Http} from "@angular/http";
import {Observable} from "rxjs/Rx";
import {Crumpet} from "../data/Crumpet";
@Injectable()
export class CrumpetService {
constructor(private http:Http) {}
listCrumpets():Observable<Cru... | Add crumpet HTTP service which returns an Observable of Crumpet[] or throws an observable error. | Add crumpet HTTP service which returns an Observable of Crumpet[] or throws an observable error.
| TypeScript | unlicense | luketn/WonderCrumpet | ---
+++
@@ -0,0 +1,31 @@
+/**
+ * Created by lthompson on 18/06/2016.
+ */
+import {Injectable} from "@angular/core";
+import {Http} from "@angular/http";
+import {Observable} from "rxjs/Rx";
+import {Crumpet} from "../data/Crumpet";
+
+@Injectable()
+export class CrumpetService {
+
+ constructor(private http:Http... | |
e0398b206ec2e4f4edff0809474bad0951a673b3 | src/adhocracy/adhocracy/frontend/static/js/ResourcesBaseSpec.ts | src/adhocracy/adhocracy/frontend/static/js/ResourcesBaseSpec.ts | /// <reference path="../lib/DefinitelyTyped/jasmine/jasmine.d.ts"/>
/// <reference path="_all.d.ts"/>
import JasmineHelpers = require("./JasmineHelpers");
import ResourcesBase = require("./ResourcesBase");
class Sheet1 extends ResourcesBase.Sheet {
public static _meta : ResourcesBase.ISheetMetaApi = {
rea... | Add unit test for ResourcesBase | Add unit test for ResourcesBase
| TypeScript | agpl-3.0 | liqd/adhocracy3.mercator,fhartwig/adhocracy3.mercator,fhartwig/adhocracy3.mercator,liqd/adhocracy3.mercator,fhartwig/adhocracy3.mercator,xs2maverick/adhocracy3.mercator,liqd/adhocracy3.mercator,liqd/adhocracy3.mercator,liqd/adhocracy3.mercator,liqd/adhocracy3.mercator,fhartwig/adhocracy3.mercator,fhartwig/adhocracy3.me... | ---
+++
@@ -0,0 +1,48 @@
+/// <reference path="../lib/DefinitelyTyped/jasmine/jasmine.d.ts"/>
+/// <reference path="_all.d.ts"/>
+
+import JasmineHelpers = require("./JasmineHelpers");
+import ResourcesBase = require("./ResourcesBase");
+
+class Sheet1 extends ResourcesBase.Sheet {
+ public static _meta : Resource... | |
12ac8b7383e607ae228ff838c73ebbdcd56d64a5 | types/custom-functions-runtime/custom-functions-runtime-tests.ts | types/custom-functions-runtime/custom-functions-runtime-tests.ts | /* Note that this is a sample function for the purpose of running the below CustomFunctionsMappings test */
function ADD10(n: number) {
return n + 10;
}
CustomFunctionMappings = {
addTen: ADD10
};
async function getStockValues(ticker: string, handler: CustomFunctions.StreamingHandler<number>) {
const doll... | /* Note that this is a sample function for the purpose of running the below CustomFunctionsMappings test */
function ADD10(n: number) {
return n + 10;
}
CustomFunctionMappings = {
addTen: ADD10
};
async function getStockValues(ticker: string): Promise<number> {
const response = await fetch(`myService.com/... | Update tests to allow a streaming error, and general test cleanup | Update tests to allow a streaming error, and general test cleanup
| TypeScript | mit | dsebastien/DefinitelyTyped,mcliment/DefinitelyTyped,AgentME/DefinitelyTyped,georgemarshall/DefinitelyTyped,georgemarshall/DefinitelyTyped,georgemarshall/DefinitelyTyped,AgentME/DefinitelyTyped,borisyankov/DefinitelyTyped,AgentME/DefinitelyTyped,borisyankov/DefinitelyTyped,georgemarshall/DefinitelyTyped,dsebastien/Defin... | ---
+++
@@ -7,27 +7,61 @@
addTen: ADD10
};
-async function getStockValues(ticker: string, handler: CustomFunctions.StreamingHandler<number>) {
- const dollars = await (await fetch(`myService.com/prices/${ticker}`)).json();
- handler.setResult(dollars);
+async function getStockValues(ticker: string):... |
7d6117cc6936466a104ada267f2e4ed7979357fa | src/common-ui/components/NotifBanner.tsx | src/common-ui/components/NotifBanner.tsx | import React from 'react'
import styled, { ThemeProvider } from 'styled-components'
interface Theme {
wide?: boolean
}
export interface Props extends Theme {
mainText?: string
mainBtnText?: string
onClose: React.MouseEventHandler
onMainBtnClick: React.MouseEventHandler
}
export class NotifBanner ... | Write basic view for update notif banner | Write basic view for update notif banner
| TypeScript | mit | WorldBrain/WebMemex,WorldBrain/WebMemex | ---
+++
@@ -0,0 +1,54 @@
+import React from 'react'
+import styled, { ThemeProvider } from 'styled-components'
+
+interface Theme {
+ wide?: boolean
+}
+
+export interface Props extends Theme {
+ mainText?: string
+ mainBtnText?: string
+ onClose: React.MouseEventHandler
+ onMainBtnClick: React.MouseEv... | |
e078a5ddad24bfc295e868191b60a46b6a80118e | app/src/lib/git/environment.ts | app/src/lib/git/environment.ts | import { envForAuthentication } from './authentication'
import { IGitAccount } from '../../models/git-account'
/**
* Create a set of environment variables to use when invoking a Git
* subcommand that needs to communicate with a remote (i.e. fetch, clone,
* push, pull, ls-remote, etc etc).
*
* The environment vari... | Create stub replacement for envForAuthentication | Create stub replacement for envForAuthentication
| TypeScript | mit | j-f1/forked-desktop,say25/desktop,say25/desktop,artivilla/desktop,say25/desktop,desktop/desktop,kactus-io/kactus,desktop/desktop,desktop/desktop,shiftkey/desktop,kactus-io/kactus,say25/desktop,j-f1/forked-desktop,shiftkey/desktop,j-f1/forked-desktop,artivilla/desktop,shiftkey/desktop,kactus-io/kactus,artivilla/desktop,... | ---
+++
@@ -0,0 +1,25 @@
+import { envForAuthentication } from './authentication'
+import { IGitAccount } from '../../models/git-account'
+
+/**
+ * Create a set of environment variables to use when invoking a Git
+ * subcommand that needs to communicate with a remote (i.e. fetch, clone,
+ * push, pull, ls-remote, et... | |
63b50531d6cf9bafa62e4df783cd17d068b2264b | examples/angular-cli/src/stories/metadata-individual.stories.ts | examples/angular-cli/src/stories/metadata-individual.stories.ts | import { storiesOf } from '@storybook/angular';
import { TokenComponent, ITEMS, DEFAULT_NAME } from './moduleMetadata/token.component';
storiesOf('Metadata|Individual', module)
.add('Individual 1', () => ({
template: `<storybook-simple-token-component [name]="name"></storybook-simple-token-component>`,
props... | import { storiesOf } from '@storybook/angular';
import { TokenComponent, ITEMS, DEFAULT_NAME } from './moduleMetadata/token.component';
storiesOf('Metadata|Individual', module)
.add('Individual 1', () => ({
template: `<storybook-simple-token-component [name]="name"></storybook-simple-token-component>`,
props... | Fix "Metadata|Individual@Individual 1" story - missing declaration | Fix "Metadata|Individual@Individual 1" story - missing declaration
| TypeScript | mit | storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,rhalff/storybook,storybooks/storybook,storybooks/storybook,rhalff/storybook,rhalff/storybook,kadirahq/react-storybook,rhalff/storybook,storybooks/react-storybook,storybooks/storybook,rhalff/storybook,storybooks/react-storybook,kadirahq/react-sto... | ---
+++
@@ -9,7 +9,7 @@
},
moduleMetadata: {
imports: [],
- declarations: [],
+ declarations: [TokenComponent],
providers: [
{
provide: ITEMS, |
558e188c60a81dfdfc147edfd708f37cfd268efc | typescript/graphs/algorithms/prims-mst.ts | typescript/graphs/algorithms/prims-mst.ts | import { Vertex, Edge } from '../graph';
import { Tree, Node } from '../../trees/tree';
type MstEdge<T> = [Vertex<T, number>, number, Vertex<T, number>];
// Prim's Algorithm
function minimalSpanningTree<T>(v: Vertex<T, number>, totalVerticesNum: number): Tree<T> {
const visited: Set<Vertex<T,number>> = new Set([v])... | Add TS Prim's MST algorithm | Add TS Prim's MST algorithm
| TypeScript | mit | hAWKdv/DataStructures,hAWKdv/DataStructures | ---
+++
@@ -0,0 +1,81 @@
+import { Vertex, Edge } from '../graph';
+import { Tree, Node } from '../../trees/tree';
+
+type MstEdge<T> = [Vertex<T, number>, number, Vertex<T, number>];
+
+// Prim's Algorithm
+function minimalSpanningTree<T>(v: Vertex<T, number>, totalVerticesNum: number): Tree<T> {
+ const visited: S... | |
5b20b8bf4160812cd94c7282c9320606ef18eb88 | src/Parsing/Inline/RaisedVoiceContext.ts | src/Parsing/Inline/RaisedVoiceContext.ts | import { TokenizableConvention } from './TokenizableConvention'
import { TokenizerSnapshot } from './TokenizerSnapshot'
import { TokenizerContext } from './TokenizerContext'
export class RaisedVoiceContext extends TokenizerContext {
initialTokenIndex: number
countRemainingDelimiterChars: number
constructor(
... | Add barebones raised voice context | Add barebones raised voice context
| TypeScript | mit | start/up,start/up | ---
+++
@@ -0,0 +1,22 @@
+import { TokenizableConvention } from './TokenizableConvention'
+import { TokenizerSnapshot } from './TokenizerSnapshot'
+import { TokenizerContext } from './TokenizerContext'
+
+export class RaisedVoiceContext extends TokenizerContext {
+ initialTokenIndex: number
+ countRemainingDelimite... | |
f9a1ce531ebf5bf4ce1079df3313ebb5d12d3f14 | src/Misc/KTX2/transcoderManager.ts | src/Misc/KTX2/transcoderManager.ts | import { transcodeTarget, sourceTextureFormat, Transcoder } from './transcoder';
import { Nullable } from '../../types';
import { WASMMemoryManager } from './wasmMemoryManager';
/**
* @hidden
*/
export class TranscoderManager {
public static _Transcoders: Array<typeof Transcoder> = [];
public st... | Add a transcoder manager class | Add a transcoder manager class
| TypeScript | apache-2.0 | RaananW/Babylon.js,sebavan/Babylon.js,sebavan/Babylon.js,sebavan/Babylon.js,RaananW/Babylon.js,NicolasBuecher/Babylon.js,BabylonJS/Babylon.js,Kesshi/Babylon.js,NicolasBuecher/Babylon.js,Kesshi/Babylon.js,BabylonJS/Babylon.js,BabylonJS/Babylon.js,Kesshi/Babylon.js,NicolasBuecher/Babylon.js,RaananW/Babylon.js | ---
+++
@@ -0,0 +1,44 @@
+import { transcodeTarget, sourceTextureFormat, Transcoder } from './transcoder';
+import { Nullable } from '../../types';
+import { WASMMemoryManager } from './wasmMemoryManager';
+
+/**
+ * @hidden
+ */
+export class TranscoderManager {
+
+ public static _Transcoders: Array<typeof Transc... | |
621321e5439cb9f03387c5b86c4276c2c93c5a02 | src/reducers/watcherTree.ts | src/reducers/watcherTree.ts | import { SelectWatcherTreeNodeAction } from '../actions/watcherTree';
import { SELECT_WATCHER_FILE, SELECT_WATCHER_FOLDER } from '../constants';
import { WatcherTreeSettings } from '../types';
const initial: WatcherTreeSettings = {
selectionKind: null,
selectionId: null,
}
export default (
state = initial,
ac... | Add reducer to respond to watcher selection actions. | Add reducer to respond to watcher selection actions.
| TypeScript | mit | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | ---
+++
@@ -0,0 +1,30 @@
+import { SelectWatcherTreeNodeAction } from '../actions/watcherTree';
+import { SELECT_WATCHER_FILE, SELECT_WATCHER_FOLDER } from '../constants';
+import { WatcherTreeSettings } from '../types';
+
+const initial: WatcherTreeSettings = {
+ selectionKind: null,
+ selectionId: null,
+}
+
+exp... | |
091f9dede75d89be1b3f37551893c29fdddd0ec8 | packages/epics/src/types/actions.ts | packages/epics/src/types/actions.ts | export const LAUNCH_KERNEL_SUCCESSFUL = "LAUNCH_KERNEL_SUCCESSFUL";
export type NewKernelAction = {
type: "LAUNCH_KERNEL_SUCCESSFUL",
payload: {
kernel: LocalKernelProps | RemoteKernelProps,
kernelRef: KernelRef,
contentRef: ContentRef,
selectNextKernel: boolean
}
}; | Add types subdirectory for @nteract/epics | Add types subdirectory for @nteract/epics
| TypeScript | bsd-3-clause | rgbkrk/nteract,nteract/composition,nteract/nteract,nteract/composition,nteract/composition,rgbkrk/nteract,nteract/nteract,nteract/nteract,nteract/nteract,nteract/nteract,rgbkrk/nteract,rgbkrk/nteract,rgbkrk/nteract | ---
+++
@@ -0,0 +1,10 @@
+export const LAUNCH_KERNEL_SUCCESSFUL = "LAUNCH_KERNEL_SUCCESSFUL";
+export type NewKernelAction = {
+ type: "LAUNCH_KERNEL_SUCCESSFUL",
+ payload: {
+ kernel: LocalKernelProps | RemoteKernelProps,
+ kernelRef: KernelRef,
+ contentRef: ContentRef,
+ selectNextKernel: boolean
+ ... | |
1f6a9b62cb2c526662546faeeda6e04e14990a3c | src/injectors/forwardContext.spec.ts | src/injectors/forwardContext.spec.ts | import * as React from 'react';
import {expect} from 'chai';
import {forwardContext} from './forwardContext';
describe('forwardContext', () => {
it('should forward value from context to props', () => {
const injector = forwardContext('myProp');
const passedDownProps = {};
injector.propInjector({}, { my... | Add some tests for forwardContext | Add some tests for forwardContext
| TypeScript | mit | alitaheri/react-mixout | ---
+++
@@ -0,0 +1,44 @@
+import * as React from 'react';
+import {expect} from 'chai';
+
+import {forwardContext} from './forwardContext';
+
+describe('forwardContext', () => {
+
+ it('should forward value from context to props', () => {
+ const injector = forwardContext('myProp');
+ const passedDownProps = {... | |
4c07c087e22c556f0b2369cbb090e6b5ce1550bf | src/app/transcription/transcription.ts | src/app/transcription/transcription.ts | import { Annotation } from 'alveo-transcriber';
const STORAGE_VERSION = "att_1.0";
export class Transcription {
remote_id: string;
storage_spec: string;
annotations: Array<Annotation>;
constructor(remote_id: string= "",
annotations: Array<Annotation>,
) {
this.remote_id = remot... | Implement to provide seamless metadata and upgrade route | Implement to provide seamless metadata and upgrade route
| TypeScript | bsd-3-clause | Alveo/alveo-transcriber,Alveo/alveo-transcriber,Alveo/alveo-transcriber,Alveo/alveo-transcriber | ---
+++
@@ -0,0 +1,18 @@
+import { Annotation } from 'alveo-transcriber';
+
+const STORAGE_VERSION = "att_1.0";
+
+export class Transcription {
+ remote_id: string;
+ storage_spec: string;
+ annotations: Array<Annotation>;
+
+ constructor(remote_id: string= "",
+ annotations: Array<Annotation>,
+ ... | |
a009c227726d0bb7e0a9219c7a1636e8b6265c83 | src/Test/Ast/Config/Audio.ts | src/Test/Ast/Config/Audio.ts | import { expect } from 'chai'
import { Up } from '../../../index'
import { insideDocumentAndParagraph } from '../Helpers'
import { AudioNode } from '../../../SyntaxNodes/AudioNode'
import { DocumentNode } from '../../../SyntaxNodes/DocumentNode'
describe('The term that represents video conventions', () => {
const... | Add 2 passing config tests | Add 2 passing config tests
| TypeScript | mit | start/up,start/up | ---
+++
@@ -0,0 +1,34 @@
+import { expect } from 'chai'
+import { Up } from '../../../index'
+import { insideDocumentAndParagraph } from '../Helpers'
+import { AudioNode } from '../../../SyntaxNodes/AudioNode'
+import { DocumentNode } from '../../../SyntaxNodes/DocumentNode'
+
+
+describe('The term that represents vi... | |
6123a88f187b8b725cf7770d30b0a5de920fa774 | ngLabels/App_Script/LabelDataService.ts | ngLabels/App_Script/LabelDataService.ts | /// <reference path="label.d.ts" />
/// <reference path="../scripts/typings/angularjs/angular.d.ts" />
/// <reference path="../scripts/typings/angularjs/angular-resource.d.ts" />
module LabelApplication {
import Rest = LabelApplication.Rest;
import ngr = ng.resource;
// create an interface for the resour... | Add the label Data Service | Add the label Data Service
This could be a lengthy chat.
| TypeScript | apache-2.0 | BillWagner/TypeScriptAngular,BillWagner/TypeScriptAngular,BillWagner/TypeScriptAngular,BillWagner/TypeScriptAngular | ---
+++
@@ -0,0 +1,44 @@
+/// <reference path="label.d.ts" />
+/// <reference path="../scripts/typings/angularjs/angular.d.ts" />
+/// <reference path="../scripts/typings/angularjs/angular-resource.d.ts" />
+
+module LabelApplication {
+ import Rest = LabelApplication.Rest;
+ import ngr = ng.resource;
+
+ /... | |
33cfcd47dc9b3c41f640cd258e1d4f905f6f085f | platforms/platform-alexa/src/output/templates/SendDialogDelegateRequest.ts | platforms/platform-alexa/src/output/templates/SendDialogDelegateRequest.ts | import { BaseOutput, Output, OutputOptions, OutputTemplate } from '@jovotech/framework';
export interface SendDialogDelegateRequestOptions extends OutputOptions {
target: 'AMAZON.Conversations' | 'skill';
}
@Output()
export class SendDialogDelegateRequest extends BaseOutput<SendDialogDelegateRequestOptions> {
bui... | Add output template to send a DialogDelegateRequest | :sparkles: Add output template to send a DialogDelegateRequest
| TypeScript | apache-2.0 | jovotech/jovo-framework-nodejs,jovotech/jovo-framework-nodejs | ---
+++
@@ -0,0 +1,32 @@
+import { BaseOutput, Output, OutputOptions, OutputTemplate } from '@jovotech/framework';
+
+export interface SendDialogDelegateRequestOptions extends OutputOptions {
+ target: 'AMAZON.Conversations' | 'skill';
+}
+
+@Output()
+export class SendDialogDelegateRequest extends BaseOutput<SendDi... | |
ba189ce84b1c279544f9e94fc2318a6bc6ba477e | src/util/matchStringCasing.ts | src/util/matchStringCasing.ts | export default function matchStringCasing(original: string, template: string) {
return original
.split('')
.map(
(letter, i) =>
template[i]
? template[i] === template[i].toUpperCase() ? letter.toUpperCase() : letter.toLowerCase()
: letter,
)
.join('');
}
| Create util function for matching string casing | Create util function for matching string casing
| TypeScript | mit | martinhartt/messagelint,martinhartt/messagelint,martinhartt/messagelint | ---
+++
@@ -0,0 +1,11 @@
+export default function matchStringCasing(original: string, template: string) {
+ return original
+ .split('')
+ .map(
+ (letter, i) =>
+ template[i]
+ ? template[i] === template[i].toUpperCase() ? letter.toUpperCase() : letter.toLowerCase()
+ : letter,
+... | |
24bd8ab233f01c838f0869b9841b2cf7d30af38f | src/helpers/observable.service.ts | src/helpers/observable.service.ts | import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
@Injectable()
export class ObservableHelper {
toPromise(observable: Observable<T>): Promise<T> {
let value;
let promise = new Promise((resolve, reject) => {
observable.subscribe(
v => value = v,
reject,
... | Add helper method to convert an observable to a promise. | Add helper method to convert an observable to a promise.
| TypeScript | bsd-2-clause | ohsu-qin/qiprofile,ohsu-qin/qiprofile,ohsu-qin/qiprofile,ohsu-qin/qiprofile | ---
+++
@@ -0,0 +1,19 @@
+import { Injectable } from '@angular/core';
+import { Observable } from 'rxjs';
+
+@Injectable()
+
+export class ObservableHelper {
+ toPromise(observable: Observable<T>): Promise<T> {
+ let value;
+ let promise = new Promise((resolve, reject) => {
+ observable.subscribe(
+ ... | |
52539db5f0369c29f6caa98e19b46e56dc86245f | app/sorcery/sorcery.service.ts | app/sorcery/sorcery.service.ts | import {Injectable} from 'angular2/core';
import {Observable} from 'rxjs/Rx';
import {Card} from '../card/card';
import {CardService} from '../card/card.service';
import {Sorcery} from './sorcery';
@Injectable()
export class SorceryService {
constructor(private cardService: CardService) { }
private getSorceries... | Create SorceryService and method to get all Sorceries | Create SorceryService and method to get all Sorceries
| TypeScript | mit | christianhg/magicalc,christianhg/magicalc,christianhg/magicalc | ---
+++
@@ -0,0 +1,21 @@
+import {Injectable} from 'angular2/core';
+import {Observable} from 'rxjs/Rx';
+
+import {Card} from '../card/card';
+import {CardService} from '../card/card.service';
+import {Sorcery} from './sorcery';
+
+@Injectable()
+
+export class SorceryService {
+ constructor(private cardService: Ca... | |
36f8b6b65efba6d520e6d7d34f4994a43a5d6713 | client/service/auth.service.ts | client/service/auth.service.ts | import { Injectable } from '@angular/core';
import { Http, Headers, RequestOptions } from '@angular/http';
import { Router } from '@angular/router';
import 'rxjs/add/operator/toPromise';
@Injectable()
export class AuthService {
constructor(private _http: Http, private _router: Router) { }
/**
* Check for... | Add following features - Validate user sessions from local storage - Check for credentials - Get credentials. This get session from server and save in the broswer local storage - Get user details. This returns user details of server session - logout - remove session from the browser | Add following features
- Validate user sessions from local storage
- Check for credentials
- Get credentials. This get session from server and save in the broswer local storage
- Get user details. This returns user details of server session
- logout - remove session from the browser
| TypeScript | mit | shavindraSN/examen,shavindraSN/examen,shavindraSN/examen | ---
+++
@@ -0,0 +1,104 @@
+import { Injectable } from '@angular/core';
+import { Http, Headers, RequestOptions } from '@angular/http';
+import { Router } from '@angular/router';
+import 'rxjs/add/operator/toPromise';
+
+@Injectable()
+export class AuthService {
+ constructor(private _http: Http, private _router: R... | |
2d6e91a2e8396e5702d29d12f30928c9557d7fda | src/remote/countMoves.ts | src/remote/countMoves.ts | import { FileMoveService as fms, datastore } from '../models';
import _ = require("underscore");
import moment = require('moment');
async function countDay(day: number) {
let now = moment().utc();
let start = now.clone().subtract(day, 'days');
let end = start.clone().add(1, 'days');
let query = datastore
.... | Create file move counter script | Create file move counter script
| TypeScript | bsd-2-clause | mustpax/sortmybox,mustpax/sortmybox,mustpax/sortmybox | ---
+++
@@ -0,0 +1,28 @@
+import { FileMoveService as fms, datastore } from '../models';
+import _ = require("underscore");
+import moment = require('moment');
+
+async function countDay(day: number) {
+ let now = moment().utc();
+ let start = now.clone().subtract(day, 'days');
+ let end = start.clone().add(1, 'da... | |
b56f1d18ba9576d92a93cdd536ab8a81a465d6ab | client/Library/Components/PersistentCharacterLibraryViewModel.tsx | client/Library/Components/PersistentCharacterLibraryViewModel.tsx | import * as React from "react";
import { PersistentCharacter } from "../../../common/PersistentCharacter";
import { LibrariesCommander } from "../../Commands/LibrariesCommander";
import { Button } from "../../Components/Button";
import { TextEnricher } from "../../TextEnricher/TextEnricher";
import { FilterCache } from... | Add component for Persistent Character Library | Add component for Persistent Character Library
| TypeScript | mit | cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative | ---
+++
@@ -0,0 +1,75 @@
+import * as React from "react";
+import { PersistentCharacter } from "../../../common/PersistentCharacter";
+import { LibrariesCommander } from "../../Commands/LibrariesCommander";
+import { Button } from "../../Components/Button";
+import { TextEnricher } from "../../TextEnricher/TextEnrich... | |
36089487f99c926e4aaddf9904da46f053558c4b | src/YamlSetting.ts | src/YamlSetting.ts | /// <reference types="node" />
import * as fs from 'fs';
import Setting from './Setting';
import yaml from 'yaml';
class YamlSetting extends Setting {
_filePath: string = 'settings.yml';
private readonly _ext: string = 'yml';
constructor( filePath?: string ){
super();
if(filePath){
this._filePath =... | Add yaml setting file support | Add yaml setting file support
| TypeScript | mit | woodstage/node-app-settings,woodstage/node-app-settings | ---
+++
@@ -0,0 +1,42 @@
+/// <reference types="node" />
+import * as fs from 'fs';
+import Setting from './Setting';
+import yaml from 'yaml';
+
+class YamlSetting extends Setting {
+ _filePath: string = 'settings.yml';
+ private readonly _ext: string = 'yml';
+
+ constructor( filePath?: string ){
+ super();
+... | |
76c48d03a25df69f54e5f31bbec162d81d03d20a | test/types/map.test-d.ts | test/types/map.test-d.ts | import {expectType} from 'tsd';
import * as fl from '../../index.js';
const resolved = fl.resolve (42);
const rejected = fl.reject ('uh-oh');
const resolvedPar = fl.Par (resolved);
const rejectedPar = fl.Par (rejected);
// Standard usage on Future instances.
expectType<fl.FutureInstance<never, string>> (fl.map (Str... | Add typescript type tests for map | Add typescript type tests for map
| TypeScript | mit | fluture-js/Fluture,fluture-js/Fluture,fluture-js/Fluture | ---
+++
@@ -0,0 +1,21 @@
+import {expectType} from 'tsd';
+
+import * as fl from '../../index.js';
+
+const resolved = fl.resolve (42);
+const rejected = fl.reject ('uh-oh');
+
+const resolvedPar = fl.Par (resolved);
+const rejectedPar = fl.Par (rejected);
+
+// Standard usage on Future instances.
+expectType<fl.Futu... | |
1bc1c5ae173f5ec397cd8db7660df8c2ffb92aca | src/state/StateService2.ts | src/state/StateService2.ts | /// <reference path="../../typings/rx-dom/rx.dom.d.ts" />
/// <reference path="../../node_modules/rx/ts/rx.all.d.ts" />
import * as rx from "rx";
import * as rxdom from "rx.dom";
import {Node} from "../Graph";
export class StateContext2 {
private nodes: Node[] = [];
private alpha: number = 0;
public upd... | Add empty state service using request animation frame. | Add empty state service using request animation frame.
| TypeScript | mit | mapillary/mapillary-js,mapillary/mapillary-js | ---
+++
@@ -0,0 +1,50 @@
+/// <reference path="../../typings/rx-dom/rx.dom.d.ts" />
+/// <reference path="../../node_modules/rx/ts/rx.all.d.ts" />
+
+import * as rx from "rx";
+import * as rxdom from "rx.dom";
+
+import {Node} from "../Graph";
+
+export class StateContext2 {
+ private nodes: Node[] = [];
+ priv... | |
f61101f3f57c135dc551fb1557f35b418b08789d | src/datasets/utils.spec.ts | src/datasets/utils.spec.ts | import { xBetweenDates } from './utils';
describe('DatasetUtils', () => {
describe('xBetweenDates', () => {
it('should create function', () => {
expect(xBetweenDates(new Date(), new Date())).toBeInstanceOf(Function);
});
it('should return whether input date in range or not', () => {
... | Add tests for dataset utils | Add tests for dataset utils
| TypeScript | apache-2.0 | googleinterns/guide-doge,googleinterns/guide-doge,googleinterns/guide-doge | ---
+++
@@ -0,0 +1,19 @@
+import { xBetweenDates } from './utils';
+
+describe('DatasetUtils', () => {
+ describe('xBetweenDates', () => {
+ it('should create function', () => {
+ expect(xBetweenDates(new Date(), new Date())).toBeInstanceOf(Function);
+ });
+
+ it('should return whether input date in r... | |
32e4d0bf8dedc6ad9a0b413498bcc1988f6bcca7 | ui/src/tempVars/components/TemplatePreviewList.tsx | ui/src/tempVars/components/TemplatePreviewList.tsx | import React, {PureComponent} from 'react'
import uuid from 'uuid'
import {ErrorHandling} from 'src/shared/decorators/errors'
import FancyScrollbar from 'src/shared/components/FancyScrollbar'
import TemplatePreviewListItem from 'src/tempVars/components/TemplatePreviewListItem'
import {TEMPLATE_PREVIEW_LIST_DIMENSIONS ... | import React, {PureComponent} from 'react'
import uuid from 'uuid'
import {ErrorHandling} from 'src/shared/decorators/errors'
import FancyScrollbar from 'src/shared/components/FancyScrollbar'
import TemplatePreviewListItem from 'src/tempVars/components/TemplatePreviewListItem'
import {TEMPLATE_PREVIEW_LIST_DIMENSIONS ... | Remove offset if displaying an unscrollable number of items in templates previews | Remove offset if displaying an unscrollable number of items in templates previews
| TypeScript | mit | influxdata/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,li-ang/influxdb,nooproblem/influxdb,nooproblem/influxdb,li-ang/influxdb,nooproblem/influxdb,influxdb/influxdb,influxdb/influxdb,influxdb/influxdb,influxdb/influxdb,in... | ---
+++
@@ -42,8 +42,8 @@
private get resultsListHeight() {
const {items} = this.props
const count = Math.min(items.length, RESULTS_TO_DISPLAY)
-
- return count * (LI_HEIGHT + LI_MARGIN_BOTTOM) - OFFSET
+ const scrollOffset = count > RESULTS_TO_DISPLAY ? OFFSET : 0
+ return count * (LI_HEIGHT + ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.