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 |
|---|---|---|---|---|---|---|---|---|---|---|
73415cd4b02160eb30e393baf8beca9a00c8d550 | build/server/server.env=node.ts | build/server/server.env=node.ts | class $mol_build_server extends $mol_server {
expressGenerator() {
return ( req : any , res : any , next : () => void )=> {
try {
return this.generator( req.url ) || next()
} catch( error ) {
$mol_atom_restore( error )
if( req.url.match( /\.js$/ ) ) {
console.error( error )
res.send( `c... | class $mol_build_server extends $mol_server {
expressGenerator() {
return ( req : any , res : any , next : () => void )=> {
try {
return this.generator( req.url ) || next()
} catch( error ) {
$mol_atom_restore( error )
if( req.url.match( /\.js$/ ) ) {
console.error( error )
res.send( `c... | Use 8080 port instead of 80 by default to reduce errors on some systems. | Use 8080 port instead of 80 by default to reduce errors on some systems.
| TypeScript | mit | eigenmethod/mol,nin-jin/mol,nin-jin/mol,eigenmethod/mol,nin-jin/mol,eigenmethod/mol | ---
+++
@@ -36,7 +36,7 @@
}
port() {
- return 80
+ return 8080
}
} |
e9330d49949e64a103cb9f7eb303c4b2cb300b90 | tests/cases/fourslash/codeFixReplaceQualifiedNameWithIndexedAccessType01.ts | tests/cases/fourslash/codeFixReplaceQualifiedNameWithIndexedAccessType01.ts | /// <reference path='fourslash.ts' />
//// export interface Foo {
//// bar: string;
//// }
//// const x: [|Foo.bar|] = ""
verify.rangeAfterCodeFix(`Foo["bar"]`);
| Add test case for code fixes on qualified names used instead of indexed access types. | Add test case for code fixes on qualified names used instead of indexed access types.
| TypeScript | apache-2.0 | kitsonk/TypeScript,weswigham/TypeScript,alexeagle/TypeScript,TukekeSoft/TypeScript,kitsonk/TypeScript,donaldpipowitch/TypeScript,SaschaNaz/TypeScript,kitsonk/TypeScript,synaptek/TypeScript,SaschaNaz/TypeScript,minestarks/TypeScript,SaschaNaz/TypeScript,donaldpipowitch/TypeScript,weswigham/TypeScript,alexeagle/TypeScrip... | ---
+++
@@ -0,0 +1,8 @@
+/// <reference path='fourslash.ts' />
+
+//// export interface Foo {
+//// bar: string;
+//// }
+//// const x: [|Foo.bar|] = ""
+
+verify.rangeAfterCodeFix(`Foo["bar"]`); | |
d25ff39991efef7d7d7651f1517061defc26f55d | ui/src/shared/components/overlay/OverlayHeading.tsx | ui/src/shared/components/overlay/OverlayHeading.tsx | import React, {PureComponent, ReactChildren} from 'react'
interface Props {
children?: ReactChildren
title: string
onDismiss?: () => void
}
class OverlayHeading extends PureComponent<Props> {
constructor(props: Props) {
super(props)
}
public render() {
const {title, onDismiss, children} = this.pr... | import React, {PureComponent, ReactChildren} from 'react'
interface Props {
children?: ReactChildren | JSX.Element
title: string
onDismiss?: () => void
}
class OverlayHeading extends PureComponent<Props> {
constructor(props: Props) {
super(props)
}
public render() {
const {title, onDismiss, child... | Allow plain HTML elements as children | Allow plain HTML elements as children
| TypeScript | mit | nooproblem/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,influxdata/influxdb,influxdb/influxdb,influxdb/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,influxdata/influxdb,nooproblem/influxdb,influxdb/influxdb,li-ang/influxdb,nooproblem/influxdb,nooproblem/influ... | ---
+++
@@ -1,7 +1,7 @@
import React, {PureComponent, ReactChildren} from 'react'
interface Props {
- children?: ReactChildren
+ children?: ReactChildren | JSX.Element
title: string
onDismiss?: () => void
} |
d02e7c30fe3d1be406043bb02713db32718597e8 | src/lib/common/event-registry.ts | src/lib/common/event-registry.ts | import {
ElementRef,
Injectable,
Renderer2
} from '@angular/core';
type UnlistenerMap = WeakMap<EventListener, Function>;
@Injectable()
export class EventRegistry {
private unlisteners: Map<string, UnlistenerMap> = new Map<string, UnlistenerMap>();
constructor() { }
listen_(renderer: Renderer2, type: st... | Add EventRegistry for Listen/Unlisten management | feat(infrastructure): Add EventRegistry for Listen/Unlisten management
| TypeScript | mit | trimox/angular-mdc-web,trimox/angular-mdc-web | ---
+++
@@ -0,0 +1,34 @@
+import {
+ ElementRef,
+ Injectable,
+ Renderer2
+} from '@angular/core';
+
+type UnlistenerMap = WeakMap<EventListener, Function>;
+
+@Injectable()
+export class EventRegistry {
+ private unlisteners: Map<string, UnlistenerMap> = new Map<string, UnlistenerMap>();
+
+ constructor() { }
... | |
a6448afdf3e0e490889caf6e397f210db90d4d2f | test/method-decorators/deprecated.spec.ts | test/method-decorators/deprecated.spec.ts | import { DeprecatedMethod } from './../../src/';
describe('DeprecatedMethod decorator', () => {
it('should throw an exception', () => {
class TestDeprecatedMethodDecorator {
@DeprecatedMethod()
method() {
console.log('I am a deprecated method');
}
... | Add test for deprecated method decorator | Add test for deprecated method decorator
| TypeScript | mit | semagarcia/typescript-decorators,semagarcia/typescript-decorators | ---
+++
@@ -0,0 +1,29 @@
+import { DeprecatedMethod } from './../../src/';
+
+describe('DeprecatedMethod decorator', () => {
+
+ it('should throw an exception', () => {
+ class TestDeprecatedMethodDecorator {
+ @DeprecatedMethod()
+ method() {
+ console.log('I am a depre... | |
8c5130a3d8981fea9cb2caeaf5491c1ea7788087 | test/reducers/slides/actions/openNewDeck-spec.ts | test/reducers/slides/actions/openNewDeck-spec.ts | import { expect } from 'chai';
import { OPEN_NEW_DECK } 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 test for OPEN_NEW_DECK for slides reducer | test: Add test for OPEN_NEW_DECK for slides reducer
| TypeScript | mit | chengsieuly/devdecks,Team-CHAD/DevDecks,Team-CHAD/DevDecks,Team-CHAD/DevDecks,chengsieuly/devdecks,DevDecks/devdecks,DevDecks/devdecks,chengsieuly/devdecks,DevDecks/devdecks | ---
+++
@@ -0,0 +1,22 @@
+import { expect } from 'chai';
+import { OPEN_NEW_DECK } 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:... | |
831ccc6644fe8677c816c4fc8ead386a59861fb1 | src/parser/hunter/shared/modules/talents/ChimaeraShot.tsx | src/parser/hunter/shared/modules/talents/ChimaeraShot.tsx | import React from 'react';
import Analyzer, { SELECTED_PLAYER } from 'parser/core/Analyzer';
import SPELLS from 'common/SPELLS/index';
import ItemDamageDone from 'interface/ItemDamageDone';
import AverageTargetsHit from 'interface/others/AverageTargetsHit';
import Statistic from 'interface/statistics/Statistic';
import... | Update Chimaera Shot to also exist for Marksmanship | [Hunter] Update Chimaera Shot to also exist for Marksmanship
| TypeScript | agpl-3.0 | yajinni/WoWAnalyzer,sMteX/WoWAnalyzer,anom0ly/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,Juko8/WoWAnalyzer,sMteX/WoWAnalyzer,yajinni/WoWAnalyzer,yajinni/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,sMteX/WoWAnalyzer,anom0ly/WoWAnalyzer,anom0ly/WoWAnalyzer,anom0ly/WoWAnalyzer,Juko8/WoWAnalyzer,Juko8/WoWAnalyzer,yajinni/WoWAnalyzer,WoWA... | ---
+++
@@ -0,0 +1,55 @@
+import React from 'react';
+import Analyzer, { SELECTED_PLAYER } from 'parser/core/Analyzer';
+import SPELLS from 'common/SPELLS/index';
+import ItemDamageDone from 'interface/ItemDamageDone';
+import AverageTargetsHit from 'interface/others/AverageTargetsHit';
+import Statistic from 'interf... | |
b0118425f0eb0ae28115c8bfba931797a7dd86f8 | test/views/components/note_list_test.ts | test/views/components/note_list_test.ts | import * as helper from '../../test_helper';
var remoteConsole = require('remote').require('console')
describe('note-list', () => {
var noteList = null;
helper.useComponent(
'../../build/views/components/note-list/note-list.html',
(_) => { noteList = _ },
'ul', 'adv-note-list');
describe('#addItem',... | Add tests for note-list components | Add tests for note-list components
| TypeScript | mit | ueokande/adversaria,ueokande/adversaria,ueokande/adversaria | ---
+++
@@ -0,0 +1,46 @@
+import * as helper from '../../test_helper';
+var remoteConsole = require('remote').require('console')
+
+describe('note-list', () => {
+ var noteList = null;
+ helper.useComponent(
+ '../../build/views/components/note-list/note-list.html',
+ (_) => { noteList = _ },
+ 'ul', 'adv-... | |
ca2219af4958d19fc202c670e1f583135457b49b | src/test/using_injector_test.ts | src/test/using_injector_test.ts | import {
it,
describe,
expect,
inject
} from 'angular2/testing';
import {
APP_ID
} from 'angular2/angular2';
describe('default test injector', () => {
it('should provide default pipes', inject([APP_ID], (id) => {
expect(id).toBe('a');
}));
});
| Add tests using the injector | Add tests using the injector
| TypeScript | apache-2.0 | katonap/ng2-test-seed,katonap/ng2-test-seed,katonap/ng2-test-seed | ---
+++
@@ -0,0 +1,16 @@
+import {
+ it,
+ describe,
+ expect,
+ inject
+} from 'angular2/testing';
+import {
+ APP_ID
+} from 'angular2/angular2';
+
+
+describe('default test injector', () => {
+ it('should provide default pipes', inject([APP_ID], (id) => {
+ expect(id).toBe('a');
+ }));
+}); | |
1c25fc418e948df22364b33338b81f9d7e1d95ff | bids-validator/src/types/issues.ts | bids-validator/src/types/issues.ts | const warning = Symbol('warning')
const error = Symbol('error')
const ignore = Symbol('ignore')
type Severity = typeof warning | typeof error | typeof ignore
export interface IssueFileDetail {
name: string
path: string
relativePath: string
}
export interface IssueFile {
key: string
code: number
file: Issu... | Add issue types from OpenNeuro | Add issue types from OpenNeuro
| TypeScript | mit | nellh/bids-validator,nellh/bids-validator,nellh/bids-validator | ---
+++
@@ -0,0 +1,35 @@
+const warning = Symbol('warning')
+const error = Symbol('error')
+const ignore = Symbol('ignore')
+type Severity = typeof warning | typeof error | typeof ignore
+
+export interface IssueFileDetail {
+ name: string
+ path: string
+ relativePath: string
+}
+
+export interface IssueFile {
+ ... | |
ab6479243b7da21316cf872490bd9b3db45df645 | functions/src/patch/firestore-api.ts | functions/src/patch/firestore-api.ts | export interface FirestoreApiBody {
fields: MapValue
}
type FieldValue =
StringValue |
BooleanValue |
ArrayValue |
IntegerValue |
DoubleValue |
MapValue |
NullValue |
ReferenceValue |
TimestampValue
interface StringValue {
'stringValue': string
}
interface BooleanValue {
... | Add firestore api body types | Add firestore api body types
| TypeScript | apache-2.0 | squanchy-dev/squanchy-firebase,squanchy-dev/squanchy-firebase | ---
+++
@@ -0,0 +1,52 @@
+export interface FirestoreApiBody {
+ fields: MapValue
+}
+
+type FieldValue =
+ StringValue |
+ BooleanValue |
+ ArrayValue |
+ IntegerValue |
+ DoubleValue |
+ MapValue |
+ NullValue |
+ ReferenceValue |
+ TimestampValue
+
+interface StringValue {
+ 'string... | |
737d1170242ebb6ea0478dd0459d2d6d31d5385b | pages/open-source.tsx | pages/open-source.tsx | import { NextPage } from "next"
import Head from "next/head"
import Page from "../layouts/main"
const OpenSourcePage: NextPage = () => {
return (
<Page>
<Head>
<title>Open Source :: Joseph Duffy, iOS Developer</title>
<meta name="description" content="Open source projects created or contrib... | Add start of Open Source page | Add start of Open Source page
| TypeScript | mit | JosephDuffy/josephduffy.co.uk,JosephDuffy/josephduffy.co.uk,JosephDuffy/josephduffy.co.uk | ---
+++
@@ -0,0 +1,20 @@
+import { NextPage } from "next"
+import Head from "next/head"
+import Page from "../layouts/main"
+
+const OpenSourcePage: NextPage = () => {
+ return (
+ <Page>
+ <Head>
+ <title>Open Source :: Joseph Duffy, iOS Developer</title>
+ <meta name="description" content="Op... | |
47d86ae32c670c29635f164ac47d0ee1122e8535 | tests/unit/adapters/active-model-adapter-errors-test.ts | tests/unit/adapters/active-model-adapter-errors-test.ts | import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import Pretender from 'pretender';
import { TestContext } from 'ember-test-helpers';
let pretender: Pretender;
import DS from 'ember-data';
import attr from 'ember-data/attr';
import ActiveModelAdapter from 'active-model-adapter';
class B... | Add test for adapter errors | Add test for adapter errors
| TypeScript | mit | ember-data/active-model-adapter,ember-data/active-model-adapter,ember-data/active-model-adapter | ---
+++
@@ -0,0 +1,80 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+import Pretender from 'pretender';
+import { TestContext } from 'ember-test-helpers';
+
+let pretender: Pretender;
+
+import DS from 'ember-data';
+import attr from 'ember-data/attr';
+import ActiveModelAdapter ... | |
1fae391e07620a33381f14c61ebc4357deecf150 | src/core/dummies.ts | src/core/dummies.ts | import { Dummy, TextDummy, TypesDummy } from '../../test/helpers';
import { VcsAuthenticationInfo, VcsAuthenticationTypes } from './vcs';
export class VcsAuthenticationInfoDummy extends Dummy<VcsAuthenticationInfo> {
private type = new TypesDummy<VcsAuthenticationTypes>([
VcsAuthenticationTypes.BASIC,
... | Add vcs authentication info dummy | Add vcs authentication info dummy
| TypeScript | mit | seokju-na/geeks-diary,seokju-na/geeks-diary,seokju-na/geeks-diary | ---
+++
@@ -0,0 +1,26 @@
+import { Dummy, TextDummy, TypesDummy } from '../../test/helpers';
+import { VcsAuthenticationInfo, VcsAuthenticationTypes } from './vcs';
+
+
+export class VcsAuthenticationInfoDummy extends Dummy<VcsAuthenticationInfo> {
+ private type = new TypesDummy<VcsAuthenticationTypes>([
+ ... | |
074e6763fa334c50a5d3064fc26c954700748381 | src/__tests__/github_issues/271-test.ts | src/__tests__/github_issues/271-test.ts | import { SchemaComposer, graphql } from 'graphql-compose';
import { composeMongoose } from '../../index';
import { mongoose } from '../../__mocks__/mongooseCommon';
import { Document } from 'mongoose';
import { convertSchemaToGraphQL } from '../../../src/fieldsConverter';
const schemaComposer = new SchemaComposer<{ req... | Add test for nested projection | Add test for nested projection
Not uet failing but I have set mongoose debug to true which will show the find query being run during the test.
This shows that the entire Author subdocument is being fetching.
| TypeScript | mit | nodkz/graphql-compose-mongoose | ---
+++
@@ -0,0 +1,86 @@
+import { SchemaComposer, graphql } from 'graphql-compose';
+import { composeMongoose } from '../../index';
+import { mongoose } from '../../__mocks__/mongooseCommon';
+import { Document } from 'mongoose';
+import { convertSchemaToGraphQL } from '../../../src/fieldsConverter';
+const schemaCo... | |
e6f786759ad8b51e2f574437e17aede6989876ab | src/tests/integration/HttpTests.ts | src/tests/integration/HttpTests.ts | /*
Copyright 2019 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in ... | Add tests to check health check endpoint | Add tests to check health check endpoint
| 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,51 @@
+/*
+Copyright 2019 The Matrix.org Foundation C.I.C.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless requir... | |
d0d1ee918ff4e5ba72c6b350741f57fa723fdbea | tests/cases/fourslash/completionListForUnicodeEscapeName.ts | tests/cases/fourslash/completionListForUnicodeEscapeName.ts | /// <reference path='fourslash.ts' />
////function \u0042 () { /*0*/ }
////export default function \u0043 () { /*1*/ }
////class \u0041 { /*2*/ }
/////*3*/
goTo.marker("0");
verify.not.completionListContains("B");
verify.not.completionListContains("\u0042");
goTo.marker("2");
verify.not.completionListCo... | Add test for using unicode escape as function name | Add test for using unicode escape as function name
| TypeScript | apache-2.0 | chocolatechipui/TypeScript,RReverser/TypeScript,kpreisser/TypeScript,nojvek/TypeScript,kpreisser/TypeScript,TukekeSoft/TypeScript,shanexu/TypeScript,HereSinceres/TypeScript,jdavidberger/TypeScript,pcan/TypeScript,DLehenbauer/TypeScript,moander/TypeScript,zhengbli/TypeScript,Eyas/TypeScript,enginekit/TypeScript,nojvek/T... | ---
+++
@@ -0,0 +1,27 @@
+/// <reference path='fourslash.ts' />
+
+////function \u0042 () { /*0*/ }
+////export default function \u0043 () { /*1*/ }
+////class \u0041 { /*2*/ }
+/////*3*/
+
+goTo.marker("0");
+verify.not.completionListContains("B");
+verify.not.completionListContains("\u0042");
+
+goTo.marker("2");
... | |
c7699bd1e179f68f0210ddbe33de295544f6126b | ee_tests/src/functional/screenshot.spec.ts | ee_tests/src/functional/screenshot.spec.ts | import { browser } from 'protractor';
import * as support from '../specs/support';
import { LandingPage } from '../specs/page_objects';
describe('Landing Page', () => {
beforeEach( async () => {
await support.desktopTestSetup();
let landingPage = new LandingPage();
await landingPage.open();
});
fi... | Add functional test for writeScreenshot | Add functional test for writeScreenshot
| TypeScript | apache-2.0 | ldimaggi/fabric8-test,ldimaggi/fabric8-test,ldimaggi/fabric8-test,ldimaggi/fabric8-test,ldimaggi/fabric8-test,ldimaggi/fabric8-test | ---
+++
@@ -0,0 +1,19 @@
+import { browser } from 'protractor';
+import * as support from '../specs/support';
+import { LandingPage } from '../specs/page_objects';
+
+describe('Landing Page', () => {
+
+ beforeEach( async () => {
+ await support.desktopTestSetup();
+
+ let landingPage = new LandingPage();
+ ... | |
38f78b8978d1904ef96d09621990879c0f420989 | source/push3js/pipeline.ts | source/push3js/pipeline.ts | import { EventDispatcher } from "../util/eventdispatcher";
export abstract class Pipeline extends EventDispatcher {
constructor() {
super();
}
abstract pipe(event: any): void;
destroy(): void {
this.removeAllListeners();
}
} | Define bas class of threejs pushers | Define bas class of threejs pushers
| TypeScript | apache-2.0 | Tomella/explorer-3d,Tomella/explorer-3d,Tomella/explorer-3d | ---
+++
@@ -0,0 +1,11 @@
+import { EventDispatcher } from "../util/eventdispatcher";
+
+export abstract class Pipeline extends EventDispatcher {
+ constructor() {
+ super();
+ }
+ abstract pipe(event: any): void;
+ destroy(): void {
+ this.removeAllListeners();
+ }
+} | |
11553eba932b2718208d591b033977f0ed546d7e | app/src/redux/index.ts | app/src/redux/index.ts | import { combineReducers } from "redux";
import { all } from "redux-saga/effects";
import * as signIn from "./sign-in";
export const reducer = combineReducers({ signIn: signIn.reducer });
export function* saga() {
yield all([...signIn.sagas]);
}
| Create root saga and reducer | Create root saga and reducer
| TypeScript | mit | raviqqe/code2d,raviqqe/code2d,raviqqe/code2d,raviqqe/code2d | ---
+++
@@ -0,0 +1,10 @@
+import { combineReducers } from "redux";
+import { all } from "redux-saga/effects";
+
+import * as signIn from "./sign-in";
+
+export const reducer = combineReducers({ signIn: signIn.reducer });
+
+export function* saga() {
+ yield all([...signIn.sagas]);
+} | |
2060918c050b7c5af83cac14e02c254f2cbab61a | src/Test/Ast/HeadingLevels2AndUp.ts | src/Test/Ast/HeadingLevels2AndUp.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 { DocumentNode } fro... | Add failing level-2 heading node test | Add failing level-2 heading node test
| TypeScript | mit | start/up,start/up | ---
+++
@@ -0,0 +1,39 @@
+/// <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/Lin... | |
5c83025a6fbc185e4228e9a6d16b3155b7609f28 | src/modules/users/repository.ts | src/modules/users/repository.ts | import { Component } from '@nestjs/common'
import * as fs from 'fs'
import { User } from './entity'
import * as path from 'path'
@Component()
export class UsersRepository<Object extends User> {
root: string
constructor(root: string) {
this.root = root
if (!fs.existsSync(root)) fs.mkdirSync(ro... | Add base FS respository class | Add base FS respository class
| TypeScript | apache-2.0 | m1cr0man/m1cr0blog,m1cr0man/m1cr0blog,m1cr0man/m1cr0blog | ---
+++
@@ -0,0 +1,53 @@
+import { Component } from '@nestjs/common'
+import * as fs from 'fs'
+import { User } from './entity'
+import * as path from 'path'
+
+@Component()
+export class UsersRepository<Object extends User> {
+ root: string
+
+ constructor(root: string) {
+ this.root = root
+
+ i... | |
f11504922f238b9a52aff7f1a079482e7966b7c1 | types/main.d.ts | types/main.d.ts | export class TestCase {
expect(returnValue): this
describe(message: string): this
should(message: string): this
assert(message: string, assertFunction: (actualReturnValue: any) => void): this
}
export function test(testFn: Function, definerFn: Function): void
export function given(...args: any[]): TestCase
| export class TestCase {
expect(returnValue: any): this
describe(message: string): this
should(message: string): this
assert(message: string, assertFunction: (actualReturnValue: any) => void): this
}
export function test(testFn: Function, definerFn: Function): void
export function given(...args: any[]): TestCas... | Work with `noImplicitAny` ts compiler option | Work with `noImplicitAny` ts compiler option
If the TypeScript compiler is set to `strict` or has `noImplicitAny` this will cause a project not to compile | TypeScript | mit | mikec/sazerac | ---
+++
@@ -1,5 +1,5 @@
export class TestCase {
- expect(returnValue): this
+ expect(returnValue: any): this
describe(message: string): this
should(message: string): this
assert(message: string, assertFunction: (actualReturnValue: any) => void): this |
9de26873e9dc59035b3e10c1105af533573812cc | test/vuex-mockstorage-cyclic.spec.ts | test/vuex-mockstorage-cyclic.spec.ts | /**
* Created by rossng on 02/04/2018.
*/
import { Store } from 'vuex'
import Vuex = require('vuex')
import Vue = require('vue')
import VuexPersistence, { MockStorage } from '../dist'
import { assert, expect, should } from 'chai'
Vue.use(Vuex)
const mockStorage = new MockStorage()
const vuexPersist = new VuexPersist... | Add (failing) test for cyclic object persistence | Add (failing) test for cyclic object persistence
| TypeScript | mit | championswimmer/vuex-persist,championswimmer/vuex-persist | ---
+++
@@ -0,0 +1,36 @@
+/**
+ * Created by rossng on 02/04/2018.
+ */
+import { Store } from 'vuex'
+import Vuex = require('vuex')
+import Vue = require('vue')
+import VuexPersistence, { MockStorage } from '../dist'
+import { assert, expect, should } from 'chai'
+
+Vue.use(Vuex)
+const mockStorage = new MockStorage... | |
211be0ae69f217db437ca13185ad76586aab5054 | tests/cases/fourslash/completionListInImportClause06.ts | tests/cases/fourslash/completionListInImportClause06.ts | /// <reference path='fourslash.ts' />
// @typeRoots: T1,T2
// @Filename: app.ts
////import * as A from "[|/*1*/|]";
// @Filename: T1/a__b/index.d.ts
////export declare let x: number;
// @Filename: T2/a__b/index.d.ts
////export declare let x: number;
// Confirm that entries are de-dup'd.
verify.comple... | Add regression test for de-dup'ing. | Add regression test for de-dup'ing.
| TypeScript | apache-2.0 | basarat/TypeScript,nojvek/TypeScript,basarat/TypeScript,SaschaNaz/TypeScript,Microsoft/TypeScript,alexeagle/TypeScript,alexeagle/TypeScript,RyanCavanaugh/TypeScript,kpreisser/TypeScript,nojvek/TypeScript,kitsonk/TypeScript,microsoft/TypeScript,kpreisser/TypeScript,SaschaNaz/TypeScript,Microsoft/TypeScript,kitsonk/TypeS... | ---
+++
@@ -0,0 +1,17 @@
+/// <reference path='fourslash.ts' />
+
+// @typeRoots: T1,T2
+
+// @Filename: app.ts
+////import * as A from "[|/*1*/|]";
+
+// @Filename: T1/a__b/index.d.ts
+////export declare let x: number;
+
+// @Filename: T2/a__b/index.d.ts
+////export declare let x: number;
+
+// Confirm that entries ... | |
3f05fcf6868a9ad08c6bf927cbf2fd5cba1dadc4 | packages/hub/db/migrations/20220301101637933_create-card-space-profiles-for-existing-merchants.ts | packages/hub/db/migrations/20220301101637933_create-card-space-profiles-for-existing-merchants.ts | import { MigrationBuilder, ColumnDefinitions } from 'node-pg-migrate';
import shortUuid from 'short-uuid';
export const shorthands: ColumnDefinitions | undefined = undefined;
export async function up(pgm: MigrationBuilder): Promise<void> {
let merchantInfoIdsWithoutCardSpaceQuery =
'SELECT merchant_infos.id FRO... | Create card spaces for merchants | Create card spaces for merchants
| TypeScript | mit | cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack | ---
+++
@@ -0,0 +1,35 @@
+import { MigrationBuilder, ColumnDefinitions } from 'node-pg-migrate';
+import shortUuid from 'short-uuid';
+
+export const shorthands: ColumnDefinitions | undefined = undefined;
+
+export async function up(pgm: MigrationBuilder): Promise<void> {
+ let merchantInfoIdsWithoutCardSpaceQuery =... | |
ae8754822e75c07b6b51dc6024b2594045632ddb | src/index.ts | src/index.ts | import * as readline from "readline";
import {CommandParser, BattlelineEvent, Position, Card} from "./command_parser";
import {StrategyRunner} from "./strategy_runner";
import {RandomStrategy} from "./random_strategy";
// Parse all commands as the enter the system
const commandParser = new CommandParser();
// Configu... | Add main program entry point and initialize components | feat(Index): Add main program entry point and initialize components
| TypeScript | mit | grantpatten/battleline-ai,grantpatten/battleline-ai | ---
+++
@@ -0,0 +1,47 @@
+import * as readline from "readline";
+import {CommandParser, BattlelineEvent, Position, Card} from "./command_parser";
+import {StrategyRunner} from "./strategy_runner";
+import {RandomStrategy} from "./random_strategy";
+
+// Parse all commands as the enter the system
+const commandParser ... | |
845895559059dc4f34ad1329942803187e18902c | server/src/utils.ts | server/src/utils.ts |
/*#######.
########",#:
#########',##".
##'##'## .##',##.
## ## ## # ##",#.
## ## ## ## ##'
## ## ## :##
## ## ##*/
import { readFile as readFileAsync } from 'fs'
export const readFile = (filePath: string) =>
new Promise<Buffer>((resolve, reject) => {
readFileAsync(filePath, (... | Add custom promisified Node library functions | Add custom promisified Node library functions
| TypeScript | mit | kube/vscode-clang-complete,kube/vscode-clang-complete | ---
+++
@@ -0,0 +1,16 @@
+
+ /*#######.
+ ########",#:
+ #########',##".
+ ##'##'## .##',##.
+ ## ## ## # ##",#.
+ ## ## ## ## ##'
+ ## ## ## :##
+ ## ## ##*/
+
+import { readFile as readFileAsync } from 'fs'
+
+export const readFile = (filePath: string) =>
+ new Promise<Buffer>((resolve, r... | |
6cc70e918bc4c1619b86816c840e0b62727a2416 | test/property-decorators/logger.spec.ts | test/property-decorators/logger.spec.ts | import { LoggerProperty } from './../../src/';
describe('LoggerMethod decorator', () => {
beforeEach(() => {
spyOn(console, 'log');
});
it('should output log trace for "set" method (without annotation, default behaviour)', () => {
class TestClassProperty {
@LoggerProperty()
... | Add unit tests for property logger | Add unit tests for property logger
| TypeScript | mit | semagarcia/typescript-decorators,semagarcia/typescript-decorators | ---
+++
@@ -0,0 +1,60 @@
+import { LoggerProperty } from './../../src/';
+
+describe('LoggerMethod decorator', () => {
+
+ beforeEach(() => {
+ spyOn(console, 'log');
+ });
+
+ it('should output log trace for "set" method (without annotation, default behaviour)', () => {
+ class TestClassProper... | |
020a8b00e9cbe207497112e700411cd421a0c3b7 | packages/ionic/test/horizontal-layout.spec.ts | packages/ionic/test/horizontal-layout.spec.ts | /*
The MIT License
Copyright (c) 2018 EclipseSource Munich
https://github.com/eclipsesource/jsonforms
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, includin... | Add test for horizontal layout | Add test for horizontal layout
| TypeScript | mit | qb-project/jsonforms,qb-project/jsonforms,qb-project/jsonforms | ---
+++
@@ -0,0 +1,105 @@
+/*
+ The MIT License
+
+ Copyright (c) 2018 EclipseSource Munich
+ https://github.com/eclipsesource/jsonforms
+
+ 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 S... | |
b30795109f03950205536425095c7fbb7e013fc7 | server/libs/api/mail-functions.ts | server/libs/api/mail-functions.ts | ///<reference path="../../../typings/globals/nodemailer/index.d.ts"/>
import { Router, Response, Request, NextFunction } from "express";
import * as nodemailer from "nodemailer"
export class MailFunctions {
sendMail(recipientMail, subject, text, callback) {
let transporter = nodemailer.createTransport({
... | Add mail function as seperate mailing service provider | Add mail function as seperate mailing service provider
| TypeScript | mit | shavindraSN/examen,shavindraSN/examen,shavindraSN/examen | ---
+++
@@ -0,0 +1,26 @@
+///<reference path="../../../typings/globals/nodemailer/index.d.ts"/>
+
+import { Router, Response, Request, NextFunction } from "express";
+import * as nodemailer from "nodemailer"
+
+export class MailFunctions {
+ sendMail(recipientMail, subject, text, callback) {
+ let transport... | |
37bef945e199661c157abcfd44c13ece389524ef | test/unit/core/configuration/project-configuration-utils.spec.ts | test/unit/core/configuration/project-configuration-utils.spec.ts | import {ProjectConfigurationUtils} from '../../../../app/core/configuration/project-configuration-utils';
import {ConfigurationDefinition} from '../../../../app/core/configuration/boot/configuration-definition';
describe('ProjectConfigurationUtils', () => {
it('initTypes', () => {
const confDef: Configurati... | Add minimal test for initTypes | Add minimal test for initTypes
| TypeScript | apache-2.0 | codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client | ---
+++
@@ -0,0 +1,24 @@
+import {ProjectConfigurationUtils} from '../../../../app/core/configuration/project-configuration-utils';
+import {ConfigurationDefinition} from '../../../../app/core/configuration/boot/configuration-definition';
+
+describe('ProjectConfigurationUtils', () => {
+
+ it('initTypes', () => {
... | |
21d4ebf547894cad8aba149cf0eb699060926be4 | e2e/steps/datasets-list.ts | e2e/steps/datasets-list.ts | import { $$, steps } from '../support/world';
steps(({Then}) => {
Then(/^the datasets should be sorted by date in descending order$/, () => {
return $$('.datasets-list-row').getText().then(rows => {
const timestamp = row => new Date(row.split('\n')[0]).getTime();
rows.length.should.be.above(0);
... | Add e2e step to test the list of datasets arranged by date | Add e2e step to test the list of datasets arranged by date
| TypeScript | bsd-3-clause | cumulous/web,cumulous/web,cumulous/web,cumulous/web | ---
+++
@@ -0,0 +1,14 @@
+import { $$, steps } from '../support/world';
+
+steps(({Then}) => {
+ Then(/^the datasets should be sorted by date in descending order$/, () => {
+ return $$('.datasets-list-row').getText().then(rows => {
+ const timestamp = row => new Date(row.split('\n')[0]).getTime();
+ row... | |
3eefb1834c363a730287b599ca46c935a3e3cc3a | spec/dimensions/packets/packetreaderspec.ts | spec/dimensions/packets/packetreaderspec.ts | import PacketReader from 'dimensions/packets/packetreader';
describe("packetreader", () => {
let reader: PacketReader;
beforeEach(() => {
reader = new PacketReader("02000505");
});
it("should correctly remove the packet length and type", () => {
expect(reader.data).toEqual("05");
... | Write tests for packet reader | Write tests for packet reader
| TypeScript | mit | popstarfreas/Dimensions,popstarfreas/Dimensions,popstarfreas/Dimensions | ---
+++
@@ -0,0 +1,17 @@
+import PacketReader from 'dimensions/packets/packetreader';
+
+describe("packetreader", () => {
+ let reader: PacketReader;
+
+ beforeEach(() => {
+ reader = new PacketReader("02000505");
+ });
+
+ it("should correctly remove the packet length and type", () => {
+ ... | |
dd75d76d8cad8718337697b711caad8e5cc42890 | TestFiles/FormatTestLocations.ts | TestFiles/FormatTestLocations.ts | import 'reflect-metadata';
import { UtilService } from '../src/app/shared/util.service';
import xmljs = require('xml-js')
const a = [
{
"n_nit": "10117685",
"Ced_Vendedor": "4514347",
"ss_codigo": "!11127",
"NombreSucursal": "W.H. DISTRIBUCIONES",
"ss_direccion": "CL 14 05 05",
"Cod_Dpto": "6... | Add JSON Format for Locations example | Add JSON Format for Locations example
| TypeScript | mit | luchillo17/Electron-Webpack,luchillo17/Electron-Webpack,luchillo17/Electron-Webpack | ---
+++
@@ -0,0 +1,63 @@
+import 'reflect-metadata';
+import { UtilService } from '../src/app/shared/util.service';
+import xmljs = require('xml-js')
+
+const a = [
+ {
+ "n_nit": "10117685",
+ "Ced_Vendedor": "4514347",
+ "ss_codigo": "!11127",
+ "NombreSucursal": "W.H. DISTRIBUCIONES",
+ "ss_direcci... | |
f73392c13b22f6465467058feb1ac8d4df708c23 | ui/src/shared/parsing/lastValues.ts | ui/src/shared/parsing/lastValues.ts | import _ from 'lodash'
interface Result {
lastValues: number[]
series: string[]
}
interface Series {
name: string
values: number[] | null
columns: string[] | null
}
interface TimeSeriesResult {
series: Series[]
}
export interface TimeSeriesResponse {
response: {
result: TimeSeriesResult[]
}
}
e... | import _ from 'lodash'
interface Result {
lastValues: number[]
series: string[]
}
interface Series {
name: string
values: number[] | null
columns: string[] | null
}
interface TimeSeriesResult {
series: Series[]
}
export interface TimeSeriesResponse {
response: {
results: TimeSeriesResult[]
}
}
... | Fix typescript results key for last values | Fix typescript results key for last values
| TypeScript | mit | li-ang/influxdb,mark-rushakoff/influxdb,li-ang/influxdb,influxdb/influxdb,influxdb/influxdb,nooproblem/influxdb,influxdata/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,influxdb/influxdb,influxdata/influxdb,influxdb/influxdb,noop... | ---
+++
@@ -17,7 +17,7 @@
export interface TimeSeriesResponse {
response: {
- result: TimeSeriesResult[]
+ results: TimeSeriesResult[]
}
}
|
0060b4d66332adb2fc5eb99b84f3e2095d176d58 | tests/cases/fourslash/signatureHelpThis.ts | tests/cases/fourslash/signatureHelpThis.ts | /// <reference path='fourslash.ts' />
////class Foo<T> {
//// public implicitAny(n: number) {
//// }
//// public explicitThis(this: this, n: number) {
//// console.log(this);
//// }
//// public explicitClass(this: Foo<T>, n: number) {
//// console.log(this);
//// }
////}
////
... | Test that signature help doesn't show 'this' | Test that signature help doesn't show 'this'
| TypeScript | apache-2.0 | ziacik/TypeScript,Eyas/TypeScript,Microsoft/TypeScript,jwbay/TypeScript,plantain-00/TypeScript,kpreisser/TypeScript,kpreisser/TypeScript,jeremyepling/TypeScript,weswigham/TypeScript,mihailik/TypeScript,donaldpipowitch/TypeScript,Microsoft/TypeScript,ziacik/TypeScript,DLehenbauer/TypeScript,erikmcc/TypeScript,vilic/Type... | ---
+++
@@ -0,0 +1,43 @@
+/// <reference path='fourslash.ts' />
+////class Foo<T> {
+//// public implicitAny(n: number) {
+//// }
+//// public explicitThis(this: this, n: number) {
+//// console.log(this);
+//// }
+//// public explicitClass(this: Foo<T>, n: number) {
+//// console.log(thi... | |
45fd54a60ec72813a876cc21dcd63913956bb891 | src/actions/watcherFolders.ts | src/actions/watcherFolders.ts | import { SELECT_WATCHER_FOLDER } from '../constants/index';
export interface SelectWatcherFolder {
readonly type: SELECT_WATCHER_FOLDER;
readonly folderId: string;
}
export const selectWatcherFolder = (folderId: string): SelectWatcherFolder => ({
type: SELECT_WATCHER_FOLDER,
folderId
});
| Add action creators for watcherFolder actions. | Add action creators for watcherFolder actions.
| TypeScript | mit | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | ---
+++
@@ -0,0 +1,11 @@
+import { SELECT_WATCHER_FOLDER } from '../constants/index';
+
+export interface SelectWatcherFolder {
+ readonly type: SELECT_WATCHER_FOLDER;
+ readonly folderId: string;
+}
+
+export const selectWatcherFolder = (folderId: string): SelectWatcherFolder => ({
+ type: SELECT_WATCHER_FOLDER,
... | |
006003ae6b17b23e93fd89014a1a5b7bbb467d55 | src/utils/__tests__/clientUtils.node.tsx | src/utils/__tests__/clientUtils.node.tsx | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
import {deconstructClientId, buildClientId} from '../clientUtils';
test('client id constructed correctly', () => {
... | Add tests for client-id / app name parsing | Add tests for client-id / app name parsing
Summary: Add tests for client-id / app name parsing. We've had a lot of bugs here in the past. Get some good test coverage so we have some assurance the shared utils for it won't be broken.
Reviewed By: jknoxville
Differential Revision: D18830269
fbshipit-source-id: 07c975... | TypeScript | mit | facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper | ---
+++
@@ -0,0 +1,50 @@
+/**
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ * @format
+ */
+
+import {deconstructClientId, buildClientId} from '../clientUtils';
+
+test('cli... | |
67cc169a9dcca4e6ea301451007573549abc5c59 | src/utils/databaseFilter.ts | src/utils/databaseFilter.ts | import { StatusFilterType } from 'types';
import { Map, Set } from 'immutable';
import { AppliedFilter, FilterType } from '@shopify/polaris';
const statusFilterTypeToLabel: Map<StatusFilterType, string> = Map([
['PENDING', 'Pending'],
['PAID', 'Paid'],
['APPROVED', 'Approved'],
['REJECTED', 'Rejected']
]);
ex... | Add utility functions for converting data in root state to comply with Polaris filter API. | Add utility functions for converting data in root state to comply with Polaris filter API.
| TypeScript | mit | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | ---
+++
@@ -0,0 +1,67 @@
+import { StatusFilterType } from 'types';
+import { Map, Set } from 'immutable';
+import { AppliedFilter, FilterType } from '@shopify/polaris';
+
+const statusFilterTypeToLabel: Map<StatusFilterType, string> = Map([
+ ['PENDING', 'Pending'],
+ ['PAID', 'Paid'],
+ ['APPROVED', 'Approved'],... | |
559d42c26a7ff92f53dbf17b78f1d21c7070212b | ui/src/utils/wrappers.ts | ui/src/utils/wrappers.ts | import _ from 'lodash'
export function getNested<T = any>(obj: any, path: string, fallack: T): T {
return _.get<T>(obj, path, fallack)
}
| import _ from 'lodash'
export function getNested<T = any>(obj: any, path: string, fallback: T): T {
return _.get<T>(obj, path, fallback)
}
| Correct spelling of 'fallack' to 'fallback' in getNested | Correct spelling of 'fallack' to 'fallback' in getNested
| TypeScript | mit | nooproblem/influxdb,li-ang/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,influxdata/influxdb,influxdb/influxdb,influxdb/influxdb,influxdb/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,influxdb/influxdb,li-ang/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,no... | ---
+++
@@ -1,5 +1,5 @@
import _ from 'lodash'
-export function getNested<T = any>(obj: any, path: string, fallack: T): T {
- return _.get<T>(obj, path, fallack)
+export function getNested<T = any>(obj: any, path: string, fallback: T): T {
+ return _.get<T>(obj, path, fallback)
} |
bf09c732d91232724c19c40c915a8a1ea8bf584e | src/Test/Ast/Config/Spoiler.ts | src/Test/Ast/Config/Spoiler.ts | import { expect } from 'chai'
import { Up } from '../../../index'
import { insideDocumentAndParagraph } from '../Helpers'
import { PlainTextNode } from '../../../SyntaxNodes/PlainTextNode'
import { SpoilerNode } from '../../../SyntaxNodes/SpoilerNode'
describe('The term that represents spoiler conventions', () => {
... | Add 2 passing config tests | Add 2 passing config tests
| TypeScript | mit | start/up,start/up | ---
+++
@@ -0,0 +1,32 @@
+import { expect } from 'chai'
+import { Up } from '../../../index'
+import { insideDocumentAndParagraph } from '../Helpers'
+import { PlainTextNode } from '../../../SyntaxNodes/PlainTextNode'
+import { SpoilerNode } from '../../../SyntaxNodes/SpoilerNode'
+
+
+describe('The term that represe... | |
2f88959ac4e79fa5e053110f19933f8714796fc1 | src/Test/Html/Config/Outline.ts | src/Test/Html/Config/Outline.ts | import { expect } from 'chai'
import Up from '../../../index'
import { DocumentNode } from '../../../SyntaxNodes/DocumentNode'
import { HeadingNode } from '../../../SyntaxNodes/HeadingNode'
import { PlainTextNode } from '../../../SyntaxNodes/PlainTextNode'
describe('The ID of an element referenced by the table of con... | Add passing table of contents HTML test | Add passing table of contents HTML test
| TypeScript | mit | start/up,start/up | ---
+++
@@ -0,0 +1,31 @@
+import { expect } from 'chai'
+import Up from '../../../index'
+import { DocumentNode } from '../../../SyntaxNodes/DocumentNode'
+import { HeadingNode } from '../../../SyntaxNodes/HeadingNode'
+import { PlainTextNode } from '../../../SyntaxNodes/PlainTextNode'
+
+
+describe('The ID of an ele... | |
b86a9a656cfbfbebff3e1ebff0ace086ebff8355 | src/lib/src/utilities/rxjs-lift-hack.ts | src/lib/src/utilities/rxjs-lift-hack.ts | // TODO: Remove this when RxJS releases a stable version with a correct declaration of `Subject`.
// https://github.com/ReactiveX/rxjs/issues/2539#issuecomment-312683629
import { Operator } from 'rxjs/Operator'
import { Observable } from 'rxjs/Observable';
declare module 'rxjs/Subject' {
interface Subject<T> {
l... | Create hack for RXJS subject | chore: Create hack for RXJS subject
More here:
https://github.com/ReactiveX/rxjs/issues/2539#issuecomment-312683629
| TypeScript | mit | GetTerminus/terminus-ui,GetTerminus/terminus-ui,GetTerminus/terminus-ui,GetTerminus/terminus-ui | ---
+++
@@ -0,0 +1,10 @@
+// TODO: Remove this when RxJS releases a stable version with a correct declaration of `Subject`.
+// https://github.com/ReactiveX/rxjs/issues/2539#issuecomment-312683629
+import { Operator } from 'rxjs/Operator'
+import { Observable } from 'rxjs/Observable';
+
+declare module 'rxjs/Subject'... | |
61dac30a2bc1d5d6109b6775853075bd6da6dfb4 | src/views/settingsScreen.tsx | src/views/settingsScreen.tsx | /**
* Created by archheretic on 19.04.17.
*/
/**
* Created by archheretic on 19.04.17.
*/
import * as React from "react";
import {
AppRegistry,
Text
} from "react-native";
import { StackNavigator } from "react-navigation";
import { TabNavigator } from "react-navigation";
export interface Props {
navig... | Add a new empty settings screen that will contain settings like how far away from the users location that parking lots should be shown in the app. | Add a new empty settings screen that will contain settings like how far away from the users location that parking lots should be shown in the app.
| TypeScript | mit | Archheretic/ParkingLotTrackerMobileApp,Archheretic/ParkingLotTrackerMobileApp,Archheretic/ParkingLotTrackerMobileApp,Archheretic/ParkingLotTrackerMobileApp | ---
+++
@@ -0,0 +1,25 @@
+/**
+ * Created by archheretic on 19.04.17.
+ */
+/**
+ * Created by archheretic on 19.04.17.
+ */
+import * as React from "react";
+import {
+ AppRegistry,
+ Text
+} from "react-native";
+import { StackNavigator } from "react-navigation";
+
+import { TabNavigator } from "react-navigat... | |
496f25e564a41406e8dade1f59ef15b2f58e7b17 | packages/shared/test/mail/helpers.spec.ts | packages/shared/test/mail/helpers.spec.ts | import { Message } from '@proton/shared/lib/interfaces/mail/Message';
import { MESSAGE_FLAGS } from '@proton/shared/lib/mail/constants';
import { clearFlag, hasFlag, setFlag, toggleFlag } from '@proton/shared/lib/mail/messages';
describe('hasFlag', () => {
it('should detect correctly that the message has a flag', ... | Add tests on has, set, clear and toggle flags MAILWEB-3468 | Add tests on has, set, clear and toggle flags
MAILWEB-3468
| TypeScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -0,0 +1,54 @@
+import { Message } from '@proton/shared/lib/interfaces/mail/Message';
+import { MESSAGE_FLAGS } from '@proton/shared/lib/mail/constants';
+import { clearFlag, hasFlag, setFlag, toggleFlag } from '@proton/shared/lib/mail/messages';
+
+describe('hasFlag', () => {
+ it('should detect correct... | |
5ff5d9588784bd790f67fc25cf5fce7d8a35ed1b | saleor/static/dashboard-next/components/Tab/Tab.tsx | saleor/static/dashboard-next/components/Tab/Tab.tsx | import {
createStyles,
Theme,
withStyles,
WithStyles
} from "@material-ui/core/styles";
import Typography from "@material-ui/core/Typography";
import * as classNames from "classnames";
import * as React from "react";
const styles = (theme: Theme) =>
createStyles({
active: {},
root: {
"&$active"... | import {
createStyles,
Theme,
withStyles,
WithStyles
} from "@material-ui/core/styles";
import Typography from "@material-ui/core/Typography";
import * as classNames from "classnames";
import * as React from "react";
const styles = (theme: Theme) =>
createStyles({
active: {},
root: {
"&$active"... | Use color defined in theme | Use color defined in theme
| TypeScript | bsd-3-clause | mociepka/saleor,mociepka/saleor,UITools/saleor,UITools/saleor,mociepka/saleor,UITools/saleor,UITools/saleor,maferelo/saleor,maferelo/saleor,UITools/saleor,maferelo/saleor | ---
+++
@@ -16,10 +16,10 @@
borderBottomColor: theme.palette.primary.main
},
"&:focus": {
- color: "#5AB378"
+ color: theme.palette.primary.main
},
"&:hover": {
- color: "#5AB378"
+ color: theme.palette.primary.main
},
borderBottom: "1px s... |
4a1c0a9cdd066d0fc536b14c5c1b2d4f6d9c93a8 | src/migration/1544803202664-RenameEswatiniBackToSwaziland.ts | src/migration/1544803202664-RenameEswatiniBackToSwaziland.ts | import {MigrationInterface, QueryRunner} from "typeorm"
export class RenameEswatiniBackToSwaziland1544803202664 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<any> {
// If a Swaziland entity exists, we want to map it to Eswatini
// before renaming Eswatini to Sw... | Rename 'Eswatini' back to 'Swaziland' | Rename 'Eswatini' back to 'Swaziland'
| TypeScript | mit | OurWorldInData/owid-grapher,OurWorldInData/owid-grapher,owid/owid-grapher,OurWorldInData/our-world-in-data-grapher,OurWorldInData/our-world-in-data-grapher,OurWorldInData/owid-grapher,owid/owid-grapher,OurWorldInData/owid-grapher,OurWorldInData/our-world-in-data-grapher,owid/owid-grapher,OurWorldInData/our-world-in-dat... | ---
+++
@@ -0,0 +1,32 @@
+import {MigrationInterface, QueryRunner} from "typeorm"
+
+export class RenameEswatiniBackToSwaziland1544803202664 implements MigrationInterface {
+
+ public async up(queryRunner: QueryRunner): Promise<any> {
+ // If a Swaziland entity exists, we want to map it to Eswatini
+ ... | |
327903befe9e06d605ffe9e9b14cd9a586c63b9d | tests/pos/loops/for-06.ts | tests/pos/loops/for-06.ts | function foo():void {
for (var x:number = 1; x < 3; x++) { }
}
function bar():void {
var x:number;
for (x = 1; x < 3; x++) { }
}
| Add another test for for-loop | Add another test for for-loop
| TypeScript | bsd-3-clause | UCSD-PL/RefScript,UCSD-PL/RefScript,UCSD-PL/RefScript | ---
+++
@@ -0,0 +1,8 @@
+function foo():void {
+ for (var x:number = 1; x < 3; x++) { }
+}
+
+function bar():void {
+ var x:number;
+ for (x = 1; x < 3; x++) { }
+} | |
a47c47a3ed4a6a8172d185aaa9e1037361baee1f | src/Test/Ast/EdgeCases/SpoilerBlock.ts | src/Test/Ast/EdgeCases/SpoilerBlock.ts | import { expect } from 'chai'
import Up from '../../../index'
import { insideDocumentAndParagraph } from '../Helpers'
import { DocumentNode } from '../../../SyntaxNodes/DocumentNode'
import { CodeBlockNode } from '../../../SyntaxNodes/CodeBlockNode'
import { ParagraphNode } from '../../../SyntaxNodes/ParagraphNode'
imp... | Add 3 failing spoiler block tests | Add 3 failing spoiler block tests
| TypeScript | mit | start/up,start/up | ---
+++
@@ -0,0 +1,51 @@
+import { expect } from 'chai'
+import Up from '../../../index'
+import { insideDocumentAndParagraph } from '../Helpers'
+import { DocumentNode } from '../../../SyntaxNodes/DocumentNode'
+import { CodeBlockNode } from '../../../SyntaxNodes/CodeBlockNode'
+import { ParagraphNode } from '../../... | |
106ce79244e18f24a353f7715d9e03fdf8198f9e | app/src/ui/cherry-pick/confirm-cherry-pick-abort-dialog.tsx | app/src/ui/cherry-pick/confirm-cherry-pick-abort-dialog.tsx | import * as React from 'react'
import { Dialog, DialogContent, DialogFooter } from '../dialog'
import { Ref } from '../lib/ref'
import { OkCancelButtonGroup } from '../dialog/ok-cancel-button-group'
import { ConfirmAbortStep } from '../../models/cherry-pick'
interface IConfirmCherryPickAbortDialogProps {
readonly s... | Create Cherry Pick Confirmation Dialog | Create Cherry Pick Confirmation Dialog
| TypeScript | mit | desktop/desktop,desktop/desktop,artivilla/desktop,artivilla/desktop,say25/desktop,desktop/desktop,j-f1/forked-desktop,say25/desktop,j-f1/forked-desktop,j-f1/forked-desktop,j-f1/forked-desktop,desktop/desktop,shiftkey/desktop,shiftkey/desktop,shiftkey/desktop,say25/desktop,artivilla/desktop,say25/desktop,artivilla/deskt... | ---
+++
@@ -0,0 +1,96 @@
+import * as React from 'react'
+
+import { Dialog, DialogContent, DialogFooter } from '../dialog'
+import { Ref } from '../lib/ref'
+import { OkCancelButtonGroup } from '../dialog/ok-cancel-button-group'
+import { ConfirmAbortStep } from '../../models/cherry-pick'
+
+interface IConfirmCherry... | |
116d75f939011dc7476b56dcfd5015e8ccdda8c1 | test-helpers/matchers.ts | test-helpers/matchers.ts | beforeEach(() => {
jasmine.addMatchers({
toContainText: function() {
return {
compare: function(actual, expectedText) {
let actualText = actual.textContent;
return {
pass: actualText.indexOf(expectedText) > -1,
... | beforeEach(() => {
jasmine.addMatchers({
toContainText: () => {
return {
compare: (actual, expectedText) => {
let actualText = actual.textContent;
return {
pass: actualText.indexOf(expectedText) > -1,
... | Refactor matcher: use arrow function | Refactor matcher: use arrow function
| TypeScript | mit | westlab/door-front,antonybudianto/angular2-starter,foxjazz/eveview,foxjazz/memberbase,westlab/door-front,dabcat/myapp-angular2,jasoncbuehler/mohits_awesome_chat_app,jasoncbuehler/mohits_awesome_chat_app,Michael-xxxx/angular2-starter,foxjazz/eveview,westlab/door-front,NiallBrickell/angular2-starter,Michael-xxxx/angular2... | ---
+++
@@ -1,8 +1,8 @@
beforeEach(() => {
jasmine.addMatchers({
- toContainText: function() {
+ toContainText: () => {
return {
- compare: function(actual, expectedText) {
+ compare: (actual, expectedText) => {
let actualText = actua... |
656ea7cf9d2db58c7e69c2bd82b420bacc39b280 | tests/test-components/FileItem.spec.tsx | tests/test-components/FileItem.spec.tsx | import {
FileItem,
IFileItemProps
} from '../../src/components/FileItem';
import * as React from 'react';
import 'jest';
import { shallow } from "enzyme";
describe('FileItem', () => {
const props: IFileItemProps = {
topRepoPath: '',
file: {
to: 'some/file/path/file-name'
},
stage: '',
... | Add test file hover file item | Add test file hover file item
| TypeScript | bsd-3-clause | jupyterlab/jupyterlab-git,jupyterlab/jupyterlab-git,jupyterlab/jupyterlab-git | ---
+++
@@ -0,0 +1,49 @@
+import {
+ FileItem,
+ IFileItemProps
+} from '../../src/components/FileItem';
+import * as React from 'react';
+import 'jest';
+import { shallow } from "enzyme";
+
+
+describe('FileItem', () => {
+ const props: IFileItemProps = {
+ topRepoPath: '',
+ file: {
+ to: 'some/file/p... | |
1db708814222fc07c31c92dc256ef59a04029967 | tests/cases/fourslash/invertedCloduleAfterQuickInfo.ts | tests/cases/fourslash/invertedCloduleAfterQuickInfo.ts | /// <reference path="fourslash.ts" />
////module M {
//// module A {
//// var o;
//// }
//// class A {
//// /**/c
//// }
////}
goTo.marker();
verify.quickInfoExists();
// Bug 823365
// verify.numberOfErrorsInCurrentFile(1); // We get no errors | Add test for inverted clodule | Add test for inverted clodule
| TypeScript | apache-2.0 | hippich/typescript,fdecampredon/jsx-typescript-old-version,popravich/typescript,fdecampredon/jsx-typescript-old-version,mbebenita/shumway.ts,mbebenita/shumway.ts,fdecampredon/jsx-typescript-old-version,mbebenita/shumway.ts,hippich/typescript,hippich/typescript,popravich/typescript,popravich/typescript | ---
+++
@@ -0,0 +1,15 @@
+/// <reference path="fourslash.ts" />
+
+////module M {
+//// module A {
+//// var o;
+//// }
+//// class A {
+//// /**/c
+//// }
+////}
+
+goTo.marker();
+verify.quickInfoExists();
+// Bug 823365
+// verify.numberOfErrorsInCurrentFile(1); // We get no errors | |
6d95231c0cc06d62614ef70a9ccdaaa4ee60b942 | spec/flux-reduce-store-spec.ts | spec/flux-reduce-store-spec.ts | import { FluxReduceStore } from '../lib/flux-reduce-store';
import { StoreError } from '../lib/flux-store';
describe('FluxReduceStore', () => {
let store: TestReduceStore;
let dispatcher;
beforeEach(() => {
dispatcher = {
register: () => { },
isDispatching: () => true
}
store = new TestR... | Add tests for reduce store | Add tests for reduce store
| TypeScript | mit | delta62/flux-lite,delta62/flux-lite | ---
+++
@@ -0,0 +1,85 @@
+import { FluxReduceStore } from '../lib/flux-reduce-store';
+import { StoreError } from '../lib/flux-store';
+
+describe('FluxReduceStore', () => {
+ let store: TestReduceStore;
+ let dispatcher;
+
+ beforeEach(() => {
+ dispatcher = {
+ register: () => { },
+ isDispatching: ... | |
242f0959da49cd5d7a365910cb95cabea9a472ac | src/debug/flutter_test.ts | src/debug/flutter_test.ts | interface Notification {
type: string;
time: number;
}
interface StartNotification extends Notification {
protocolVersion: string;
runnerVersion?: string;
}
interface AllSuitesNotification extends Notification {
count: number;
}
interface SuiteNotification extends Notification {
suite: Suite;
}
interface Suite... | Create types for `flutter test` | Create types for `flutter test`
See #636.
| TypeScript | mit | Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code | ---
+++
@@ -0,0 +1,76 @@
+interface Notification {
+ type: string;
+ time: number;
+}
+
+interface StartNotification extends Notification {
+ protocolVersion: string;
+ runnerVersion?: string;
+}
+interface AllSuitesNotification extends Notification {
+ count: number;
+}
+
+interface SuiteNotification extends Notific... | |
29bacf4901012d9a5538963894325f5537592cf2 | cli/clipboard_test.ts | cli/clipboard_test.ts | import clipboard = require('./clipboard');
import testLib = require('../lib/test');
var clip = clipboard.createPlatformClipboard();
testLib.addAsyncTest('get/set/clear', (assert) => {
clip.setData('hello world').then(() => {
return clip.getData();
})
.then((content) => {
assert.equal(content, 'hello world');
... | Add unit test for platform clipboard implementation | Add unit test for platform clipboard implementation
| TypeScript | bsd-3-clause | robertknight/passcards,robertknight/passcards,robertknight/passcards,robertknight/passcards | ---
+++
@@ -0,0 +1,24 @@
+import clipboard = require('./clipboard');
+import testLib = require('../lib/test');
+
+var clip = clipboard.createPlatformClipboard();
+
+testLib.addAsyncTest('get/set/clear', (assert) => {
+ clip.setData('hello world').then(() => {
+ return clip.getData();
+ })
+ .then((content) => {
+ a... | |
ad6df613ec4de34581f875808842927f65d7f0b4 | types/promise-polyfill/promise-polyfill-tests.ts | types/promise-polyfill/promise-polyfill-tests.ts | const prom1 = new Promise<number>((resolve, reject) => {
resolve(12);
});
const prom2 = new Promise<string>((resolve, reject) => {
reject('an error');
}).then((val) => {
console.log(val);
return val;
}).catch((err) => {
console.error(err);
});
Promise.all([prom1, prom2])
.then(result => {
console.log(result);... | import Promise from "promise-polyfill";
const prom1 = new Promise<number>((resolve, reject) => {
resolve(12);
});
const prom2 = new Promise<string>((resolve, reject) => {
reject('an error');
}).then((val) => {
console.log(val);
return val;
}).catch((err) => {
console.error(err);
});
Promise.all([prom1, prom2]... | Add missing import to test file. | Add missing import to test file.
The tests weren't really testing promise-polyfill at all, they were
testing TypeScript's built-in Promise type.
| TypeScript | mit | borisyankov/DefinitelyTyped,magny/DefinitelyTyped,georgemarshall/DefinitelyTyped,georgemarshall/DefinitelyTyped,markogresak/DefinitelyTyped,georgemarshall/DefinitelyTyped,magny/DefinitelyTyped,georgemarshall/DefinitelyTyped,borisyankov/DefinitelyTyped,dsebastien/DefinitelyTyped,mcliment/DefinitelyTyped,dsebastien/Defin... | ---
+++
@@ -1,3 +1,5 @@
+import Promise from "promise-polyfill";
+
const prom1 = new Promise<number>((resolve, reject) => {
resolve(12);
}); |
a9c4e58b08f6534d16b81205d7f54fa0ec3d9fb3 | app/src/lib/git/checkout-index.ts | app/src/lib/git/checkout-index.ts | import { git } from './core'
import { Repository } from '../../models/repository'
export async function checkoutIndex(repository: Repository, paths: ReadonlyArray<string>) {
if (!paths.length) {
return
}
await git([ 'checkout-index', '-f', '-u', '--stdin', '-z' ], repository.path, 'checkoutIndex', {
std... | Add a function for updating the working directory from the index | Add a function for updating the working directory from the index
| TypeScript | mit | artivilla/desktop,kactus-io/kactus,desktop/desktop,hjobrien/desktop,hjobrien/desktop,j-f1/forked-desktop,j-f1/forked-desktop,gengjiawen/desktop,say25/desktop,artivilla/desktop,kactus-io/kactus,desktop/desktop,gengjiawen/desktop,say25/desktop,say25/desktop,j-f1/forked-desktop,artivilla/desktop,kactus-io/kactus,shiftkey/... | ---
+++
@@ -0,0 +1,12 @@
+import { git } from './core'
+import { Repository } from '../../models/repository'
+
+export async function checkoutIndex(repository: Repository, paths: ReadonlyArray<string>) {
+ if (!paths.length) {
+ return
+ }
+
+ await git([ 'checkout-index', '-f', '-u', '--stdin', '-z' ], reposit... | |
39a03a39dab15f8c6e954da87f38a38685aa6a9c | src/Test/Ast/Config/Chart.ts | src/Test/Ast/Config/Chart.ts | import { expect } from 'chai'
import Up from '../../../index'
import { DocumentNode } from '../../../SyntaxNodes/DocumentNode'
import { TableNode } from '../../../SyntaxNodes/TableNode'
import { PlainTextNode } from '../../../SyntaxNodes/PlainTextNode'
describe('The term that represents chart conventions', () => {
... | Add 2 passing chart tests | Add 2 passing chart tests
| TypeScript | mit | start/up,start/up | ---
+++
@@ -0,0 +1,57 @@
+import { expect } from 'chai'
+import Up from '../../../index'
+import { DocumentNode } from '../../../SyntaxNodes/DocumentNode'
+import { TableNode } from '../../../SyntaxNodes/TableNode'
+import { PlainTextNode } from '../../../SyntaxNodes/PlainTextNode'
+
+
+describe('The term that repres... | |
f27a6ec5d64893c1c767aa8dcddeeeabf095f80c | src/modal/container-modal/index.ts | src/modal/container-modal/index.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 an module for container modal. | feat(containermodal): Create an module for container modal.
| TypeScript | mit | TemainfoSistemas/truly-ui,TemainfoSistemas/truly-ui,TemainfoSistemas/truly-ui | ---
+++
@@ -0,0 +1,39 @@
+/*
+ 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... | |
892ed5f3af7e111a958411f47945a80d3025512a | src/constants/editors.ts | src/constants/editors.ts | export const ANDROIDSTUDIO = "ANDROIDSTUDIO";
export const ATOM = "ATOM";
export const CHROME = "CHROME";
export const ECLIPSE = "ECLIPSE";
export const SUBLIMETEXT2 = "SUBLIMETEXT2";
export const SUBLIMETEXT3 = "SUBLIMETEXT3";
export const VIM = "VIM";
export const VSCODE = "VSCODE";
export const XCODE = "XCODE";
| Create a constants folder for each type of editor | Create a constants folder for each type of editor
| TypeScript | bsd-3-clause | wakatime/desktop,wakatime/desktop,wakatime/wakatime-desktop,wakatime/desktop,wakatime/wakatime-desktop | ---
+++
@@ -0,0 +1,9 @@
+export const ANDROIDSTUDIO = "ANDROIDSTUDIO";
+export const ATOM = "ATOM";
+export const CHROME = "CHROME";
+export const ECLIPSE = "ECLIPSE";
+export const SUBLIMETEXT2 = "SUBLIMETEXT2";
+export const SUBLIMETEXT3 = "SUBLIMETEXT3";
+export const VIM = "VIM";
+export const VSCODE = "VSCODE";
... | |
e78496d5ca0999d4c75979c6f889db193e25164d | src/core/dummies.ts | src/core/dummies.ts | import { Dummy, TextDummy, TypesDummy } from '../../test/helpers';
import { VcsAuthenticationInfo, VcsAuthenticationTypes } from './vcs';
export class VcsAuthenticationInfoDummy extends Dummy<VcsAuthenticationInfo> {
private type = new TypesDummy<VcsAuthenticationTypes>([
VcsAuthenticationTypes.BASIC,
... | Add vcs authentication info dummy | Add vcs authentication info dummy
| TypeScript | mit | seokju-na/geeks-diary,seokju-na/geeks-diary,seokju-na/geeks-diary | ---
+++
@@ -0,0 +1,26 @@
+import { Dummy, TextDummy, TypesDummy } from '../../test/helpers';
+import { VcsAuthenticationInfo, VcsAuthenticationTypes } from './vcs';
+
+
+export class VcsAuthenticationInfoDummy extends Dummy<VcsAuthenticationInfo> {
+ private type = new TypesDummy<VcsAuthenticationTypes>([
+ ... | |
784fda028e6369bfc2983d6e12bf5eacfe464172 | 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 | desktop/desktop,kactus-io/kactus,say25/desktop,desktop/desktop,j-f1/forked-desktop,say25/desktop,shiftkey/desktop,kactus-io/kactus,j-f1/forked-desktop,say25/desktop,kactus-io/kactus,artivilla/desktop,desktop/desktop,j-f1/forked-desktop,shiftkey/desktop,kactus-io/kactus,artivilla/desktop,say25/desktop,j-f1/forked-deskto... | ---
+++
@@ -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... | |
e3289e2218d2566ce56baa50ec0561efd1a6cba0 | packages/shared/lib/api/features.ts | packages/shared/lib/api/features.ts | export const getFeature = (featureCode: string) => ({
url: `core/v4/features/${featureCode}`,
method: 'get',
});
export const updateFeatureValue = (featureCode: string, Value: any) => ({
url: `core/v4/features/${featureCode}/value`,
method: 'put',
data: { Value },
});
| Save BF modal state with API | [BF2020-57] Save BF modal state with API
| TypeScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -0,0 +1,10 @@
+export const getFeature = (featureCode: string) => ({
+ url: `core/v4/features/${featureCode}`,
+ method: 'get',
+});
+
+export const updateFeatureValue = (featureCode: string, Value: any) => ({
+ url: `core/v4/features/${featureCode}/value`,
+ method: 'put',
+ data: { Value }... | |
9b01783e2d6cf94ec0aa720b6e1ef6f03c59e1ba | tests/cases/fourslash/renameImportOfExportEquals.ts | tests/cases/fourslash/renameImportOfExportEquals.ts | /// <reference path='fourslash.ts' />
////declare namespace N {
//// export var x: number;
////}
////declare module "mod" {
//// export = N;
////}
////declare module "test" {
//// import * as [|N|] from "mod";
//// export { [|N|] }; // Renaming N here would rename
////}
let ranges = test.ranges()
for (let... | Add test for renaming accorss modules using export= | Add test for renaming accorss modules using export=
| TypeScript | apache-2.0 | thr0w/Thr0wScript,jeremyepling/TypeScript,synaptek/TypeScript,microsoft/TypeScript,fabioparra/TypeScript,donaldpipowitch/TypeScript,yortus/TypeScript,AbubakerB/TypeScript,alexeagle/TypeScript,SaschaNaz/TypeScript,DLehenbauer/TypeScript,basarat/TypeScript,mmoskal/TypeScript,minestarks/TypeScript,weswigham/TypeScript,noj... | ---
+++
@@ -0,0 +1,18 @@
+/// <reference path='fourslash.ts' />
+
+////declare namespace N {
+//// export var x: number;
+////}
+////declare module "mod" {
+//// export = N;
+////}
+////declare module "test" {
+//// import * as [|N|] from "mod";
+//// export { [|N|] }; // Renaming N here would rename
+///... | |
c5ac39421d664f5db895b7abc674a26a75caf427 | test/property-decorators/max.spec.ts | test/property-decorators/max.spec.ts | import { Max } from './../../src/';
describe('LoggerMethod decorator', () => {
it('should assign a valid value (less than max value)', () => {
class TestClassMaxValue {
@Max(10)
myNumber: number;
}
let testClass = new TestClassMaxValue();
let valueToAssign ... | Add unit tests for max decorator | Add unit tests for max decorator
| TypeScript | mit | semagarcia/typescript-decorators,semagarcia/typescript-decorators | ---
+++
@@ -0,0 +1,52 @@
+import { Max } from './../../src/';
+
+describe('LoggerMethod decorator', () => {
+
+ it('should assign a valid value (less than max value)', () => {
+ class TestClassMaxValue {
+ @Max(10)
+ myNumber: number;
+ }
+
+ let testClass = new TestClass... | |
2362dd4facb2e2f55a663f1b2b556a1773490eb3 | tests/cases/fourslash/quickInfoJSDocBackticks.ts | tests/cases/fourslash/quickInfoJSDocBackticks.ts | ///<reference path="fourslash.ts" />
// @noEmit: true
// @allowJs: true
// @checkJs: true
// @strict: true
// @Filename: jsdocParseMatchingBackticks.js
/////**
//// * `@param` initial at-param is OK in title comment
//// * @param {string} x hi there `@param`
//// * @param {string} y hi there `@ * param
//// * ... | Add fourslash test of jsdoc backtick parsing | Add fourslash test of jsdoc backtick parsing
| TypeScript | apache-2.0 | Microsoft/TypeScript,kitsonk/TypeScript,nojvek/TypeScript,weswigham/TypeScript,alexeagle/TypeScript,nojvek/TypeScript,alexeagle/TypeScript,microsoft/TypeScript,SaschaNaz/TypeScript,RyanCavanaugh/TypeScript,minestarks/TypeScript,SaschaNaz/TypeScript,RyanCavanaugh/TypeScript,microsoft/TypeScript,kitsonk/TypeScript,Sascha... | ---
+++
@@ -0,0 +1,25 @@
+///<reference path="fourslash.ts" />
+
+// @noEmit: true
+// @allowJs: true
+// @checkJs: true
+// @strict: true
+// @Filename: jsdocParseMatchingBackticks.js
+
+/////**
+//// * `@param` initial at-param is OK in title comment
+//// * @param {string} x hi there `@param`
+//// * @param {strin... | |
97957dff5b8b36da3c63a5b5c600d9a68b98888a | src/crawlers/elpaisbrasil.ts | src/crawlers/elpaisbrasil.ts | import * as cheerio from 'cheerio';
import * as prettyjson from 'prettyjson';
import * as requestPromise from 'request-promise';
import { ICrawlerInfo } from './../types/crawler-info';
const url: string = 'https://brasil.elpais.com/';
export let getNews = html => {
let $ = cheerio.load(html);
let arr = [];
$('.art... | Add El País Brasil website | Add El País Brasil website
| TypeScript | mit | mateusduraes/crawler-br-news,mateusduraes/crawler-br-news | ---
+++
@@ -0,0 +1,28 @@
+import * as cheerio from 'cheerio';
+import * as prettyjson from 'prettyjson';
+import * as requestPromise from 'request-promise';
+import { ICrawlerInfo } from './../types/crawler-info';
+
+const url: string = 'https://brasil.elpais.com/';
+
+export let getNews = html => {
+ let $ = cheerio... | |
e445e012c4fe9a3673204988491266a41d56fd7a | tests/cases/fourslash/syntacticClassificationsDocComment4.ts | tests/cases/fourslash/syntacticClassificationsDocComment4.ts | /// <reference path="fourslash.ts"/>
//// /** @param {number} p1 */
//// function foo(p1) {}
var c = classification;
verify.syntacticClassificationsAre(
c.comment("/** "),
c.punctuation("@"),
c.docCommentTagName("param"),
c.comment(" "),
c.punctuation("{"),
c.keyword("number"),
... | Add test for jsdoc syntactic classification for function declaration | Add test for jsdoc syntactic classification for function declaration
| TypeScript | apache-2.0 | jeremyepling/TypeScript,Eyas/TypeScript,weswigham/TypeScript,chuckjaz/TypeScript,vilic/TypeScript,chuckjaz/TypeScript,alexeagle/TypeScript,nojvek/TypeScript,RyanCavanaugh/TypeScript,kitsonk/TypeScript,kpreisser/TypeScript,Microsoft/TypeScript,mihailik/TypeScript,basarat/TypeScript,microsoft/TypeScript,DLehenbauer/TypeS... | ---
+++
@@ -0,0 +1,24 @@
+/// <reference path="fourslash.ts"/>
+
+//// /** @param {number} p1 */
+//// function foo(p1) {}
+
+var c = classification;
+verify.syntacticClassificationsAre(
+ c.comment("/** "),
+ c.punctuation("@"),
+ c.docCommentTagName("param"),
+ c.comment(" "),
+ c.punctuation("{"),
+... | |
407c8df39bd4cb49d0c9982fbdf2f0c404392a72 | test/browser/importer.spec.ts | test/browser/importer.spec.ts | import {Importer} from "../../app/import/importer";
import {Parser, ParserResult} from "../../app/import/parser";
import {Observable} from "rxjs/Observable";
/**
* @author Daniel de Oliveira
*/
export function main() {
let mockReader;
let mockParser;
let importer;
beforeEach(()=>{
mockRead... | Set up importer test harness. | Set up importer test harness.
| TypeScript | apache-2.0 | codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client | ---
+++
@@ -0,0 +1,48 @@
+import {Importer} from "../../app/import/importer";
+import {Parser, ParserResult} from "../../app/import/parser";
+import {Observable} from "rxjs/Observable";
+
+
+/**
+ * @author Daniel de Oliveira
+ */
+export function main() {
+
+ let mockReader;
+ let mockParser;
+ let importer... | |
3dae6624fa5dccdb8785fd0bfb13dcb58f0fbb4a | packages/web-client/tests/unit/models/workflow/workflow-postable-test.ts | packages/web-client/tests/unit/models/workflow/workflow-postable-test.ts | import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import { Workflow } from '@cardstack/web-client/models/workflow';
import { WorkflowPostable } from '@cardstack/web-client/models/workflow/workflow-postable';
import { Participant } from '../../../../app/models/workflow/workflow-postable';
m... | Add unit test coverage for WorkflowPostable | Add unit test coverage for WorkflowPostable
| TypeScript | mit | cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack | ---
+++
@@ -0,0 +1,43 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+import { Workflow } from '@cardstack/web-client/models/workflow';
+import { WorkflowPostable } from '@cardstack/web-client/models/workflow/workflow-postable';
+import { Participant } from '../../../../app/models... | |
afcc5879000f3f56304f6d251cd16ec9bb006bc8 | src/pages/settings/settings.spec.ts | src/pages/settings/settings.spec.ts | import { TestBed, inject, async, ComponentFixture } from '@angular/core/testing';
import { SettingsPage } from './settings';
import { App, Config, Form, IonicModule, Keyboard, Haptic, GestureController, DomController, NavController, Platform, NavParams } from 'ionic-angular';
import { FormsModule, ReactiveFormsModule }... | Add unit test for setting page | Add unit test for setting page
| TypeScript | mit | IMSmobile/app,IMSmobile/app,IMSmobile/app,IMSmobile/app | ---
+++
@@ -0,0 +1,55 @@
+import { TestBed, inject, async, ComponentFixture } from '@angular/core/testing';
+import { SettingsPage } from './settings';
+import { App, Config, Form, IonicModule, Keyboard, Haptic, GestureController, DomController, NavController, Platform, NavParams } from 'ionic-angular';
+import { For... | |
7ca5f08331c471d91b5c8f2bb85d81a9342e7110 | src/Test/Ast/TableOfContents.ts | src/Test/Ast/TableOfContents.ts | import { expect } from 'chai'
import Up from '../../index'
import { DocumentNode } from '../../SyntaxNodes/DocumentNode'
import { PlainTextNode } from '../../SyntaxNodes/PlainTextNode'
/*import { StressNode } from '../../SyntaxNodes/StressNode'
import { ParagraphNode } from '../../SyntaxNodes/ParagraphNode'
import { Se... | Add passing table of contents test | Add passing table of contents test
| TypeScript | mit | start/up,start/up | ---
+++
@@ -0,0 +1,24 @@
+import { expect } from 'chai'
+import Up from '../../index'
+import { DocumentNode } from '../../SyntaxNodes/DocumentNode'
+import { PlainTextNode } from '../../SyntaxNodes/PlainTextNode'
+/*import { StressNode } from '../../SyntaxNodes/StressNode'
+import { ParagraphNode } from '../../Synta... | |
89873454861b8941bd3e63d13fb670a3fece64a4 | Server/config/vorlon.logconfig.ts | Server/config/vorlon.logconfig.ts | import fs = require("fs");
import path = require("path");
export module VORLON {
export class LogConfig {
public vorlonLogFile: string;
public exceptionsLogFile: string;
public enableConsole: boolean;
public level: string;
public constructor() {
var configurati... | import fs = require("fs");
import path = require("path");
export module VORLON {
export class LogConfig {
public vorlonLogFile: string;
public exceptionsLogFile: string;
public enableConsole: boolean;
public level: string;
public constructor() {
var configurati... | Change log level to warn by default | Change log level to warn by default
| TypeScript | mit | lahloumehdi/Vorlonjs,RaphaelLichan/Vorlonjs,gleborgne/Vorlonjs,SpencerRothschild/Vorlonjs,RaphaelLichan/Vorlonjs,SpencerRothschild/Vorlonjs,sayar/Vorlonjs,sayar/Vorlonjs,gleborgne/Vorlonjs,sayar/Vorlonjs,gleborgne/Vorlonjs,SpencerRothschild/Vorlonjs,lahloumehdi/Vorlonjs,lahloumehdi/Vorlonjs,SpencerRothschild/Vorlonjs,R... | ---
+++
@@ -21,13 +21,13 @@
this.vorlonLogFile = path.join(filePath, vorlonjsFile);
this.exceptionsLogFile = path.join(filePath, exceptionFile);
this.enableConsole = logConfig.enableConsole;
- this.level = logConfig.level ? logConfig.level : "info";
+ ... |
6c223cc2cfd8961f29cca94db368ee4f6c36abe4 | src/workspacefolder-quickpick.ts | src/workspacefolder-quickpick.ts | import * as vscode from 'vscode';
class WorkspaceFolderQuickPickItem implements vscode.QuickPickItem {
description = "";
detail = "";
public get label(): string {
return this.folder.name;
}
constructor(public folder: vscode.WorkspaceFolder) {}
}
export interface WorkspaceFolderQuickPickO... | Add helper to quick pick workspace folder | Add helper to quick pick workspace folder
| TypeScript | mpl-2.0 | hashicorp/vscode-terraform,mauve/vscode-terraform,hashicorp/vscode-terraform,mauve/vscode-terraform,mauve/vscode-terraform,hashicorp/vscode-terraform,mauve/vscode-terraform | ---
+++
@@ -0,0 +1,33 @@
+import * as vscode from 'vscode';
+
+class WorkspaceFolderQuickPickItem implements vscode.QuickPickItem {
+ description = "";
+ detail = "";
+
+ public get label(): string {
+ return this.folder.name;
+ }
+
+ constructor(public folder: vscode.WorkspaceFolder) {}
+}
+
+e... | |
5ba416897c98c20ae2b15e92a121032949496de5 | src/public/search/SearchProviderInterfaces.ts | src/public/search/SearchProviderInterfaces.ts | /*********************************************************
* Copyright (c) 2018 datavisyn GmbH, http://datavisyn.io
*
* This file is property of datavisyn.
* Code and any other files associated with this project
* may not be copied and/or distributed without permission.
*
* Proprietary and confidential. No warra... | Move `IResult`, `ISearchProvider`, and `ISearchProviderDesc` | Move `IResult`, `ISearchProvider`, and `ISearchProviderDesc`
to new folder _src/public/search/_ in tdp_core
| TypeScript | bsd-3-clause | datavisyn/tdp_core,datavisyn/tdp_core,datavisyn/tdp_core,datavisyn/tdp_core | ---
+++
@@ -0,0 +1,82 @@
+/*********************************************************
+ * Copyright (c) 2018 datavisyn GmbH, http://datavisyn.io
+ *
+ * This file is property of datavisyn.
+ * Code and any other files associated with this project
+ * may not be copied and/or distributed without permission.
+ *
+ * Pro... | |
b761c62095a0f44ddf70ea984b953263123b1df3 | app/src/ui/lib/escape-regex.ts | app/src/ui/lib/escape-regex.ts | /**
* Converts the input string by escaping characters that have special meaning in
* regular expressions.
*
* From https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions
*/
export function escapeRegExp(str: string) {
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') // $& means the whole... | Add a utility function for escaping regexes | Add a utility function for escaping regexes
| TypeScript | mit | BugTesterTest/desktops,desktop/desktop,j-f1/forked-desktop,artivilla/desktop,shiftkey/desktop,hjobrien/desktop,gengjiawen/desktop,shiftkey/desktop,hjobrien/desktop,artivilla/desktop,say25/desktop,desktop/desktop,BugTesterTest/desktops,desktop/desktop,kactus-io/kactus,say25/desktop,say25/desktop,shiftkey/desktop,hjobrie... | ---
+++
@@ -0,0 +1,9 @@
+/**
+ * Converts the input string by escaping characters that have special meaning in
+ * regular expressions.
+ *
+ * From https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions
+ */
+export function escapeRegExp(str: string) {
+ return str.replace(/[.*+?^${}()|[\]\\... | |
1a5d5b758490f61e1163fdaf4f370bbc7dd1bf88 | tests/unit/models/setting-test.ts | tests/unit/models/setting-test.ts | import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import { run } from '@ember/runloop';
module('Unit | Model | setting', function(hooks) {
setupTest(hooks);
// Replace this with your real tests.
test('it exists', function(assert) {
let store = this.owner.lookup('service:store');... | Add test file for settings model | Add test file for settings model
| TypeScript | apache-2.0 | ExplorViz/explorviz-ui-frontend,ExplorViz/explorviz-ui-frontend,ExplorViz/explorviz-ui-frontend | ---
+++
@@ -0,0 +1,14 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+import { run } from '@ember/runloop';
+
+module('Unit | Model | setting', function(hooks) {
+ setupTest(hooks);
+
+ // Replace this with your real tests.
+ test('it exists', function(assert) {
+ let store ... | |
e429b1a131348670bb40f3b9ba65ac94c18b326e | test/servicesSpec.ts | test/servicesSpec.ts | import * as angular from "angular";
import { UIRouter, trace } from "ui-router-core";
declare var inject;
var module = angular.mock.module;
describe('UI-Router services', () => {
var $uiRouterProvider: UIRouter, $uiRouter: UIRouter;
var providers;
var services;
beforeEach(module('ui.router', function(
... | Check each provider and service is injected | test(Services): Check each provider and service is injected
| TypeScript | mit | angular-ui/ui-router,codersongs/codersongs.github.io,codersongs/codersongs.github.io,mattlewis92/ui-router,fpipita/ui-router,fpipita/ui-router,fpipita/ui-router,mattlewis92/ui-router,angular-ui/ui-router,angular-ui/ui-router | ---
+++
@@ -0,0 +1,87 @@
+import * as angular from "angular";
+import { UIRouter, trace } from "ui-router-core";
+
+declare var inject;
+
+var module = angular.mock.module;
+describe('UI-Router services', () => {
+ var $uiRouterProvider: UIRouter, $uiRouter: UIRouter;
+ var providers;
+ var services;
+
+ beforeEa... | |
40d9f58db76aa3aa1adf1f9e8eabba0c0ecf8c49 | src/test/model-utils.spec.ts | src/test/model-utils.spec.ts | import {fdescribe,describe,expect,fit,it,xit, inject,beforeEach, beforeEachProviders} from 'angular2/testing';
import {provide} from "angular2/core";
import {IdaiFieldObject} from "../app/model/idai-field-object";
import {ModelUtils} from "../app/model/model-utils";
/**
* @author Jan G. Wieners
*/
export function ma... | Add test for deep cloning objects. | Add test for deep cloning objects.
| TypeScript | apache-2.0 | codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client | ---
+++
@@ -0,0 +1,29 @@
+import {fdescribe,describe,expect,fit,it,xit, inject,beforeEach, beforeEachProviders} from 'angular2/testing';
+import {provide} from "angular2/core";
+import {IdaiFieldObject} from "../app/model/idai-field-object";
+import {ModelUtils} from "../app/model/model-utils";
+
+/**
+ * @author Jan... | |
0442291ac04a0c62c5b8c63377b39bd4a60f5292 | src/datastore/postgres/schema/v5.ts | src/datastore/postgres/schema/v5.ts | import { IDatabase } from "pg-promise";
// tslint:disable-next-line: no-any
export async function runSchema(db: IDatabase<any>) {
// Create schema
await db.none(`
CREATE TABLE metrics_users (
user_id TEXT NOT NULL,
remote BOOLEAN,
puppeted BOOLEAN
);
CREATE TYPE room_type A... | Add database schema for the metrics | Add database schema for the metrics
| 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,26 @@
+import { IDatabase } from "pg-promise";
+
+// tslint:disable-next-line: no-any
+export async function runSchema(db: IDatabase<any>) {
+ // Create schema
+ await db.none(`
+ CREATE TABLE metrics_users (
+ user_id TEXT NOT NULL,
+ remote BOOLEAN,
+ puppeted BOOLEA... | |
be2ae055909b5dd2c2b8c87266ef42bec8f64ea9 | test/Documents/Queries/HashCalculatorTest.ts | test/Documents/Queries/HashCalculatorTest.ts | import * as assert from "assert";
import { HashCalculator } from "../../../src/Documents/Queries/HashCalculator";
import { TypesAwareObjectMapper } from "../../../src/Mapping/ObjectMapper";
const mockObjectMapper = {
toObjectLiteral: obj => obj.toString()
} as TypesAwareObjectMapper;
const hash = data => {
c... | Add tests for hash calculator | Add tests for hash calculator
| TypeScript | mit | ravendb/ravendb-nodejs-client,ravendb/ravendb-nodejs-client | ---
+++
@@ -0,0 +1,46 @@
+import * as assert from "assert";
+
+import { HashCalculator } from "../../../src/Documents/Queries/HashCalculator";
+import { TypesAwareObjectMapper } from "../../../src/Mapping/ObjectMapper";
+
+const mockObjectMapper = {
+ toObjectLiteral: obj => obj.toString()
+} as TypesAwareObjectMa... | |
20bd66d808c1ea5caa617d199e6b808b4f815a8d | airtable-custom-form/src/syncFileToS3.tsx | airtable-custom-form/src/syncFileToS3.tsx | // tslint:disable:no-any no-console
import * as AWS from 'aws-sdk';
const BUCKET_NAME = 'l4gg-timeline.ajhyndman.com';
const REGION = 'us-east-1';
const IDENTITY_POOL_ID = 'us-east-1:fa5d5bd8-abdc-4846-a62a-6f4fd6add035';
AWS.config.update({
region: REGION,
credentials: new AWS.CognitoIdentityCredentials({
Id... | Implement S3 sync file helper | Implement S3 sync file helper
| TypeScript | mit | L4GG/timeline,L4GG/timeline,L4GG/timeline | ---
+++
@@ -0,0 +1,41 @@
+// tslint:disable:no-any no-console
+import * as AWS from 'aws-sdk';
+
+const BUCKET_NAME = 'l4gg-timeline.ajhyndman.com';
+const REGION = 'us-east-1';
+const IDENTITY_POOL_ID = 'us-east-1:fa5d5bd8-abdc-4846-a62a-6f4fd6add035';
+
+AWS.config.update({
+ region: REGION,
+ credentials: new AW... | |
e45a98137ecc7363af36721046358e1da5331fad | server/libs/api/subject-functions.ts | server/libs/api/subject-functions.ts | ///<reference path="../../../typings/globals/mysql/index.d.ts"/>
import * as mysql from 'mysql';
import { Subject } from '../../../client/sharedClasses/subject';
export class SubjectFunctions {
/**
* Callback for responding with available subject names from the Database as a JSON object
*
* @callb... | Add subject functions - Support API functions | Add subject functions
- Support API functions
| TypeScript | mit | shavindraSN/examen,shavindraSN/examen,shavindraSN/examen | ---
+++
@@ -0,0 +1,32 @@
+///<reference path="../../../typings/globals/mysql/index.d.ts"/>
+import * as mysql from 'mysql';
+import { Subject } from '../../../client/sharedClasses/subject';
+
+export class SubjectFunctions {
+
+ /**
+ * Callback for responding with available subject names from the Database as ... | |
4d247a4827340d71d549ebbd718b91c069b7110e | script/find-trickline-exe.ts | script/find-trickline-exe.ts | import * as fs from 'fs';
import * as path from 'path';
const rootDir = path.dirname(require.resolve('../package.json'));
if (!fs.existsSync(path.join(rootDir, 'out'))) {
throw new Error('Package the app first!');
}
const dirName = fs.readdirSync(path.join(rootDir, 'out'))
.find(x => !!x.match(/^.+-.+-.+$/));
i... | Add a script which just dumps the path to the trickline exe | Add a script which just dumps the path to the trickline exe
| TypeScript | bsd-3-clause | paulcbetts/trickline,paulcbetts/trickline,paulcbetts/trickline,paulcbetts/trickline | ---
+++
@@ -0,0 +1,28 @@
+import * as fs from 'fs';
+import * as path from 'path';
+
+const rootDir = path.dirname(require.resolve('../package.json'));
+
+if (!fs.existsSync(path.join(rootDir, 'out'))) {
+ throw new Error('Package the app first!');
+}
+
+const dirName = fs.readdirSync(path.join(rootDir, 'out'))
+ .... | |
cacd7705f88a96ec62163ab78229e0479bb57e85 | functions/src/__tests__/patch/validators.ts | functions/src/__tests__/patch/validators.ts | import { required, failure, success } from '../../patch/validator'
describe('validators', () => {
describe('required', () => {
it('failure on undefined values', () => {
const result = required(undefined)
expect(result).toEqual(failure('Required'))
})
it('failure on ... | Add test for required validator | Add test for required validator
| TypeScript | apache-2.0 | squanchy-dev/squanchy-firebase,squanchy-dev/squanchy-firebase | ---
+++
@@ -0,0 +1,25 @@
+import { required, failure, success } from '../../patch/validator'
+
+describe('validators', () => {
+ describe('required', () => {
+ it('failure on undefined values', () => {
+ const result = required(undefined)
+ expect(result).toEqual(failure('Required'))
+... | |
97a54e6c5d8b7b13ad2865ccd9341d6594835e36 | Demo/Types/StudyEventArgs.ts | Demo/Types/StudyEventArgs.ts | class StudyEventArgs {
constructor(study: StudyParams) {
this._studyParams = study;
}
private _studyParams: StudyParams;
public get StudyParams(): StudyParams{
return this._studyParams;
};
public set StudyParams(instance: StudyParams) {
this._studyParams = instance;
};
} | Include missing file and Fix build error | Include missing file and Fix build error
| TypeScript | mit | Zaid-Safadi/dicom-webJS | ---
+++
@@ -0,0 +1,14 @@
+class StudyEventArgs {
+ constructor(study: StudyParams) {
+ this._studyParams = study;
+ }
+
+ private _studyParams: StudyParams;
+
+ public get StudyParams(): StudyParams{
+ return this._studyParams;
+ };
+ public set StudyParams(instance: StudyParams) {
+ this.... | |
eaf6a9651421405ea14a837fb39606de8814a32a | src/app/gallery/mocks/mock-data.ts | src/app/gallery/mocks/mock-data.ts | import { AlbumInfo } from '../album-info';
export const MOCK_ALBUMDATA: AlbumInfo = {
albumId: 1,
title: 'title',
name: 'name',
description: 'description',
imagesInAlbum: 8,
imagesPerPage: 4,
totalPages: 2,
iconUrl: 'http://url/jpg.jpg'
};
export const MOCK_IMAGEDATA = {
id: 1,
title: 'img_title',... | Refactor gallery mock data for tests | Refactor gallery mock data for tests
| TypeScript | apache-2.0 | jbrowneuk/jblog,jbrowneuk/jblog,jbrowneuk/jblog,jbrowneuk/jblog | ---
+++
@@ -0,0 +1,26 @@
+import { AlbumInfo } from '../album-info';
+
+export const MOCK_ALBUMDATA: AlbumInfo = {
+ albumId: 1,
+ title: 'title',
+ name: 'name',
+ description: 'description',
+ imagesInAlbum: 8,
+ imagesPerPage: 4,
+ totalPages: 2,
+ iconUrl: 'http://url/jpg.jpg'
+};
+
+export const MOCK_IMA... | |
76685240e688f6083d7a674f0cb25a959cf0e401 | test/src/testcomm.ts | test/src/testcomm.ts | // Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
'use strict';
import expect = require('expect.js');
import { IComm, ICommInfo, ICommManager } from '../../lib/icomm';
import { IKernel } from '../../lib/ikernel';
import { startNewKernel } from '../../lib/kernel... | Add a stub for comm tests | Add a stub for comm tests
| TypeScript | bsd-3-clause | jupyter/jupyter-js-services,blink1073/jupyter-js-services,jupyterlab/services,minrk/jupyter-js-services,blink1073/services,blink1073/services,blink1073/jupyter-js-services,blink1073/jupyter-js-services,jupyter/jupyter-js-services,blink1073/services,jupyter/jupyter-js-services,jupyterlab/services,minrk/jupyter-js-servic... | ---
+++
@@ -0,0 +1,19 @@
+// Copyright (c) Jupyter Development Team.
+// Distributed under the terms of the Modified BSD License.
+'use strict';
+
+import expect = require('expect.js');
+
+import { IComm, ICommInfo, ICommManager } from '../../lib/icomm';
+
+import { IKernel } from '../../lib/ikernel';
+
+import { s... | |
7229192eaeee97f043626a75f88774dee6819d2f | src/Test/Ast/Config/Video.ts | src/Test/Ast/Config/Video.ts | import { expect } from 'chai'
import { Up } from '../../../index'
import { insideDocumentAndParagraph } from '../Helpers'
import { VideoNode } from '../../../SyntaxNodes/VideoNode'
import { DocumentNode } from '../../../SyntaxNodes/DocumentNode'
describe('The term that represents video conventions', () => {
const... | Add 2 config tests, 1 passing and 1 failing | Add 2 config tests, 1 passing and 1 failing
| TypeScript | mit | start/up,start/up | ---
+++
@@ -0,0 +1,34 @@
+import { expect } from 'chai'
+import { Up } from '../../../index'
+import { insideDocumentAndParagraph } from '../Helpers'
+import { VideoNode } from '../../../SyntaxNodes/VideoNode'
+import { DocumentNode } from '../../../SyntaxNodes/DocumentNode'
+
+
+describe('The term that represents vi... | |
4cce2b54a5c7a4645937fc398c0c4b0d1d30d446 | src/common-ui/components/pioneer-plan-banner.tsx | src/common-ui/components/pioneer-plan-banner.tsx | import * as React from 'react'
import styled from 'styled-components'
import { PrimaryAction } from 'src/common-ui/components/design-library/actions/PrimaryAction'
import { SecondaryAction } from 'src/common-ui/components/design-library/actions/SecondaryAction'
import Icon from '@worldbrain/memex-common/lib/common-ui/... | Create re-usable pioneer plan banner component | Create re-usable pioneer plan banner component
| TypeScript | mit | WorldBrain/WebMemex,WorldBrain/WebMemex | ---
+++
@@ -0,0 +1,89 @@
+import * as React from 'react'
+import styled from 'styled-components'
+
+import { PrimaryAction } from 'src/common-ui/components/design-library/actions/PrimaryAction'
+import { SecondaryAction } from 'src/common-ui/components/design-library/actions/SecondaryAction'
+import Icon from '@world... | |
6fe95608e0e629fae10fbdabc846554919c66d28 | src/coalesce-vue-vuetify2/src/build.ts | src/coalesce-vue-vuetify2/src/build.ts | /** Component name resolver for unplugin-vue-components. */
export function CoalesceVuetifyResolver() {
return {
type: "component",
resolve: (name: string) => {
if (name.match(/^C[A-Z]/))
return { name, from: "coalesce-vue-vuetify/lib" };
},
} as const;
}
| /** Component name resolver for unplugin-vue-components. */
let moduleName: Promise<string>;
export function CoalesceVuetifyResolver() {
moduleName = (async () => {
// See if coalesce-vue-vuetify2 was aliased in package.json as coalesce-vue-vuetify.
// We have to do so in a way that will work in both ESM and... | Make CoalesceVuetifyResolver automatically detect if coalesce-vue-vuetify2 was aliased as coalesce-vue-vuetify via package.json | Make CoalesceVuetifyResolver automatically detect if coalesce-vue-vuetify2 was aliased as coalesce-vue-vuetify via package.json
| TypeScript | apache-2.0 | IntelliTect/Coalesce,IntelliTect/Coalesce,IntelliTect/Coalesce,IntelliTect/Coalesce | ---
+++
@@ -1,11 +1,30 @@
/** Component name resolver for unplugin-vue-components. */
+let moduleName: Promise<string>;
export function CoalesceVuetifyResolver() {
+ moduleName = (async () => {
+ // See if coalesce-vue-vuetify2 was aliased in package.json as coalesce-vue-vuetify.
+ // We have to do so in a... |
5f5096c9d1667e17c8ad5ff7dd0a3065b826b41b | src/collections/collections.component.spec.ts | src/collections/collections.component.spec.ts | import { Observable } from 'rxjs';
import { provide } from '@angular/core';
import {
describe, it, inject, beforeEachProviders, expect
} from '@angular/core/testing';
import { CollectionService } from './collection.service.ts';
import { CollectionsComponent } from './collections.component.ts';
import { HelpService }... | Add a CollectionsComponent test suite. | Add a CollectionsComponent test suite.
| TypeScript | bsd-2-clause | ohsu-qin/qiprofile,ohsu-qin/qiprofile,ohsu-qin/qiprofile,ohsu-qin/qiprofile | ---
+++
@@ -0,0 +1,51 @@
+import { Observable } from 'rxjs';
+import { provide } from '@angular/core';
+import {
+ describe, it, inject, beforeEachProviders, expect
+} from '@angular/core/testing';
+
+import { CollectionService } from './collection.service.ts';
+import { CollectionsComponent } from './collections.co... | |
359b1d65810ddfb0bd8944682e50264c6b8115f3 | client/src/app/admin/import.component.spec.ts | client/src/app/admin/import.component.spec.ts | import {ComponentFixture, TestBed, async} from "@angular/core/testing";
import { Observable } from "rxjs";
import {FormsModule} from "@angular/forms";
import {AdminService} from "./admin.service";
import {RouterTestingModule} from "@angular/router/testing";
import {NavbarComponent} from "../navbar/navbar.component";
im... | Add tests for import component | Add tests for import component
| TypeScript | mit | UMM-CSci-3601-S17/digital-display-garden-iteration-4-dorfner-v2,UMM-CSci-3601-S17/digital-display-garden-iteration-4-dorfner-v2,UMM-CSci-3601-S17/digital-display-garden-iteration-3-dorfner,UMM-CSci-3601-S17/digital-display-garden-iteration-4-dorfner-v2,UMM-CSci-3601-S17/digital-display-garden-iteration-3-dorfner,UMM-CS... | ---
+++
@@ -0,0 +1,52 @@
+import {ComponentFixture, TestBed, async} from "@angular/core/testing";
+import { Observable } from "rxjs";
+import {FormsModule} from "@angular/forms";
+import {AdminService} from "./admin.service";
+import {RouterTestingModule} from "@angular/router/testing";
+import {NavbarComponent} from... | |
37089caa2777114ed2b350aa2468413daf2bbd1d | app/data/Crumpet.ts | app/data/Crumpet.ts |
type CrumpetType = "English" | "Scottish" | "Square" | "Pikelet";
export const CrumpetTypes = {
English: "English" as CrumpetType,
Scottish: "Scottish" as CrumpetType,
Square: "Square" as CrumpetType,
Pikelet: "Pikelet" as CrumpetType
};
export interface Crumpet {
name:string;
type:CrumpetType... | Define crumpet data. Note the patch for a lack of string based enums to be fixed in a future version of TypeScript. | Define crumpet data. Note the patch for a lack of string based enums to be fixed in a future version of TypeScript.
| TypeScript | unlicense | luketn/WonderCrumpet | ---
+++
@@ -0,0 +1,13 @@
+
+type CrumpetType = "English" | "Scottish" | "Square" | "Pikelet";
+export const CrumpetTypes = {
+ English: "English" as CrumpetType,
+ Scottish: "Scottish" as CrumpetType,
+ Square: "Square" as CrumpetType,
+ Pikelet: "Pikelet" as CrumpetType
+};
+
+export interface Crumpet {
... | |
e94aa8681316af490984ac256fac90f1b02cf377 | src/helpers/getClosestElement.spec.ts | src/helpers/getClosestElement.spec.ts | import { getClosestElement } from './getClosestElement';
describe('getClosestElement', () => {
it('gets the closest ancestor matching the given selector', () => {
const ANCESTOR_ID = 'foo';
const ancestor = document.createElement('div');
ancestor.setAttribute('id', ANCESTOR_ID);
c... | import { getClosestElement } from './getClosestElement';
describe('getClosestElement', () => {
it('gets the closest ancestor matching the given selector', () => {
const ANCESTOR_ID = 'foo';
const ancestor = document.createElement('div');
ancestor.setAttribute('id', ANCESTOR_ID);
c... | Add a couple more tests for get closest element function | Add a couple more tests for get closest element function
| TypeScript | mit | springload/react-accessible-accordion,springload/react-accessible-accordion,springload/react-accessible-accordion | ---
+++
@@ -15,4 +15,38 @@
ancestor,
);
});
+
+ it('gets the closest ancestor several levels up', () => {
+ const ANCESTOR_ID = 'foo';
+ const DESCENDANT_ID = 'bar';
+
+ const ancestor = document.createElement('div');
+ ancestor.setAttribute('id', ANCESTOR_ID)... |
bb1ac7d58548f95d5553f93bac4e5b805dabdcc2 | src/language/language.ts | src/language/language.ts | import * as _ from 'lodash';
/**
* Makes an array filled with a value.
*
* @method dup
* @param value {any} the array item value
* @param n {number} the array size
* @return the array of size *n* filled with *value*
*/
function dup(value: any, n: number) {
return _.fill(new Array(n), value);
}
export { dup }... | Add the dup utility function. | Add the dup utility function.
| TypeScript | bsd-2-clause | ohsu-qin/qiprofile,ohsu-qin/qiprofile,ohsu-qin/qiprofile,ohsu-qin/qiprofile | ---
+++
@@ -0,0 +1,15 @@
+import * as _ from 'lodash';
+
+/**
+ * Makes an array filled with a value.
+ *
+ * @method dup
+ * @param value {any} the array item value
+ * @param n {number} the array size
+ * @return the array of size *n* filled with *value*
+ */
+function dup(value: any, n: number) {
+ return _.fill(... | |
8ba11eae235679b9373954119db4f99694f8ea48 | packages/commutable/__tests__/notebook.spec.ts | packages/commutable/__tests__/notebook.spec.ts | import Immutable from "immutable";
import { fromJS, parseNotebook, toJS } from "../src/notebook";
import { makeNotebookRecord } from "../src/structures";
describe("parseNotebook", () => {
it("parses a string notebook", () => {
const notebook = `{
"cells": [],
"metadata": {
"kernel_info": {
"name": "pytho... | Add tests for notebook sub-module in commutable | Add tests for notebook sub-module in commutable
| TypeScript | bsd-3-clause | nteract/composition,nteract/composition,nteract/composition,nteract/nteract,nteract/nteract,nteract/nteract,nteract/nteract,nteract/nteract | ---
+++
@@ -0,0 +1,69 @@
+import Immutable from "immutable";
+
+import { fromJS, parseNotebook, toJS } from "../src/notebook";
+import { makeNotebookRecord } from "../src/structures";
+
+describe("parseNotebook", () => {
+ it("parses a string notebook", () => {
+ const notebook = `{
+ "cells": [],
+ "metadata": {... | |
626453312b2ddd7758bbe430ee2939c2ee978aca | src/get.ts | src/get.ts | import { ReadConverter } from '../types/index'
import { readName, readValue } from './converter'
type GetReturn<T, R> = [T] extends [undefined]
? object & { [property: string]: string }
: R | undefined
export default function <T extends string | undefined>(
key: T,
converter: ReadConverter<any> = readValue
):... | import { ReadConverter } from '../types/index'
import { readName, readValue } from './converter'
type GetReturn<T, R> = [T] extends [undefined]
? object & { [property: string]: string }
: R | undefined
export default function <T extends string | undefined>(
key: T,
converter: ReadConverter<any> = readValue
):... | Change cookie lookup to using regex | Change cookie lookup to using regex
Now we don't need to consider an edge case in rather outdated Internet
Explorer we can safely use a regex for this task.
Also reduces the module size..
| TypeScript | mit | carhartl/js-cookie,carhartl/js-cookie | ---
+++
@@ -9,19 +9,14 @@
key: T,
converter: ReadConverter<any> = readValue
): GetReturn<T, typeof converter> {
- // To prevent the for loop in the first place assign an empty array
- // in case there are no cookies at all.
- const cookies: string[] =
- document.cookie.length > 0 ? document.cookie.split(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.