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 |
|---|---|---|---|---|---|---|---|---|---|---|
de39f05e56364a34f00eb4ead9fe1bdbf0163e08 | src/components/type/type.mapper.ts | src/components/type/type.mapper.ts | import { Type } from './type.model';
import { ItemTemplate } from '@core/game_master/gameMaster';
import { Util } from '@util';
export class TypeMapper {
public static Map(rawType: ItemTemplate, typeIds: Map<number, string>): Type {
let type: Type = new Type();
type.id = rawType.templateId
... | import { Type } from './type.model';
import { ItemTemplate } from '@core/game_master/gameMaster';
import { Util } from '@util';
import APP_SETTINGS from '@settings/app';
export class TypeMapper {
public static Map(rawType: ItemTemplate): Type {
let type: Type = new Type();
type.id = rawType.templa... | Add pokemon types - Refactoring | Add pokemon types - Refactoring
| TypeScript | mit | BrunnerLivio/pokemongo-data-normalizer,BrunnerLivio/pokemongo-json-pokedex,BrunnerLivio/pokemongo-json-pokedex,vfcp/pokemongo-json-pokedex,BrunnerLivio/pokemongo-data-normalizer,vfcp/pokemongo-json-pokedex | ---
+++
@@ -1,22 +1,20 @@
import { Type } from './type.model';
import { ItemTemplate } from '@core/game_master/gameMaster';
import { Util } from '@util';
+import APP_SETTINGS from '@settings/app';
export class TypeMapper {
- public static Map(rawType: ItemTemplate, typeIds: Map<number, string>): Type {
+ ... |
83f5cbe1e56d0c1fc8edb6fa2350c9eac26881aa | types/detox/test/detox-jest-setup-tests.ts | types/detox/test/detox-jest-setup-tests.ts | declare var beforeAll: (callback: () => void) => void;
declare var beforeEach: (callback: () => void) => void;
declare var afterAll: (callback: () => void) => void;
import * as detox from "detox";
import * as adapter from "detox/runners/jest/adapter";
// Normally the Detox configuration from the project's package.jso... | declare var beforeAll: (callback: () => void) => void;
declare var beforeEach: (callback: () => void) => void;
declare var afterAll: (callback: () => void) => void;
import detox = require("detox");
import adapter = require("detox/runners/jest/adapter");
// Normally the Detox configuration from the project's package.j... | Use `import = require` in jest setup tests | [detox] Use `import = require` in jest setup tests | TypeScript | mit | georgemarshall/DefinitelyTyped,borisyankov/DefinitelyTyped,georgemarshall/DefinitelyTyped,dsebastien/DefinitelyTyped,markogresak/DefinitelyTyped,mcliment/DefinitelyTyped,dsebastien/DefinitelyTyped,georgemarshall/DefinitelyTyped,georgemarshall/DefinitelyTyped,borisyankov/DefinitelyTyped | ---
+++
@@ -2,8 +2,8 @@
declare var beforeEach: (callback: () => void) => void;
declare var afterAll: (callback: () => void) => void;
-import * as detox from "detox";
-import * as adapter from "detox/runners/jest/adapter";
+import detox = require("detox");
+import adapter = require("detox/runners/jest/adapter");
... |
8650a4129cb24a44c1f221bd877c6e375b52add0 | src/Unosquare.Tubular2.Web/e2e/pageSizeSelector-test.e2e-spec.ts | src/Unosquare.Tubular2.Web/e2e/pageSizeSelector-test.e2e-spec.ts | ///<reference path="../node_modules/@types/jasmine/index.d.ts"/>
import { browser, element, by } from '../node_modules/protractor/built';
describe('page size selector', () =>{
let dataRowsCollection,
firstDataRow,
lastDataRow,
firstPageBtn,
nextPageBtn,
pageSizeSelector,
... | Add page size selector e2e test | Add page size selector e2e test
| TypeScript | mit | unosquare/tubular2,unosquare/tubular2,unosquare/tubular2,unosquare/tubular2 | ---
+++
@@ -0,0 +1,65 @@
+///<reference path="../node_modules/@types/jasmine/index.d.ts"/>
+
+import { browser, element, by } from '../node_modules/protractor/built';
+
+describe('page size selector', () =>{
+ let dataRowsCollection,
+ firstDataRow,
+ lastDataRow,
+ firstPageBtn,
+ next... | |
106523df6771477ebe2cfbaf7a1f6124c4705416 | CrashReporter/languages/ChineseSimplified.ts | CrashReporter/languages/ChineseSimplified.ts | <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
<context>
<name>MainWindow</name>
<message>
<location filename="../mainwindow.ui" line="14"/>
<source>Crash Reporter</source>
<translation>错误报告</translation>
</message>
<message>
<location filename=".... | Update Chinese Simplified Translation for Crash Report | Update Chinese Simplified Translation for Crash Report
| TypeScript | apache-2.0 | YoukaiCat/imgbrd-grabber,Bionus/imgbrd-grabber,YoukaiCat/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber | ---
+++
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1">
+<context>
+ <name>MainWindow</name>
+ <message>
+ <location filename="../mainwindow.ui" line="14"/>
+ <source>Crash Reporter</source>
+ <translation>错误报告</translation>
+ </message>
+ <... | |
4696bc75849d4c62a9eba78007e35a1685e24b6b | shared/utils/tool-homepages.ts | shared/utils/tool-homepages.ts | /**
* Copyright 2020 Google Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law ... | Add utility for getting tool homepages | Add utility for getting tool homepages
| TypeScript | apache-2.0 | GoogleChromeLabs/tooling.report,GoogleChromeLabs/tooling.report,GoogleChromeLabs/tooling.report | ---
+++
@@ -0,0 +1,16 @@
+/**
+ * Copyright 2020 Google Inc. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * ... | |
4a7e0dc9602ebec4478ea0078eeb266a0b8763d8 | projects/hslayers/src/common/dimension.spec.ts | projects/hslayers/src/common/dimension.spec.ts | import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';
import {CUSTOM_ELEMENTS_SCHEMA} from '@angular/core';
import {HsDimensionService} from './dimension.service';
import {HsMapService} from '../components/map/map.service';
import {HsMapServiceMock}... | Test for dimensions service prepareTimeSteps | test: Test for dimensions service prepareTimeSteps
| TypeScript | mit | hslayers/hslayers-ng,hslayers/hslayers-ng,hslayers/hslayers-ng,hslayers/hslayers-ng | ---
+++
@@ -0,0 +1,50 @@
+import {
+ BrowserDynamicTestingModule,
+ platformBrowserDynamicTesting,
+} from '@angular/platform-browser-dynamic/testing';
+import {CUSTOM_ELEMENTS_SCHEMA} from '@angular/core';
+import {HsDimensionService} from './dimension.service';
+import {HsMapService} from '../components/map/map.s... | |
275ea9b18a262396500a4c66e3b13573082dbf70 | e2e/logout.e2e-spec.ts | e2e/logout.e2e-spec.ts | import { browser, element, by, ElementFinder, protractor, $, ExpectedConditions } from 'protractor';
import { LoginPageOjbect } from './login-page-object';
describe('Logout E2E Test', () => {
let originalTimeout;
let loginPage: LoginPageOjbect;
let moreButton: ElementFinder = element(by.id('barButtonMore... | Add e2e test for test logout behaviour | Add e2e test for test logout behaviour
| TypeScript | mit | IMSmobile/app,IMSmobile/app,IMSmobile/app,IMSmobile/app | ---
+++
@@ -0,0 +1,54 @@
+import { browser, element, by, ElementFinder, protractor, $, ExpectedConditions } from 'protractor';
+import { LoginPageOjbect } from './login-page-object';
+
+describe('Logout E2E Test', () => {
+
+ let originalTimeout;
+ let loginPage: LoginPageOjbect;
+ let moreButton: ElementFinder = ... | |
851cc2aba5afbe076fbfc2bd66d0cc6b784f4d9a | src/Test/Ast/TableCaption.ts | src/Test/Ast/TableCaption.ts | import { expect } from 'chai'
import Up from '../../index'
import { DocumentNode } from '../../SyntaxNodes/DocumentNode'
import { TableNode } from '../../SyntaxNodes/TableNode'
import { EmphasisNode } from '../../SyntaxNodes/EmphasisNode'
import { PlainTextNode } from '../../SyntaxNodes/PlainTextNode'
context("In a ... | Add 2 failing table caption tests | Add 2 failing table caption tests
| TypeScript | mit | start/up,start/up | ---
+++
@@ -0,0 +1,79 @@
+import { expect } from 'chai'
+import Up from '../../index'
+import { DocumentNode } from '../../SyntaxNodes/DocumentNode'
+import { TableNode } from '../../SyntaxNodes/TableNode'
+import { EmphasisNode } from '../../SyntaxNodes/EmphasisNode'
+import { PlainTextNode } from '../../SyntaxNodes... | |
fc8052ec790b2fc43306e12ebf005d1160e2f544 | src/test/Apha/Scheduling/Storage/MemoryScheduleStorage.spec.ts | src/test/Apha/Scheduling/Storage/MemoryScheduleStorage.spec.ts |
import {expect} from "chai";
import {MemoryScheduleStorage} from "../../../../main/Apha/Scheduling/Storage/MemoryScheduleStorage";
import {ScheduledEvent} from "../../../../main/Apha/Scheduling/Storage/ScheduleStorage";
import {Event} from "../../../../main/Apha/Message/Event";
describe("MemoryScheduleStorage", () =>... | Add test for schedule storage. | Add test for schedule storage.
| TypeScript | mit | martyn82/aphajs | ---
+++
@@ -0,0 +1,64 @@
+
+import {expect} from "chai";
+import {MemoryScheduleStorage} from "../../../../main/Apha/Scheduling/Storage/MemoryScheduleStorage";
+import {ScheduledEvent} from "../../../../main/Apha/Scheduling/Storage/ScheduleStorage";
+import {Event} from "../../../../main/Apha/Message/Event";
+
+descr... | |
e2b8a8bb01b2c1b95202e03107db125c89e8332f | src/Test/Html/Config/Footnote.ts | src/Test/Html/Config/Footnote.ts | import { expect } from 'chai'
import { Up } from '../../../index'
import { FootnoteNode } from '../../../SyntaxNodes/FootnoteNode'
import { FootnoteBlockNode } from '../../../SyntaxNodes/FootnoteBlockNode' | Add empty file for footnote html config tests | Add empty file for footnote html config tests
| TypeScript | mit | start/up,start/up | ---
+++
@@ -0,0 +1,4 @@
+import { expect } from 'chai'
+import { Up } from '../../../index'
+import { FootnoteNode } from '../../../SyntaxNodes/FootnoteNode'
+import { FootnoteBlockNode } from '../../../SyntaxNodes/FootnoteBlockNode' | |
93b4ea5be43eda0d70963c54af80721cfa27b2ac | src/utils/maps.ts | src/utils/maps.ts | /*
Copyright 2020 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 ... | Create Maps utility comparison functions | Create Maps utility comparison functions
| TypeScript | apache-2.0 | matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk | ---
+++
@@ -0,0 +1,49 @@
+/*
+Copyright 2020 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... | |
67894c08e837be1ee81af002ec534d8a8d5c73d2 | app/src/lib/to-milliseconds.ts | app/src/lib/to-milliseconds.ts | import { assertNever } from './fatal-error'
type Unit = 'year' | 'day' | 'hour' | 'minute' | 'second'
type Plural = `${Unit}s`
export function toMilliseconds(value: 1, unit: Unit): number
export function toMilliseconds(value: number, unit: Plural): number
export function toMilliseconds(value: number, unit: Unit | Plu... | Add a helper function for converting time to milliseconds | Add a helper function for converting time to milliseconds
| TypeScript | mit | desktop/desktop,desktop/desktop,shiftkey/desktop,desktop/desktop,shiftkey/desktop,shiftkey/desktop,desktop/desktop,shiftkey/desktop | ---
+++
@@ -0,0 +1,28 @@
+import { assertNever } from './fatal-error'
+
+type Unit = 'year' | 'day' | 'hour' | 'minute' | 'second'
+type Plural = `${Unit}s`
+
+export function toMilliseconds(value: 1, unit: Unit): number
+export function toMilliseconds(value: number, unit: Plural): number
+export function toMilliseco... | |
8900999afa75652f5e1a9ef656ba4b552dc861d3 | src/functions/tokeniseSentence.ts | src/functions/tokeniseSentence.ts | import { TokenisedPhrase } from '@/types'
import { tokeniseWord } from '@/functions/tokeniseWord'
export function tokeniseSentence(
sentence: string,
splitBy: string[],
alphabets: string[],
): TokenisedPhrase[] {
/**
* Takes a string and converts it to tokens. Tokens are dicts that instruct
* the rendere... | Make function to make tokens from a sentence | Make function to make tokens from a sentence
| TypeScript | mit | rossjrw/gallifreyo,rossjrw/gallifreyo,rossjrw/gallifreyo | ---
+++
@@ -0,0 +1,46 @@
+import { TokenisedPhrase } from '@/types'
+import { tokeniseWord } from '@/functions/tokeniseWord'
+
+export function tokeniseSentence(
+ sentence: string,
+ splitBy: string[],
+ alphabets: string[],
+): TokenisedPhrase[] {
+ /**
+ * Takes a string and converts it to tokens. Tokens are... | |
01b8c8e9d68193a3f4044f5a0e7a148ba3b8cfd4 | lib/components/map/with-map.tsx | lib/components/map/with-map.tsx | import { MapRef, useMap } from 'react-map-gl'
import React, { Component, FC } from 'react'
/**
* Higher-order component that passes a map prop to its children.
* Intended to wrap around class components that are direct or indirect children of <MapProvider>.
* Function components should use react-map-gl's useMap ins... | Add HOC to access native map object. | improvement(withMap): Add HOC to access native map object.
| TypeScript | mit | opentripplanner/otp-react-redux,opentripplanner/otp-react-redux,opentripplanner/otp-react-redux,opentripplanner/otp-react-redux | ---
+++
@@ -0,0 +1,18 @@
+import { MapRef, useMap } from 'react-map-gl'
+import React, { Component, FC } from 'react'
+
+/**
+ * Higher-order component that passes a map prop to its children.
+ * Intended to wrap around class components that are direct or indirect children of <MapProvider>.
+ * Function components sh... | |
0a3b928fef3fd05df5d3ddc7f45a549d14c79d82 | src/utils/turkopticon.ts | src/utils/turkopticon.ts | import axios from 'axios';
export const fetchRequesterTO = async (requesterIds: string[]) => {
const x = await axios.get(`https://turkopticon.ucsd.edu/api/multi-attrs.php?ids=`);
return x;
};
| Add stub utility function for querying TO | Add stub utility function for querying TO
| TypeScript | mit | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | ---
+++
@@ -0,0 +1,6 @@
+import axios from 'axios';
+
+export const fetchRequesterTO = async (requesterIds: string[]) => {
+ const x = await axios.get(`https://turkopticon.ucsd.edu/api/multi-attrs.php?ids=`);
+ return x;
+}; | |
bd39fc72c6ea8304c00f7b469635b5bbbeeb1d17 | tests/cases/fourslash/quicklInfoDisplayPartsInterface.ts | tests/cases/fourslash/quicklInfoDisplayPartsInterface.ts | /// <reference path='fourslash.ts'/>
////interface /*1*/i {
////}
////var /*2*/iInstance: /*3*/i;
goTo.marker('1');
verify.verifyQuickInfo("interface", "", { start: test.markerByName("1").position, length: "i".length },
[{ text: "interface", kind: "keyword" }, { text: " ", kind: "space" }, { text: "i", ki... | Test case for interface display parts | Test case for interface display parts
| TypeScript | apache-2.0 | kpreisser/TypeScript,HereSinceres/TypeScript,synaptek/TypeScript,HereSinceres/TypeScript,chuckjaz/TypeScript,OlegDokuka/TypeScript,Microsoft/TypeScript,donaldpipowitch/TypeScript,ziacik/TypeScript,shanexu/TypeScript,mihailik/TypeScript,OlegDokuka/TypeScript,chocolatechipui/TypeScript,AbubakerB/TypeScript,weswigham/Type... | ---
+++
@@ -0,0 +1,22 @@
+/// <reference path='fourslash.ts'/>
+
+////interface /*1*/i {
+////}
+////var /*2*/iInstance: /*3*/i;
+
+goTo.marker('1');
+verify.verifyQuickInfo("interface", "", { start: test.markerByName("1").position, length: "i".length },
+ [{ text: "interface", kind: "keyword" }, { text: " ", kind... | |
9360ca5ab0a653176ce3bd1794c8a4cc4fd0f316 | client/Components/StatBlock.test.tsx | client/Components/StatBlock.test.tsx | import * as React from "react";
import * as renderer from "react-test-renderer";
import { StatBlock } from "../../common/StatBlock";
import { DefaultRules } from "../Rules/Rules";
import { buildStatBlockTextEnricher } from "../test/buildEncounter";
import { StatBlockComponent } from "./StatBlock";
describe("StatBlock ... | Test that StatBlock component renders its name | Test that StatBlock component renders its name
| TypeScript | mit | cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative | ---
+++
@@ -0,0 +1,20 @@
+import * as React from "react";
+import * as renderer from "react-test-renderer";
+import { StatBlock } from "../../common/StatBlock";
+import { DefaultRules } from "../Rules/Rules";
+import { buildStatBlockTextEnricher } from "../test/buildEncounter";
+import { StatBlockComponent } from "./... | |
292688119b54d0a9f404690d9d3ff5aa3419399a | src/renderer/constants/dictionary.ts | src/renderer/constants/dictionary.ts | export const MonthsList = [
'January',
'February',
'March',
'April',
'May',
'June',
'July',
'August',
'September',
'October',
'November',
'December',
];
export const DaysList = [
'Monday',
'Tuesday',
'Wednesday',
'Thursday',
'Friday',
'Saturday',
'Sunday',
];
| Add months and days list | Add months and days list
| TypeScript | apache-2.0 | Nersent/Wexond,Nersent/Wexond | ---
+++
@@ -0,0 +1,24 @@
+export const MonthsList = [
+ 'January',
+ 'February',
+ 'March',
+ 'April',
+ 'May',
+ 'June',
+ 'July',
+ 'August',
+ 'September',
+ 'October',
+ 'November',
+ 'December',
+];
+
+export const DaysList = [
+ 'Monday',
+ 'Tuesday',
+ 'Wednesday',
+ 'Thursday',
+ 'Friday',
+ ... | |
2266b78d831945bcb0966ed6564730032b3bb35b | app/features/SectionDivider/index.tsx | app/features/SectionDivider/index.tsx | import * as React from 'react';
import styled from 'styled-components';
import { Draggable, DragMode, Unregister } from 'core/interactions/handlers/draggable';
interface Props {
onDrag: (deltaY: number) => void;
}
export class SectionDivider extends React.Component<Props, {}> {
draggable = new Draggable({ mode: ... | import * as React from 'react';
import styled from 'styled-components';
import { Draggable, DragMode, Unregister } from 'core/interactions/handlers/draggable';
interface Props {
onDrag: (deltaY: number) => void;
}
export class SectionDivider extends React.Component<Props, {}> {
draggable = new Draggable({ mode: ... | Adjust size of section divider | Adjust size of section divider
| TypeScript | mit | cannoneyed/fiddle,cannoneyed/fiddle,cannoneyed/fiddle | ---
+++
@@ -36,7 +36,7 @@
const Divider = styled.div`
width: 100%;
- height: 10px;
+ height: 3px;
background-color: black;
cursor: row-resize;
`; |
0dca9096133632281cd91f65e0ecd3a8a8660509 | helpers/Array+first.ts | helpers/Array+first.ts | declare global {
interface Array<T> {
first(): T | undefined
}
}
Array.prototype.first = function first(): Element | undefined {
if (this.length > 0) {
return this[0]
} else {
return undefined
}
}
export {}
| Add currently unused Array.prototype.first extension | Add currently unused Array.prototype.first extension
| TypeScript | mit | JosephDuffy/josephduffy.co.uk,JosephDuffy/josephduffy.co.uk,JosephDuffy/josephduffy.co.uk | ---
+++
@@ -0,0 +1,15 @@
+declare global {
+ interface Array<T> {
+ first(): T | undefined
+ }
+}
+
+Array.prototype.first = function first(): Element | undefined {
+ if (this.length > 0) {
+ return this[0]
+ } else {
+ return undefined
+ }
+}
+
+export {} | |
c8a1268df576cfcb92e068ec059d83e2a2f6f663 | test/e2e/console/console-eval-fake_test.ts | test/e2e/console/console-eval-fake_test.ts | // Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import {assert} from 'chai';
import {describe, it} from 'mocha';
import {click, getBrowserAndPages, pasteText, step} from '../../shared/helper.js';
impor... | Add e2e test for fake eval in Console | Add e2e test for fake eval in Console
This patch ports the following layout test:
https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/web_tests/http/tests/devtools/console/console-eval-fake.js;drc=78e2bc9c2def358a0745878ffc66ce85ee5221d8
CL removing the upstream test:
https://chromium-review.... | TypeScript | bsd-3-clause | ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend | ---
+++
@@ -0,0 +1,51 @@
+// Copyright 2020 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+import {assert} from 'chai';
+import {describe, it} from 'mocha';
+
+import {click, getBrowserAndPages, pasteText, step} f... | |
8b40723e0b301bf51a7a7f5d465bf65292e9cf8f | opr-core/src/server/customrequesthandler.ts | opr-core/src/server/customrequesthandler.ts | import type {Request} from 'express';
/**
* Interface for custom request handlers for OprServer. This interface requires
* that the request body is a (possibly empty) JSON object, and that the
* response is a JSON object. The response object is not directly available. If
* the handler encounters a problem it must ... | Support custom request handlers, and add a Google Cloud custom request handler that checks identity tokens | Support custom request handlers, and add a Google Cloud custom request handler that checks identity tokens
| TypeScript | apache-2.0 | google/open-product-recovery,google/open-product-recovery,google/open-product-recovery | ---
+++
@@ -0,0 +1,11 @@
+import type {Request} from 'express';
+
+/**
+ * Interface for custom request handlers for OprServer. This interface requires
+ * that the request body is a (possibly empty) JSON object, and that the
+ * response is a JSON object. The response object is not directly available. If
+ * the han... | |
5ab573ae056e99f44c8d48f6548e80574fa744b1 | test/property-decorators/to-uppercase.spec.ts | test/property-decorators/to-uppercase.spec.ts | import { ToUppercase } from './../../src/';
describe('ToUppercase decorator', () => {
it('should throw an error when is applied over non string property', () => {
class TestClassToUppercaseProperty {
@ToUppercase() myProp: number;
}
let testClass = new TestClassToUppercasePrope... | Add unit tests for ToUppercase decorator | Add unit tests for ToUppercase decorator
| TypeScript | mit | semagarcia/typescript-decorators,semagarcia/typescript-decorators | ---
+++
@@ -0,0 +1,57 @@
+import { ToUppercase } from './../../src/';
+
+describe('ToUppercase decorator', () => {
+
+ it('should throw an error when is applied over non string property', () => {
+ class TestClassToUppercaseProperty {
+ @ToUppercase() myProp: number;
+ }
+ let testC... | |
ec07e4fbdce17062a137e6ee30d164831c6df0d9 | app/src/ui/dialog/ok-cancel-button-group.tsx | app/src/ui/dialog/ok-cancel-button-group.tsx | import * as React from 'react'
import * as classNames from 'classnames'
import { Button } from '../lib/button'
interface IOkCancelButtonGroupProps {
/**
* An optional className to be applied to the rendered div element.
*/
readonly className?: string
readonly destructive?: boolean
readonly okButtonText... | Add first attempt at a declarative button group | Add first attempt at a declarative button group
| TypeScript | mit | artivilla/desktop,say25/desktop,desktop/desktop,desktop/desktop,say25/desktop,desktop/desktop,say25/desktop,shiftkey/desktop,j-f1/forked-desktop,kactus-io/kactus,j-f1/forked-desktop,shiftkey/desktop,kactus-io/kactus,shiftkey/desktop,j-f1/forked-desktop,kactus-io/kactus,artivilla/desktop,desktop/desktop,shiftkey/desktop... | ---
+++
@@ -0,0 +1,124 @@
+import * as React from 'react'
+import * as classNames from 'classnames'
+import { Button } from '../lib/button'
+
+interface IOkCancelButtonGroupProps {
+ /**
+ * An optional className to be applied to the rendered div element.
+ */
+ readonly className?: string
+
+ readonly destruc... | |
15082bcf9aee384a9b3e57b8b0736cffb120324e | src/styles/elements/button.ts | src/styles/elements/button.ts | const theme = {
verticalAlign: '',
background: '',
textColor: '',
fontFamily: '',
horizontalMargin: '',
verticalMargin: '',
verticalPadding: '',
horizontalPadding: '',
shadowOffset: '',
textTransform: '',
textShadow: '',
fontWeight: '',
lineHeight: '',
borderRadius: '',
boxShadow: '',
tr... | Add sample style object for Button | Add sample style object for Button
| TypeScript | mit | maxdeviant/semantic-ui-css-in-js,maxdeviant/semantic-ui-css-in-js | ---
+++
@@ -0,0 +1,55 @@
+const theme = {
+ verticalAlign: '',
+ background: '',
+ textColor: '',
+ fontFamily: '',
+ horizontalMargin: '',
+ verticalMargin: '',
+ verticalPadding: '',
+ horizontalPadding: '',
+ shadowOffset: '',
+ textTransform: '',
+ textShadow: '',
+ fontWeight: '',
+ lineHeight: '',
... | |
c4c32b1e2b4138bfd4a1dcef80556baf30fa995e | test/EventListenerDataSpec.ts | test/EventListenerDataSpec.ts | import EventDispatcher from "../src/lib/EventDispatcher";
import EventListenerData from "../src/lib/EventListenerData";
import chai = require('chai');
import sinon = require('sinon');
import sinonChai = require('sinon-chai');
import BasicEvent from "../src/lib/event/BasicEvent";
const {expect} = chai;
chai.use(sinonCha... | Add unit test for EventListenerData | Add unit test for EventListenerData
| TypeScript | mit | mediamonks/seng-event,mediamonks/seng-event | ---
+++
@@ -0,0 +1,25 @@
+import EventDispatcher from "../src/lib/EventDispatcher";
+import EventListenerData from "../src/lib/EventListenerData";
+import chai = require('chai');
+import sinon = require('sinon');
+import sinonChai = require('sinon-chai');
+import BasicEvent from "../src/lib/event/BasicEvent";
+const ... | |
ff53321059f0eb50c3b0ca9adf7d5d98fe88138b | src/events/gestures/pointer_map.ts | src/events/gestures/pointer_map.ts | export interface PointerMapEntry<T> {
id: number;
value: T;
}
export type PointerMap<T> = PointerMapEntry<T>[];
export type PointerMapList<T> = PointerMap<T[]>;
export function pointerMapSet<T>(map: PointerMap<T>, id: number, value: T) {
for (let i = 0; i < map.length; i++) {
const item = map[i];
... | Add pointer map data structure | Add pointer map data structure
| TypeScript | mit | ivijs/ivi,ivijs/ivi | ---
+++
@@ -0,0 +1,84 @@
+export interface PointerMapEntry<T> {
+ id: number;
+ value: T;
+}
+
+export type PointerMap<T> = PointerMapEntry<T>[];
+export type PointerMapList<T> = PointerMap<T[]>;
+
+export function pointerMapSet<T>(map: PointerMap<T>, id: number, value: T) {
+ for (let i = 0; i < map.length;... | |
435fd38cb17645073f6f9d08ee3dc3fafa3769a9 | test/property-decorators/min.spec.ts | test/property-decorators/min.spec.ts | import { Min } from './../../src/';
describe('LoggerMethod decorator', () => {
it('should assign a valid value (greater or equals than min value)', () => {
class TestClassMinValue {
@Min(5)
myNumber: number;
}
let testClass = new TestClassMinValue();
testCl... | Add unit tests for min decorator | Add unit tests for min decorator
| TypeScript | mit | semagarcia/typescript-decorators,semagarcia/typescript-decorators | ---
+++
@@ -0,0 +1,50 @@
+import { Min } from './../../src/';
+
+describe('LoggerMethod decorator', () => {
+
+ it('should assign a valid value (greater or equals than min value)', () => {
+ class TestClassMinValue {
+ @Min(5)
+ myNumber: number;
+ }
+
+ let testClass = n... | |
0181eb9423f25208792dbe26523159bbdcb18955 | src/adhocracy/adhocracy/frontend/static/js/Packages/MetaApi/MetaApiSpec.ts | src/adhocracy/adhocracy/frontend/static/js/Packages/MetaApi/MetaApiSpec.ts | /// <reference path="../../../lib/DefinitelyTyped/jasmine/jasmine.d.ts"/>
import AdhMetaApi = require("./MetaApi");
var sampleMetaApi : AdhMetaApi.IMetaApi = {
"resources" : {
"adhocracy.resources.root.IRootPool" : {
"sheets" : [
"adhocracy.sheets.name.IName",
"... | Add meta api unit tests. | Add meta api unit tests.
| TypeScript | agpl-3.0 | fhartwig/adhocracy3.mercator,fhartwig/adhocracy3.mercator,xs2maverick/adhocracy3.mercator,liqd/adhocracy3.mercator,liqd/adhocracy3.mercator,liqd/adhocracy3.mercator,xs2maverick/adhocracy3.mercator,fhartwig/adhocracy3.mercator,xs2maverick/adhocracy3.mercator,xs2maverick/adhocracy3.mercator,fhartwig/adhocracy3.mercator,f... | ---
+++
@@ -0,0 +1,92 @@
+/// <reference path="../../../lib/DefinitelyTyped/jasmine/jasmine.d.ts"/>
+
+import AdhMetaApi = require("./MetaApi");
+
+var sampleMetaApi : AdhMetaApi.IMetaApi = {
+ "resources" : {
+ "adhocracy.resources.root.IRootPool" : {
+ "sheets" : [
+ "adhocracy.s... | |
2b7c10cc0e2dddaf87cd652ea220950d9fecc613 | test/media_providers/Disk/DiskStrategy.ts | test/media_providers/Disk/DiskStrategy.ts | /// <reference path="../../../node_modules/@types/mocha/index.d.ts" />
/// <reference path="../../../node_modules/@types/chai/index.d.ts" />
/**
* Module dependencies.
*/
import * as chai from 'chai';
import * as chai_as_promised from 'chai-as-promised';
import * as mock from 'mock-require';
import * as path from 'pat... | Create test for disk strategy | Create test for disk strategy
| TypeScript | mit | robertmain/jukebox,robertmain/jukebox | ---
+++
@@ -0,0 +1,74 @@
+/// <reference path="../../../node_modules/@types/mocha/index.d.ts" />
+/// <reference path="../../../node_modules/@types/chai/index.d.ts" />
+
+/**
+* Module dependencies.
+*/
+import * as chai from 'chai';
+import * as chai_as_promised from 'chai-as-promised';
+import * as mock from 'mock-... | |
359d4626415ea07a11c1864a285bbc16ca85e888 | app/src/lib/git/environment.ts | app/src/lib/git/environment.ts | import { envForAuthentication } from './authentication'
import { IGitAccount } from '../../models/git-account'
/**
* Create a set of environment variables to use when invoking a Git
* subcommand that needs to communicate with a remote (i.e. fetch, clone,
* push, pull, ls-remote, etc etc).
*
* The environment vari... | Create stub replacement for envForAuthentication | Create stub replacement for envForAuthentication
| TypeScript | mit | say25/desktop,shiftkey/desktop,artivilla/desktop,desktop/desktop,j-f1/forked-desktop,j-f1/forked-desktop,artivilla/desktop,kactus-io/kactus,artivilla/desktop,kactus-io/kactus,artivilla/desktop,desktop/desktop,say25/desktop,desktop/desktop,desktop/desktop,shiftkey/desktop,kactus-io/kactus,j-f1/forked-desktop,kactus-io/k... | ---
+++
@@ -0,0 +1,25 @@
+import { envForAuthentication } from './authentication'
+import { IGitAccount } from '../../models/git-account'
+
+/**
+ * Create a set of environment variables to use when invoking a Git
+ * subcommand that needs to communicate with a remote (i.e. fetch, clone,
+ * push, pull, ls-remote, et... | |
31f47687feccbd4f6438668c0b63aabdaa7cb80f | src/plugins/autocompletion_providers/Cd.ts | src/plugins/autocompletion_providers/Cd.ts | import {executable, sequence, decorate, string, noisySuggestions, runtime, choice} from "../../shell/Parser";
import {expandHistoricalDirectory} from "../../Command";
import {description, styles, style} from "./Suggestions";
import * as _ from "lodash";
import {relativeDirectoryPath} from "./File";
import {pathIn} from... | import {executable, sequence, decorate, string, noisySuggestions, runtime, choice} from "../../shell/Parser";
import {expandHistoricalDirectory} from "../../Command";
import {description, styles, style, Suggestion} from "./Suggestions";
import * as _ from "lodash";
import {relativeDirectoryPath} from "./File";
import {... | Add cd historical directories suggestions. | Add cd historical directories suggestions.
| TypeScript | mit | j-allard/black-screen,vshatskyi/black-screen,vshatskyi/black-screen,black-screen/black-screen,drew-gross/black-screen,vshatskyi/black-screen,drew-gross/black-screen,drew-gross/black-screen,shockone/black-screen,j-allard/black-screen,railsware/upterm,shockone/black-screen,vshatskyi/black-screen,j-allard/black-screen,rai... | ---
+++
@@ -1,9 +1,10 @@
import {executable, sequence, decorate, string, noisySuggestions, runtime, choice} from "../../shell/Parser";
import {expandHistoricalDirectory} from "../../Command";
-import {description, styles, style} from "./Suggestions";
+import {description, styles, style, Suggestion} from "./Suggesti... |
f7e36f818b42bd84047d7c41a51b50341568980e | test/components/ControlPanel.spec.tsx | test/components/ControlPanel.spec.tsx | import * as React from 'react';
import * as sinon from 'sinon';
import { expect } from 'chai';
import { shallow } from 'enzyme';
import { ControlPanelComponent } from '../../app/modules/ControlPanel/ControlPanel';
function setup() {
const props = {
currentSlide: 0,
numberOfSlides: 3,
addSlide: sinon.spy(... | Add test for <ControlPanel /> | test: Add test for <ControlPanel />
| TypeScript | mit | chengsieuly/devdecks,chengsieuly/devdecks,DevDecks/devdecks,DevDecks/devdecks,Team-CHAD/DevDecks,chengsieuly/devdecks,Team-CHAD/DevDecks,DevDecks/devdecks,Team-CHAD/DevDecks | ---
+++
@@ -0,0 +1,89 @@
+import * as React from 'react';
+import * as sinon from 'sinon';
+import { expect } from 'chai';
+import { shallow } from 'enzyme';
+import { ControlPanelComponent } from '../../app/modules/ControlPanel/ControlPanel';
+
+function setup() {
+ const props = {
+ currentSlide: 0,
+ number... | |
ce45813ce594495171ada31f62fcbf446ebb335b | server/apollo/src/core/transfer.ts | server/apollo/src/core/transfer.ts | import { Account } from "./account";
import { Balance } from "./balance";
import { Month } from "./month";
export interface Transfer {
fromAccount: Account;
toAccount: Account;
fromMonth: Month;
toMonth: Month;
description: string;
balace: Balance;
} | Add missing definition of Transfer. | Add missing definition of Transfer.
| TypeScript | apache-2.0 | cherba29/tally,cherba29/tally,cherba29/tally,cherba29/tally | ---
+++
@@ -0,0 +1,12 @@
+import { Account } from "./account";
+import { Balance } from "./balance";
+import { Month } from "./month";
+
+export interface Transfer {
+ fromAccount: Account;
+ toAccount: Account;
+ fromMonth: Month;
+ toMonth: Month;
+ description: string;
+ balace: Balance;
+} | |
0bd78503b9d90ecc0250fabc8423c006a30c9fe3 | packages/@sanity/field/src/utils/useHover.ts | packages/@sanity/field/src/utils/useHover.ts | import {useState, useRef, useEffect} from 'react'
export function useHover<T extends HTMLElement>(): [React.MutableRefObject<T | null>, boolean] {
const [value, setValue] = useState(false)
const ref = useRef<T | null>(null)
const handleMouseOver = () => setValue(true)
const handleMouseOut = () => setValue(fa... | Fix nesting of fields in change list | [field] Fix nesting of fields in change list
| TypeScript | mit | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | ---
+++
@@ -0,0 +1,27 @@
+import {useState, useRef, useEffect} from 'react'
+
+export function useHover<T extends HTMLElement>(): [React.MutableRefObject<T | null>, boolean] {
+ const [value, setValue] = useState(false)
+
+ const ref = useRef<T | null>(null)
+
+ const handleMouseOver = () => setValue(true)
+ cons... | |
2ab033755b0756de6c95be0ce3da97abfcf0dc50 | spec/components/errormessageoverlay.spec.ts | spec/components/errormessageoverlay.spec.ts | import { UIInstanceManager } from './../../src/ts/uimanager';
import { ErrorMessageOverlay } from '../../src/ts/components/errormessageoverlay';
import { MobileV3PlayerEvent } from '../../src/ts/mobilev3playerapi';
import { MockHelper, TestingPlayerAPI } from '../helper/MockHelper';
describe('ErrorMessageOverlay', () ... | Add unit test for ErrorMessageOverlay class | Add unit test for ErrorMessageOverlay class
| TypeScript | mit | bitmovin/bitmovin-player-ui,bitmovin/bitmovin-player-ui,bitmovin/bitmovin-player-ui,bitmovin/bitmovin-player-ui | ---
+++
@@ -0,0 +1,69 @@
+import { UIInstanceManager } from './../../src/ts/uimanager';
+import { ErrorMessageOverlay } from '../../src/ts/components/errormessageoverlay';
+import { MobileV3PlayerEvent } from '../../src/ts/mobilev3playerapi';
+import { MockHelper, TestingPlayerAPI } from '../helper/MockHelper';
+
+de... | |
db1c23f25c3d943bd5c04e04ab26066e536e5384 | cypress/tests/multi-apps.cy.ts | cypress/tests/multi-apps.cy.ts | describe('Hslayers application', () => {
beforeEach(() => {
cy.visit('/multi-apps');
});
it('should display multiple hslayers elements', () => {
cy.get('hslayers').should('have.length', 2);
});
});
| Check if multiple apps can be loaded | test: Check if multiple apps can be loaded
| TypeScript | mit | hslayers/hslayers-ng,hslayers/hslayers-ng,hslayers/hslayers-ng,hslayers/hslayers-ng | ---
+++
@@ -0,0 +1,9 @@
+describe('Hslayers application', () => {
+ beforeEach(() => {
+ cy.visit('/multi-apps');
+ });
+
+ it('should display multiple hslayers elements', () => {
+ cy.get('hslayers').should('have.length', 2);
+ });
+}); | |
f137b3e122354a6e651a65fa2325570a276bc4a9 | types/react-bootstrap/lib/Carousel.d.ts | types/react-bootstrap/lib/Carousel.d.ts | import * as React from 'react';
import { Omit, Sizes, SelectCallback } from 'react-bootstrap';
import CarouselItem = require('./CarouselItem');
import CarouselCaption = require('./CarouselCaption');
declare namespace Carousel {
export type CarouselProps = Omit<React.HTMLProps<Carousel>, 'wrap'> & {
activeI... | import * as React from 'react';
import { Omit, Sizes, SelectCallback } from 'react-bootstrap';
import CarouselItem = require('./CarouselItem');
import CarouselCaption = require('./CarouselCaption');
declare namespace Carousel {
export type CarouselProps = Omit<React.HTMLProps<Carousel>, 'wrap'> & {
activeI... | Allow interval prop to be null | react-bootstrap: Allow interval prop to be null
The react-bootstrap docs state that the interval prop on a Carousel can
be null. In this state, a Carousel will not automatically cycle through
its items. Tested locally.
https://react-bootstrap.github.io/components/carousel/#carousels-props-carousel
| TypeScript | mit | AgentME/DefinitelyTyped,georgemarshall/DefinitelyTyped,AgentME/DefinitelyTyped,magny/DefinitelyTyped,dsebastien/DefinitelyTyped,AgentME/DefinitelyTyped,georgemarshall/DefinitelyTyped,mcliment/DefinitelyTyped,dsebastien/DefinitelyTyped,borisyankov/DefinitelyTyped,borisyankov/DefinitelyTyped,georgemarshall/DefinitelyType... | ---
+++
@@ -12,7 +12,7 @@
defaultActiveIndex?: number;
direction?: string;
indicators?: boolean;
- interval?: number;
+ interval?: number | null;
nextIcon?: React.ReactNode;
onSelect?: SelectCallback;
// TODO: Add more specific type |
a9e55e1eee0d1df4fe59d2513067a21e59a5f111 | src/classes/angleworms-collision-detector.ts | src/classes/angleworms-collision-detector.ts | import IMap from '../interfaces/map.interface';
import IPlayerCollisionDetectorComponent from '../interfaces/player-collision-detector-component.interface';
import IPlayer from '../interfaces/player.interface';
import MapPosition from '../types/map-position.type';
import Locator from './locator';
export default class ... | Add Angleworms II style collisions detection. | Add Angleworms II style collisions detection.
| TypeScript | isc | kamsac/angleworms-game,kamsac/angleworms-game | ---
+++
@@ -0,0 +1,58 @@
+import IMap from '../interfaces/map.interface';
+import IPlayerCollisionDetectorComponent from '../interfaces/player-collision-detector-component.interface';
+import IPlayer from '../interfaces/player.interface';
+import MapPosition from '../types/map-position.type';
+import Locator from './... | |
19f932748efcb2eb257be979e9705769623b18b8 | myFirstApps/src/app/class/auth.service.spec.ts | myFirstApps/src/app/class/auth.service.spec.ts | import { AuthService } from './auth.service';
describe('Testing for AuthService Class', ()=>{
let service : AuthService;
beforeEach(()=>{
service = new AuthService();
});
afterEach(()=>{
service = null;
localStorage.removeItem('token');
})
it('should ret... | Add unit test for AuthService class | Add unit test for AuthService class
| TypeScript | mit | fedorax/angular-basic,fedorax/angular-basic,fedorax/angular-basic | ---
+++
@@ -0,0 +1,23 @@
+import { AuthService } from './auth.service';
+
+describe('Testing for AuthService Class', ()=>{
+ let service : AuthService;
+
+ beforeEach(()=>{
+ service = new AuthService();
+ });
+
+ afterEach(()=>{
+ service = null;
+ localStorage.removeItem('token');
+... | |
4f448a6ceefd850656ef35f5956ff59e21b860eb | ui/src/shared/components/SourceIndicator.tsx | ui/src/shared/components/SourceIndicator.tsx | import React, {SFC} from 'react'
import PropTypes from 'prop-types'
import _ from 'lodash'
import uuid from 'uuid'
import ReactTooltip from 'react-tooltip'
import {Source} from 'src/types'
interface Props {
sourceOverride?: Source
}
const SourceIndicator: SFC<Props> = (
{sourceOverride},
{source: {name, url}}... | import React, {SFC} from 'react'
import PropTypes from 'prop-types'
import _ from 'lodash'
import uuid from 'uuid'
import ReactTooltip from 'react-tooltip'
import {Source} from 'src/types'
interface Props {
sourceOverride?: Source
}
const SourceIndicator: SFC<Props> = ({sourceOverride}, {source}) => {
if (!sour... | Refactor component to guard against missing context | Refactor component to guard against missing context
| TypeScript | mit | nooproblem/influxdb,influxdb/influxdb,influxdata/influxdb,nooproblem/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,li-ang/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,influxdata/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,li-ang/influxdb,... | ---
+++
@@ -11,16 +11,19 @@
sourceOverride?: Source
}
-const SourceIndicator: SFC<Props> = (
- {sourceOverride},
- {source: {name, url}}
-) => {
+const SourceIndicator: SFC<Props> = ({sourceOverride}, {source}) => {
+ if (!source) {
+ return null
+ }
+
+ const {name, url} = source
const sourceName: s... |
cd2708fb0e8a0e3b820c5a6146d842625ba022cf | server/libs/api/quiz-functions.ts | server/libs/api/quiz-functions.ts | ///<reference path="../../../typings/globals/shuffle-array/index.d.ts"/>
import * as shuffleArray from "shuffle-array";
export class QuizFunctions {
count: number;
temp = 0;
all = new Array();
all2 = new Array();
constructor(jsonval) {
let question = new Array();
let time = new Arr... | Add time based question loading algorithm | Add time based question loading algorithm
| TypeScript | mit | shavindraSN/examen,shavindraSN/examen,shavindraSN/examen | ---
+++
@@ -0,0 +1,43 @@
+///<reference path="../../../typings/globals/shuffle-array/index.d.ts"/>
+import * as shuffleArray from "shuffle-array";
+
+export class QuizFunctions {
+ count: number;
+ temp = 0;
+ all = new Array();
+ all2 = new Array();
+
+ constructor(jsonval) {
+ let question = n... | |
569b304e794dfab0aefd5d837e88c42f3180faa8 | 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 )
throw error
}
}
}
build() : $mol_build {
return null
}
@ $mol_pr... | 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... | Print errors in js building to browser console. | Print errors in js building to browser console.
| TypeScript | mit | nin-jin/mol,eigenmethod/mol,nin-jin/mol,eigenmethod/mol,eigenmethod/mol,nin-jin/mol | ---
+++
@@ -6,7 +6,12 @@
return this.generator( req.url ) || next()
} catch( error ) {
$mol_atom_restore( error )
- throw error
+ if( req.url.match( /\.js$/ ) ) {
+ console.error( error )
+ res.send( `console.error( ${ JSON.stringify( error.message ) } )` ).end()
+ } else {
+ throw ... |
5d99b4fcd51f1a6b7b447aad00678cfc00e9ae42 | src/core/assert.ts | src/core/assert.ts | /**
* Specialized type of error to easily identify exceptions originated in `assert()` expressions.
*/
export class AssertionError extends Error {}
/**
* Ensure that any given condition is true, adding basic support for design-by-contract pgoramming.
*
* When providing a function as opposed to a boolean as the fi... | Add basic support for contract programming | Add basic support for contract programming
| TypeScript | agpl-3.0 | inad9300/Soil,inad9300/Soil | ---
+++
@@ -0,0 +1,26 @@
+/**
+ * Specialized type of error to easily identify exceptions originated in `assert()` expressions.
+ */
+export class AssertionError extends Error {}
+
+/**
+ * Ensure that any given condition is true, adding basic support for design-by-contract pgoramming.
+ *
+ * When providing a functi... | |
d0240ed204a02a5cd006295c3fa24b90bee75bf4 | test/reducers/slides/actions/moveSlideUp-spec.ts | test/reducers/slides/actions/moveSlideUp-spec.ts | import { expect } from 'chai';
import { MOVE_SLIDE_UP } 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 MOVE_SLIDE_UP on slides reducer | test: Add test for MOVE_SLIDE_UP on slides reducer
| TypeScript | mit | DevDecks/devdecks,DevDecks/devdecks,DevDecks/devdecks,chengsieuly/devdecks,chengsieuly/devdecks,Team-CHAD/DevDecks,chengsieuly/devdecks,Team-CHAD/DevDecks,Team-CHAD/DevDecks | ---
+++
@@ -0,0 +1,36 @@
+import { expect } from 'chai';
+import { MOVE_SLIDE_UP } 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:... | |
caa9467d8eadf5169f4239ca58da74a6d88e8993 | app/src/ui/changes/changed-file-details.tsx | app/src/ui/changes/changed-file-details.tsx | import * as React from 'react'
interface IChangedFileDetailsProps {
readonly fileName: string | null
}
export class ChangedFileDetails extends React.Component<IChangedFileDetailsProps, void> {
public render() {
const fullFileName = this.props.fileName ? this.props.fileName : undefined
return (
<div... | Add component to display file details | Add component to display file details
Currently displays the file name, but no reason this cannot be expanded to display additional info.
| TypeScript | mit | hjobrien/desktop,BugTesterTest/desktops,shiftkey/desktop,BugTesterTest/desktops,BugTesterTest/desktops,gengjiawen/desktop,kactus-io/kactus,artivilla/desktop,say25/desktop,artivilla/desktop,artivilla/desktop,say25/desktop,hjobrien/desktop,j-f1/forked-desktop,say25/desktop,desktop/desktop,gengjiawen/desktop,shiftkey/desk... | ---
+++
@@ -0,0 +1,17 @@
+import * as React from 'react'
+
+interface IChangedFileDetailsProps {
+ readonly fileName: string | null
+}
+
+export class ChangedFileDetails extends React.Component<IChangedFileDetailsProps, void> {
+ public render() {
+ const fullFileName = this.props.fileName ? this.props.fileName ... | |
8b5bece6c7a1cefb09a5601dcd87944e91e0dfff | saleor/static/dashboard-next/components/Debounce.tsx | saleor/static/dashboard-next/components/Debounce.tsx | import * as React from "react";
export interface DebounceProps {
children: ((props: () => void) => React.ReactNode);
debounceFn: (event: React.FormEvent<any>) => void;
time?: number;
}
export class Debounce extends React.Component<DebounceProps> {
timer = null;
handleDebounce = () => {
const { debounce... | import * as React from "react";
export interface DebounceProps<T> {
children: ((props: (...args: T[]) => void) => React.ReactNode);
debounceFn: (...args: T[]) => void;
time?: number;
}
export class Debounce<T> extends React.Component<DebounceProps<T>> {
timer = null;
handleDebounce = (...args: T[]) => {
... | Improve debounce types and pass function parameters | Improve debounce types and pass function parameters
| TypeScript | bsd-3-clause | maferelo/saleor,maferelo/saleor,mociepka/saleor,UITools/saleor,mociepka/saleor,UITools/saleor,UITools/saleor,maferelo/saleor,UITools/saleor,UITools/saleor,mociepka/saleor | ---
+++
@@ -1,20 +1,20 @@
import * as React from "react";
-export interface DebounceProps {
- children: ((props: () => void) => React.ReactNode);
- debounceFn: (event: React.FormEvent<any>) => void;
+export interface DebounceProps<T> {
+ children: ((props: (...args: T[]) => void) => React.ReactNode);
+ debounc... |
1ebaf394eebe2b043af9769f3aef8f550af2352b | src/utils/creepPartCosts.ts | src/utils/creepPartCosts.ts | // Body part Build cost Effect per one body part
export const CreepPartMatrix: { [index: string]: number } = {
ATTACK: 80,
CARRY: 50,
CLAIM: 600,
HEAL: 250,
MOVE: 50,
RANGED_ATTACK: 150,
TOUGH: 10,
WORK: 100,
};
| Add costs matrix for creep parts | Add costs matrix for creep parts
| TypeScript | unlicense | ABitMoreDepth/screeps,ABitMoreDepth/screeps | ---
+++
@@ -0,0 +1,11 @@
+// Body part Build cost Effect per one body part
+export const CreepPartMatrix: { [index: string]: number } = {
+ ATTACK: 80,
+ CARRY: 50,
+ CLAIM: 600,
+ HEAL: 250,
+ MOVE: 50,
+ RANGED_ATTACK: 150,
+ TOUGH: 10,
+ WORK: 100,
+}; | |
5dacd118f2ad04098fcdeff833f111b89a925307 | packages/safe-tools-subgraph/src/utils.ts | packages/safe-tools-subgraph/src/utils.ts | import { crypto, ByteArray, Address } from '@graphprotocol/graph-ts';
export function toChecksumAddress(address: Address): string {
let lowerCaseAddress = address.toHex().slice(2);
let hash = crypto
.keccak256(ByteArray.fromUTF8(address.toHex().slice(2)))
.toHex()
.slice(2);
let result = '';
for (... | Copy toChecksumAddress util from cardpay-subgraph | Copy toChecksumAddress util from cardpay-subgraph
| TypeScript | mit | cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack | ---
+++
@@ -0,0 +1,38 @@
+import { crypto, ByteArray, Address } from '@graphprotocol/graph-ts';
+
+export function toChecksumAddress(address: Address): string {
+ let lowerCaseAddress = address.toHex().slice(2);
+ let hash = crypto
+ .keccak256(ByteArray.fromUTF8(address.toHex().slice(2)))
+ .toHex()
+ .sl... | |
608b813626754f878e759926db6bef91549e9999 | app/pages/login/login.component.ts | app/pages/login/login.component.ts | import {Component} from "angular2/core";
import {Router} from "angular2/router";
import {User} from "../../shared/user/user";
import {UserService} from "../../shared/user/user.service";
@Component({
selector: "login",
templateUrl: "pages/login/login.html",
providers: [UserService]
})
export class LoginPage {
... | import {Component} from "angular2/core";
import {Router} from "angular2/router";
import {User} from "../../shared/user/user";
import {UserService} from "../../shared/user/user.service";
@Component({
selector: "login",
templateUrl: "pages/login/login.html",
providers: [UserService]
})
export class LoginPage {
... | Use a better error message | Use a better error message
| TypeScript | mit | anhoev/cms-mobile,poly-mer/community,NativeScript/sample-Groceries,poly-mer/community,poly-mer/community,qtagtech/nativescript_tutorial,dzfweb/sample-groceries,NativeScript/sample-Groceries,qtagtech/nativescript_tutorial,tjvantoll/sample-Groceries,dzfweb/sample-groceries,tjvantoll/sample-Groceries,qtagtech/nativescript... | ---
+++
@@ -27,7 +27,7 @@
this._userService.login(this.user)
.subscribe(
() => this._router.navigate(["List"]),
- (error) => alert(error)
+ (error) => alert("Unfortunately we could not find your account.")
);
}
|
74b5b43706136f7dfe7fa51c71474b148213e424 | chain-of-responsibility/solve-problem.ts | chain-of-responsibility/solve-problem.ts | class Trouble {
private number: number;
constructor(number: number) {
this.number = number;
}
getNumber(): number {
return this.number;
}
getProblemString(): string {
return `Trouble: ${this.number}`;
}
}
abstract class Support {
private name: string;
private next: Support;
construc... | Add implementation of Chain Of Responsibililty pattern | Add implementation of Chain Of Responsibililty pattern
| TypeScript | mit | Erichain/design-patterns-in-typescript,Erichain/design-patterns-in-typescript | ---
+++
@@ -0,0 +1,101 @@
+class Trouble {
+ private number: number;
+
+ constructor(number: number) {
+ this.number = number;
+ }
+
+ getNumber(): number {
+ return this.number;
+ }
+
+ getProblemString(): string {
+ return `Trouble: ${this.number}`;
+ }
+}
+
+abstract class Support {
+ private name... | |
49f3cd04c1b5ecdc9fd8b198ffe71e12d753dc16 | typings/cordova-plugin-braintree-tests.ts | typings/cordova-plugin-braintree-tests.ts | /// <reference path="cordova-plugin-braintree.d.ts" />
BraintreePlugin.initialize("a");
BraintreePlugin.initialize("a", () => {});
BraintreePlugin.initialize("a", () => {}, () => {});
var paymentUIOptions: BraintreePlugin.PaymentUIOptions = {
cancelText: "Cancel",
title: "Title"
};
BraintreePlugin.presentDro... | /// <reference path="cordova-plugin-braintree.d.ts" />
BraintreePlugin.initialize("a");
BraintreePlugin.initialize("a", () => {});
BraintreePlugin.initialize("a", () => {}, () => {});
var paymentUIOptions: BraintreePlugin.PaymentUIOptions = {
cancelText: "Cancel",
title: "Title",
ctaText: "Call to Action"... | Update type definition test with ctaText property | Update type definition test with ctaText property
| TypeScript | mit | Taracque/cordova-plugin-braintree,Justin-Credible/cordova-plugin-braintree,Taracque/cordova-plugin-braintree,btafel/cordova-plugin-braintree,btafel/cordova-plugin-braintree,LudwigEnglbrecht/cordova-plugin-braintree_new,btafel/cordova-plugin-braintree,Justin-Credible/cordova-plugin-braintree,Taracque/cordova-plugin-brai... | ---
+++
@@ -6,7 +6,8 @@
var paymentUIOptions: BraintreePlugin.PaymentUIOptions = {
cancelText: "Cancel",
- title: "Title"
+ title: "Title",
+ ctaText: "Call to Action"
};
BraintreePlugin.presentDropInPaymentUI(); |
621227987b0faa7329c0f460102fe43f8bc49d50 | ui/src/shared/components/FuncSelectorInput.tsx | ui/src/shared/components/FuncSelectorInput.tsx | import React, {SFC, ChangeEvent, KeyboardEvent} from 'react'
type OnFilterChangeHandler = (e: ChangeEvent<HTMLInputElement>) => void
type OnFilterKeyPress = (e: KeyboardEvent<HTMLInputElement>) => void
interface Props {
searchTerm: string
onFilterChange: OnFilterChangeHandler
onFilterKeyPress: OnFilterKeyPress
... | Introduce input component specifically for IFQL function selection | Introduce input component specifically for IFQL function selection
| TypeScript | mit | nooproblem/influxdb,nooproblem/influxdb,influxdb/influxdb,influxdb/influxdb,nooproblem/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,influxdata/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,li-ang/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,mark-rushakoff/i... | ---
+++
@@ -0,0 +1,29 @@
+import React, {SFC, ChangeEvent, KeyboardEvent} from 'react'
+
+type OnFilterChangeHandler = (e: ChangeEvent<HTMLInputElement>) => void
+type OnFilterKeyPress = (e: KeyboardEvent<HTMLInputElement>) => void
+
+interface Props {
+ searchTerm: string
+ onFilterChange: OnFilterChangeHandler
+ ... | |
5da9a00b93ad2c2a1b05a819dba75d562a14647d | ui/src/shared/components/Crosshair.tsx | ui/src/shared/components/Crosshair.tsx | import React, {PureComponent} from 'react'
import Dygraph from 'dygraphs'
import {connect} from 'react-redux'
import {DYGRAPH_CONTAINER_XLABEL_MARGIN} from 'src/shared/constants'
interface Props {
hoverTime: number
dygraph: Dygraph
staticLegendHeight: number
}
class Crosshair extends PureComponent<Props> {
p... | import React, {PureComponent} from 'react'
import Dygraph from 'dygraphs'
import {connect} from 'react-redux'
import {ErrorHandling} from 'src/shared/decorators/errors'
import {DYGRAPH_CONTAINER_XLABEL_MARGIN} from 'src/shared/constants'
interface Props {
hoverTime: number
dygraph: Dygraph
staticLegendHeight: n... | Add ErrorHandling decorator to crosshairs | Add ErrorHandling decorator to crosshairs
| TypeScript | mit | nooproblem/influxdb,li-ang/influxdb,nooproblem/influxdb,nooproblem/influxdb,influxdata/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,li-ang/influxdb,influxdb/influxdb,influxdata/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,in... | ---
+++
@@ -1,6 +1,7 @@
import React, {PureComponent} from 'react'
import Dygraph from 'dygraphs'
import {connect} from 'react-redux'
+import {ErrorHandling} from 'src/shared/decorators/errors'
import {DYGRAPH_CONTAINER_XLABEL_MARGIN} from 'src/shared/constants'
@@ -10,6 +11,7 @@
staticLegendHeight: number... |
95c80f83d5bbcd04bb0b9b07be0b2e8f91f566b6 | src/js/ui/tournament/index.ts | src/js/ui/tournament/index.ts | import * as helper from '../helper';
import oninit from './tournamentCtrl';
import view from './tournamentView';
export default {
oncreate: helper.viewFadeIn,
oninit,
view
};
| Add back file deleted in error | Add back file deleted in error
| TypeScript | mit | btrent/lichobile,btrent/lichobile,btrent/lichobile,btrent/lichobile | ---
+++
@@ -0,0 +1,9 @@
+import * as helper from '../helper';
+import oninit from './tournamentCtrl';
+import view from './tournamentView';
+
+export default {
+ oncreate: helper.viewFadeIn,
+ oninit,
+ view
+}; | |
01f2cce8cf20aa87d8174439a3db3a78ccb186b4 | tests/cases/fourslash/completionWithNamespaceInsideFunction.ts | tests/cases/fourslash/completionWithNamespaceInsideFunction.ts | /// <reference path='fourslash.ts'/>
////function f() {
//// namespace n {
//// interface I {
//// x: number
//// }
//// /*1*/
//// }
//// /*2*/
////}
/////*3*/
goTo.marker('1');
verify.completionListContains("f", "function f(): void");
verify.completionListCont... | Add fourslash test for in scope completion | Add fourslash test for in scope completion
| TypeScript | apache-2.0 | kumikumi/TypeScript,kpreisser/TypeScript,alexeagle/TypeScript,fabioparra/TypeScript,bpowers/TypeScript,keir-rex/TypeScript,hoanhtien/TypeScript,mcanthony/TypeScript,impinball/TypeScript,msynk/TypeScript,fabioparra/TypeScript,abbasmhd/TypeScript,ionux/TypeScript,moander/TypeScript,SmallAiTT/TypeScript,germ13/TypeScript,... | ---
+++
@@ -0,0 +1,24 @@
+/// <reference path='fourslash.ts'/>
+
+////function f() {
+//// namespace n {
+//// interface I {
+//// x: number
+//// }
+//// /*1*/
+//// }
+//// /*2*/
+////}
+/////*3*/
+
+goTo.marker('1');
+verify.completionListContains("f", "function f(): void")... | |
1472b654db1d5f631f239f250ffc92ee12f5e07e | tests/cases/fourslash/goToDefinitionNewExpressionTargetNotClass.ts | tests/cases/fourslash/goToDefinitionNewExpressionTargetNotClass.ts | /// <reference path='fourslash.ts' />
////class C2 {
////}
////let I: {
//// /*constructSignature*/new(): C2;
////};
////let C = new [|/*invokeExpression*/I|]();
verify.goToDefinition("invokeExpression", "constructSignature");
| Add test case when new expression target is not Class declaration | Add test case when new expression target is not Class declaration
| TypeScript | apache-2.0 | kitsonk/TypeScript,Microsoft/TypeScript,donaldpipowitch/TypeScript,nojvek/TypeScript,basarat/TypeScript,weswigham/TypeScript,weswigham/TypeScript,RyanCavanaugh/TypeScript,alexeagle/TypeScript,microsoft/TypeScript,Microsoft/TypeScript,RyanCavanaugh/TypeScript,alexeagle/TypeScript,donaldpipowitch/TypeScript,SaschaNaz/Typ... | ---
+++
@@ -0,0 +1,10 @@
+/// <reference path='fourslash.ts' />
+
+////class C2 {
+////}
+////let I: {
+//// /*constructSignature*/new(): C2;
+////};
+////let C = new [|/*invokeExpression*/I|]();
+
+verify.goToDefinition("invokeExpression", "constructSignature"); | |
4a9b1209aeffb33ddbc6c7358e2a0e901cb8eee9 | tests/cases/fourslash/salsaMethodsOnAssignedFunctionExpressions.ts | tests/cases/fourslash/salsaMethodsOnAssignedFunctionExpressions.ts | /// <reference path="fourslash.ts" />
// @allowJs: true
// @Filename: something.js
////var C = function () { }
/////**
//// * The prototype method.
//// * @param {string} a Parameter definition.
//// */
////function f(a) {}
////C.prototype.m = f;
////
////var x = new C();
////x/*1*/./*2*/m();
goTo.marker('1');
verify.q... | Test adding members to JS variables whose initialisers are functions | Test adding members to JS variables whose initialisers are functions
| TypeScript | apache-2.0 | jeremyepling/TypeScript,Eyas/TypeScript,nojvek/TypeScript,kitsonk/TypeScript,thr0w/Thr0wScript,nojvek/TypeScript,jwbay/TypeScript,kitsonk/TypeScript,thr0w/Thr0wScript,kpreisser/TypeScript,alexeagle/TypeScript,weswigham/TypeScript,minestarks/TypeScript,nojvek/TypeScript,SaschaNaz/TypeScript,donaldpipowitch/TypeScript,vi... | ---
+++
@@ -0,0 +1,17 @@
+/// <reference path="fourslash.ts" />
+// @allowJs: true
+// @Filename: something.js
+////var C = function () { }
+/////**
+//// * The prototype method.
+//// * @param {string} a Parameter definition.
+//// */
+////function f(a) {}
+////C.prototype.m = f;
+////
+////var x = new C();
+////x/*... | |
e09ef3124b3f5a22f5ed6e72659c3ef7090de0a3 | analysis/monkwindwalker/src/modules/talents/DoCJ.tsx | analysis/monkwindwalker/src/modules/talents/DoCJ.tsx | import { t } from '@lingui/macro';
import { formatNumber, formatPercentage } from 'common/format';
import SPELLS from 'common/SPELLS';
import { SpellLink } from 'interface';
import UptimeIcon from 'interface/icons/Uptime';
import Analyzer, { Options } from 'parser/core/Analyzer';
import calculateEffectiveDamage f... | Add SCK damage event tracker | Add SCK damage event tracker
First attempt at tracking DPS contribution of DoCJ | TypeScript | agpl-3.0 | sMteX/WoWAnalyzer,anom0ly/WoWAnalyzer,anom0ly/WoWAnalyzer,Juko8/WoWAnalyzer,Juko8/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,sMteX/WoWAnalyzer,Juko8/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,anom0ly/WoWAnalyzer,anom0ly/WoWAnalyzer,sMteX/WoWAnalyzer | ---
+++
@@ -0,0 +1,66 @@
+import { t } from '@lingui/macro';
+import { formatNumber, formatPercentage } from 'common/format';
+import SPELLS from 'common/SPELLS';
+import { SpellLink } from 'interface';
+import UptimeIcon from 'interface/icons/Uptime';
+import Analyzer, { Options } from 'parser/core/Analyzer';
+impor... | |
432eb9979afb804c7cdec6cc00ff65e09e83026d | resource/classes/Extensions.ts | resource/classes/Extensions.ts | export class XArray<T> extends Array<T> {
public randomize(prng?: () => number): Array<T> {
var t: T, j: number, ret = this.slice(0), i = ret.length;
prng = prng || Math.random;
while(--i > 0) {
t = ret[j = Math.round(prng() * i)];
ret[j] = ret[i];
ret[i] = t;
}
return ret;
}
public static fromA... | Add an extension for Array<T> | Add an extension for Array<T>
| TypeScript | mit | MrShoenel/node-temporary-short-urls,MrShoenel/node-temporary-short-urls | ---
+++
@@ -0,0 +1,18 @@
+export class XArray<T> extends Array<T> {
+ public randomize(prng?: () => number): Array<T> {
+ var t: T, j: number, ret = this.slice(0), i = ret.length;
+ prng = prng || Math.random;
+ while(--i > 0) {
+ t = ret[j = Math.round(prng() * i)];
+ ret[j] = ret[i];
+ ret[i] = t;
+ }
+ ... | |
d75a5b2937988558102625f3d79b7691ab054494 | src/parser/hunter/shared/modules/spells/KillShot.tsx | src/parser/hunter/shared/modules/spells/KillShot.tsx | import Analyzer from 'parser/core/Analyzer';
//TODO Add something akin to ExecuteRange.js in arms/modules/core/Execute to track proper ABC of Kill Shot
class KillShot extends Analyzer {
}
export default KillShot;
| Add Kill Shot for all specs for SL | [Hunter] Add Kill Shot for all specs for SL
| TypeScript | agpl-3.0 | anom0ly/WoWAnalyzer,sMteX/WoWAnalyzer,yajinni/WoWAnalyzer,yajinni/WoWAnalyzer,sMteX/WoWAnalyzer,sMteX/WoWAnalyzer,yajinni/WoWAnalyzer,Juko8/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,anom0ly/WoWAnalyzer,Juko8/WoWAnalyzer,anom0ly/WoWAnalyzer,anom0ly/WoWAnalyzer,yajinni/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,WoWAnalyzer/WoWAnalyze... | ---
+++
@@ -0,0 +1,8 @@
+import Analyzer from 'parser/core/Analyzer';
+
+//TODO Add something akin to ExecuteRange.js in arms/modules/core/Execute to track proper ABC of Kill Shot
+class KillShot extends Analyzer {
+
+}
+
+export default KillShot; | |
41d2c582ebebd827e2618fbc433fd00f654462be | plugin/index.ts | plugin/index.ts | export * from './battery-status';
export * from './camera';
export * from './device';
export * from './device-motion';
export * from './device-orientation';
export * from './dialogs';
export * from './facebook';
export * from './firebase';
export * from './geolocation';
export * from './keyboard';
export * from './medi... | Add barrel for plugin so that you can easily import multiple services | Add barrel for plugin so that you can easily import multiple services
| TypeScript | mit | arnesson/angular-cordova,arnesson/angular-cordova | ---
+++
@@ -0,0 +1,16 @@
+export * from './battery-status';
+export * from './camera';
+export * from './device';
+export * from './device-motion';
+export * from './device-orientation';
+export * from './dialogs';
+export * from './facebook';
+export * from './firebase';
+export * from './geolocation';
+export * fro... | |
1a8fad665dd7379515b5f037fa3bb70e19f5cc0d | src/smc-webapp/tracker/index.ts | src/smc-webapp/tracker/index.ts | // `analytics` is a generalized wrapper for reporting data to google analytics, pwiki, parsley, ...
// for now, it either does nothing or works with GA
// this API basically allows to send off events by name and category
const analytics = function(type, ...args) {
// GoogleAnalyticsObject contains the possibly custo... | Convert misc_page analytics to ts | Convert misc_page analytics to ts
| TypeScript | agpl-3.0 | sagemathinc/smc,tscholl2/smc,tscholl2/smc,sagemathinc/smc,tscholl2/smc,tscholl2/smc,sagemathinc/smc,DrXyzzy/smc,tscholl2/smc,sagemathinc/smc,DrXyzzy/smc,DrXyzzy/smc,DrXyzzy/smc | ---
+++
@@ -0,0 +1,23 @@
+// `analytics` is a generalized wrapper for reporting data to google analytics, pwiki, parsley, ...
+// for now, it either does nothing or works with GA
+// this API basically allows to send off events by name and category
+
+const analytics = function(type, ...args) {
+ // GoogleAnalyticsO... | |
ff5a019d9cf2eb21ea49dc31488f2c3e4a386ef3 | src/Unosquare.Tubular2.Web/e2e/gridPagerInfo.e2e-spec.ts | src/Unosquare.Tubular2.Web/e2e/gridPagerInfo.e2e-spec.ts | import { browser, element, by } from '../node_modules/protractor/built';
describe('grid pager info', () => {
let paginator = element(by.tagName('ngb-pagination')).$$('nav').$$('ul').$$('li'),
gridPagerInfo = element(by.tagName('grid-pager-info')).$$('div'),
pageSizeSelector = element(by.tagName('... | Add grid pager info test | Add grid pager info test
| TypeScript | mit | unosquare/tubular2,unosquare/tubular2,unosquare/tubular2,unosquare/tubular2 | ---
+++
@@ -0,0 +1,29 @@
+import { browser, element, by } from '../node_modules/protractor/built';
+
+describe('grid pager info', () => {
+
+ let paginator = element(by.tagName('ngb-pagination')).$$('nav').$$('ul').$$('li'),
+ gridPagerInfo = element(by.tagName('grid-pager-info')).$$('div'),
+ pageS... | |
552f6fa787d803abf60a6e2b756162bb52820799 | test/helpers/crypto.ts | test/helpers/crypto.ts | import "../../helpers/require";
import { expect } from "chai";
import HelperCrypto from "@eta/helpers/crypto";
describe("helpers/crypto", () => {
const password = "testing";
const salt = HelperCrypto.generateSalt();
const key = "test";
describe("#hashPassword", () => {
let output: string;
... | Implement unit tests for HelperCrypto | Implement unit tests for HelperCrypto
| TypeScript | mit | crossroads-education/eta,crossroads-education/eta | ---
+++
@@ -0,0 +1,78 @@
+import "../../helpers/require";
+import { expect } from "chai";
+import HelperCrypto from "@eta/helpers/crypto";
+
+describe("helpers/crypto", () => {
+ const password = "testing";
+ const salt = HelperCrypto.generateSalt();
+ const key = "test";
+
+ describe("#hashPassword", () ... | |
877142ee3d0ad9153480a982f41f7295144ba4e3 | src/selectors/databaseFilterSettings.ts | src/selectors/databaseFilterSettings.ts | import { hitDatabaseSelector, databaseFIlterSettingsSelector } from './index';
import { createSelector } from 'reselect';
import { HitDatabaseEntry } from 'types';
export const hitDatabaseFilteredBySearchTerm = createSelector(
[hitDatabaseSelector, databaseFIlterSettingsSelector],
(hitDatabase, { searchTerm }) =>
... | Add selector for filtering hitDatabase entries by title. | Add selector for filtering hitDatabase entries by title.
| TypeScript | mit | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | ---
+++
@@ -0,0 +1,11 @@
+import { hitDatabaseSelector, databaseFIlterSettingsSelector } from './index';
+import { createSelector } from 'reselect';
+import { HitDatabaseEntry } from 'types';
+
+export const hitDatabaseFilteredBySearchTerm = createSelector(
+ [hitDatabaseSelector, databaseFIlterSettingsSelector],
+ ... | |
2c9009676721480734cc567afd2b35e78d43a70d | src/app/Utils/ConfigProvider.ts | src/app/Utils/ConfigProvider.ts | import * as fs from 'fs';
import * as path from 'path';
import {Config} from '../Configuration/Config';
import {ModuleProvider} from './ModuleProvider';
export class ConfigProvider {
private static instance: ConfigProvider = null;
protected config: Config;
private constructor() {}
public static getI... | Add config provider to read all module configurartions and read specific value | Add config provider to read all module configurartions and read specific value
| TypeScript | mit | vincent-chapron/resonance-js,vincent-chapron/resonance-js,vincent-chapron/resonance-js | ---
+++
@@ -0,0 +1,48 @@
+import * as fs from 'fs';
+import * as path from 'path';
+import {Config} from '../Configuration/Config';
+import {ModuleProvider} from './ModuleProvider';
+
+export class ConfigProvider {
+ private static instance: ConfigProvider = null;
+
+ protected config: Config;
+
+ private co... | |
bfc68a72a8f372711842e52caeda7f0a063315e8 | angular-i18next/angular-i18next-tests.ts | angular-i18next/angular-i18next-tests.ts | /// <reference path="angular-i18next.d.ts" />
/**
* @summary Test for "angular-i18next" with options.
*/
function testOptions() {
var $provider: I18nextProvider;
$provider.options = {};
}
| Add test for "angular-i18next" definition. | Add test for "angular-i18next" definition.
| TypeScript | mit | bluong/DefinitelyTyped,Zzzen/DefinitelyTyped,brainded/DefinitelyTyped,SebastianCoetzee/DefinitelyTyped,GlennQuirynen/DefinitelyTyped,alexdresko/DefinitelyTyped,manekovskiy/DefinitelyTyped,bilou84/DefinitelyTyped,bdoss/DefinitelyTyped,pocesar/DefinitelyTyped,zalamtech/DefinitelyTyped,Syati/DefinitelyTyped,Pipe-shen/Defi... | ---
+++
@@ -0,0 +1,8 @@
+/// <reference path="angular-i18next.d.ts" />
+/**
+* @summary Test for "angular-i18next" with options.
+*/
+function testOptions() {
+ var $provider: I18nextProvider;
+ $provider.options = {};
+} | |
5b75c217b2bfc753c94d4c1afb288fd069a8e312 | src/Test/Html/Escaping/Content.ts | src/Test/Html/Escaping/Content.ts | import { expect } from 'chai'
import Up from '../../../index'
import { PlainTextNode } from '../../../SyntaxNodes/PlainTextNode'
describe('All instances of "<" and "&" inside a plain text node', () => {
it('are replaced with "<" and "&", respectively', () => {
const node = new PlainTextNode('4 & 5 < 10, ... | Add failing html escaping test | Add failing html escaping test
| TypeScript | mit | start/up,start/up | ---
+++
@@ -0,0 +1,11 @@
+import { expect } from 'chai'
+import Up from '../../../index'
+import { PlainTextNode } from '../../../SyntaxNodes/PlainTextNode'
+
+
+describe('All instances of "<" and "&" inside a plain text node', () => {
+ it('are replaced with "<" and "&", respectively', () => {
+ const nod... | |
2f9e9269c6cafbb58ef61cbdb2b3a6e18f65f19e | generator/processors/Microsoft.Authorization.ts | generator/processors/Microsoft.Authorization.ts | import { SchemaPostProcessor } from '../models';
export const postProcessor: SchemaPostProcessor = (_namespace: string, _apiVersion: string, schema: any) => {
const allowedValues = schema.definitions?.ParameterDefinitionsValue?.properties?.allowedValues;
if (allowedValues) {
const allowedValuesIte... | Add post processor for policy | Add post processor for policy
| TypeScript | mit | Azure/azure-resource-manager-schemas,Azure/azure-resource-manager-schemas,Azure/azure-resource-manager-schemas,Azure/azure-resource-manager-schemas | ---
+++
@@ -0,0 +1,32 @@
+import { SchemaPostProcessor } from '../models';
+
+export const postProcessor: SchemaPostProcessor = (_namespace: string, _apiVersion: string, schema: any) => {
+ const allowedValues = schema.definitions?.ParameterDefinitionsValue?.properties?.allowedValues;
+ if (allowedValues) {
+ ... | |
29ad6f9bbb72868b3fc17f3c9693f180bad40b99 | src/components/Avatar/index.ts | src/components/Avatar/index.ts | import { UIComponentSources, UIComponentSinks } from '../';
import xs, { Stream } from 'xstream';
import { VNode } from '@cycle/dom';
import { SvgIconSinks } from '../SvgIcon';
import { FontIconSinks } from '../FontIcon';
export interface AvatarSources extends UIComponentSources {
backgroundColor$?: Stream<string>;
... | Add structure to Avatar as a component | Add structure to Avatar as a component
| TypeScript | mit | cyclic-ui/cyclic-ui,cyclic-ui/cyclic-ui | ---
+++
@@ -0,0 +1,16 @@
+import { UIComponentSources, UIComponentSinks } from '../';
+import xs, { Stream } from 'xstream';
+import { VNode } from '@cycle/dom';
+import { SvgIconSinks } from '../SvgIcon';
+import { FontIconSinks } from '../FontIcon';
+
+export interface AvatarSources extends UIComponentSources {
+ ... | |
b9e49a45f5441fd1a2d49a10b88aaf4d425dc992 | scripts/simulate-many-viewers.ts | scripts/simulate-many-viewers.ts | import Bluebird from 'bluebird'
import { wait } from '@shared/core-utils'
import { createSingleServer, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
let servers: PeerTubeServer[]
const viewers: { xForwardedFor: string }[] = []
let videoId: string
run()
.then(() =>... | Add simulate many viewers script | Add simulate many viewers script
Helps us to improve views scalability on peertube
| TypeScript | agpl-3.0 | Chocobozzz/PeerTube,Chocobozzz/PeerTube,Chocobozzz/PeerTube,Chocobozzz/PeerTube | ---
+++
@@ -0,0 +1,77 @@
+import Bluebird from 'bluebird'
+import { wait } from '@shared/core-utils'
+import { createSingleServer, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
+
+let servers: PeerTubeServer[]
+const viewers: { xForwardedFor: string }[] = []
+let vi... | |
b77004a09fc73e13d1e697279ba670cebe2ac34e | src/Test/Html/Config/Changes.ts | src/Test/Html/Config/Changes.ts | import { expect } from 'chai'
import { UpConfigArgs } from '../../../UpConfigArgs'
import { Up } from '../../../index'
import { SyntaxNode } from '../../../SyntaxNodes/SyntaxNode'
import { FootnoteNode } from '../../../SyntaxNodes/FootnoteNode'
function canBeProvidedMultipleWaysWithTheSameResult(
args: {
node: ... | Add file/helper for config-change html tests | Add file/helper for config-change html tests
| TypeScript | mit | start/up,start/up | ---
+++
@@ -0,0 +1,62 @@
+import { expect } from 'chai'
+import { UpConfigArgs } from '../../../UpConfigArgs'
+import { Up } from '../../../index'
+import { SyntaxNode } from '../../../SyntaxNodes/SyntaxNode'
+import { FootnoteNode } from '../../../SyntaxNodes/FootnoteNode'
+
+
+function canBeProvidedMultipleWaysWith... | |
7ff81196eb4ea9a1b6c2be91ee68ea36b326df20 | src/dropzone/DropzoneDirective.ts | src/dropzone/DropzoneDirective.ts | import * as angular from 'angular';
import Dropzone = require('dropzone');
/**
* Define new interface to allow accessing '$ctrl' from scope
* https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18196
*/
interface IDropzoneDirectiveScope extends ng.IScope {
$ctrl: any;
}
export class DropzoneDirective impl... | Create a dropzone directive to handle dropzone events. | Create a dropzone directive to handle dropzone events.
Initialize the dropzone element in the directive and add event
handlers to handle the 'sending' event which triggers on each
file upload.
Modify the 'sending' event to append the 'key' form data required
for aws POSTs.
| TypeScript | bsd-3-clause | nimbis/s3commander,nimbis/s3commander,nimbis/s3commander,nimbis/s3commander | ---
+++
@@ -0,0 +1,45 @@
+import * as angular from 'angular';
+
+import Dropzone = require('dropzone');
+
+/**
+ * Define new interface to allow accessing '$ctrl' from scope
+ * https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18196
+ */
+interface IDropzoneDirectiveScope extends ng.IScope {
+ $ctrl: any;
+... | |
50b19c611f31b716b0281b9fe9a4ef0c1711c3e3 | test/helpers/string.ts | test/helpers/string.ts | import * as assert from "assert";
import * as mocha from "mocha";
import HelperString from "../../helpers/string";
describe("HelperString", function(): void {
describe("#toCamelCase", function(): void {
it("should lowercase single leading character", function(): void {
const result: string = He... | Implement tests for HelperString methods | Implement tests for HelperString methods
| TypeScript | mit | crossroads-education/eta,crossroads-education/eta | ---
+++
@@ -0,0 +1,34 @@
+import * as assert from "assert";
+import * as mocha from "mocha";
+import HelperString from "../../helpers/string";
+
+describe("HelperString", function(): void {
+ describe("#toCamelCase", function(): void {
+ it("should lowercase single leading character", function(): void {
+ ... | |
bd6c24b6a355520c234aad776a2d8bc3f6a433b3 | src/actions/statusSummary.ts | src/actions/statusSummary.ts | import {
STATUS_SUMMARY_REQUEST,
STATUS_SUMMARY_FAILURE,
STATUS_SUMMARY_SUCCESS
} from '../constants';
export interface FetchStatusSummaryRequest {
readonly type: STATUS_SUMMARY_REQUEST;
}
export interface FetchStatusSummarySuccess {
readonly type: STATUS_SUMMARY_SUCCESS;
}
export interface FetchStatusSumm... | Add action creators for fetching status Summary. | Add action creators for fetching status Summary.
| TypeScript | mit | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | ---
+++
@@ -0,0 +1,29 @@
+import {
+ STATUS_SUMMARY_REQUEST,
+ STATUS_SUMMARY_FAILURE,
+ STATUS_SUMMARY_SUCCESS
+} from '../constants';
+
+export interface FetchStatusSummaryRequest {
+ readonly type: STATUS_SUMMARY_REQUEST;
+}
+
+export interface FetchStatusSummarySuccess {
+ readonly type: STATUS_SUMMARY_SUCCE... | |
5f356cb9ef5db6050818c8ac59609687a0da882a | packages/thrift-client/src/tests/integration/profiler.spec.ts | packages/thrift-client/src/tests/integration/profiler.spec.ts | import { expect } from 'code'
import * as Hapi from 'hapi'
import * as Lab from 'lab'
import * as net from 'net'
import * as rp from 'request-promise-native'
import {
CLIENT_CONFIG,
} from './config'
import { createServer as addService } from './add-service'
import { createServer as calculatorService } from './ca... | Add tests to profile memory usage | chore: Add tests to profile memory usage
| TypeScript | apache-2.0 | creditkarma/thrift-server,creditkarma/thrift-server | ---
+++
@@ -0,0 +1,94 @@
+import { expect } from 'code'
+import * as Hapi from 'hapi'
+import * as Lab from 'lab'
+import * as net from 'net'
+import * as rp from 'request-promise-native'
+
+import {
+ CLIENT_CONFIG,
+} from './config'
+
+import { createServer as addService } from './add-service'
+import { createS... | |
89a9441cd992f9e1e269d9edc276e4736390c2a2 | bokehjs/src/coffee/api/interfaces/document.ts | bokehjs/src/coffee/api/interfaces/document.ts | import {Model} from "./model";
type JsObj = {[key: string]: any};
export interface Document {
constructor(): void;
clear(): void;
roots(): Array<Model>;
add_root(model: Model): void;
remove_root(model: Model): void;
title(): string;
set_title(title: string): void;
get_model_by_id(mod... | Add typings for Document class and its events | Add typings for Document class and its events
| TypeScript | bsd-3-clause | KasperPRasmussen/bokeh,DuCorey/bokeh,jakirkham/bokeh,KasperPRasmussen/bokeh,KasperPRasmussen/bokeh,schoolie/bokeh,mindriot101/bokeh,jakirkham/bokeh,azjps/bokeh,aavanian/bokeh,mindriot101/bokeh,azjps/bokeh,ptitjano/bokeh,azjps/bokeh,timsnyder/bokeh,percyfal/bokeh,jakirkham/bokeh,quasiben/bokeh,justacec/bokeh,aavanian/bo... | ---
+++
@@ -0,0 +1,48 @@
+import {Model} from "./model";
+
+type JsObj = {[key: string]: any};
+
+export interface Document {
+ constructor(): void;
+
+ clear(): void;
+ roots(): Array<Model>;
+ add_root(model: Model): void;
+ remove_root(model: Model): void;
+
+ title(): string;
+ set_title(titl... | |
ec6eb9ebdea6480af4549f6dd6a2d2a5faf3b40e | src/scripts/googleTrendsAnalysis.ts | src/scripts/googleTrendsAnalysis.ts | import * as wpdb from '../articles/wpdb'
import * as fs from 'fs-extra'
const googleTrends = require('google-trends-api')
async function main() {
/*await wpdb.connect()
const categories = await wpdb.getEntriesByCategory()
const titles = []
for (const category of categories) {
for (const entry o... | Add initial google trends analysis script | Add initial google trends analysis script
| TypeScript | mit | OurWorldInData/our-world-in-data-grapher,owid/owid-grapher,OurWorldInData/our-world-in-data-grapher,owid/owid-grapher,OurWorldInData/owid-grapher,OurWorldInData/owid-grapher,owid/owid-grapher,OurWorldInData/owid-grapher,OurWorldInData/our-world-in-data-grapher,OurWorldInData/owid-grapher,OurWorldInData/owid-grapher,Our... | ---
+++
@@ -0,0 +1,32 @@
+import * as wpdb from '../articles/wpdb'
+import * as fs from 'fs-extra'
+const googleTrends = require('google-trends-api')
+
+async function main() {
+ /*await wpdb.connect()
+ const categories = await wpdb.getEntriesByCategory()
+ const titles = []
+ for (const category of cate... | |
e290559057f3c84b27c5057b4d12951d46c35863 | tests/cases/conformance/types/tuple/readonlyArraysAndTuples2.ts | tests/cases/conformance/types/tuple/readonlyArraysAndTuples2.ts | // @strict: true
// @declaration: true
// @emitDecoratorMetadata: true
// @experimentalDecorators: true
type T10 = string[];
type T11 = Array<string>;
type T12 = readonly string[];
type T13 = ReadonlyArray<string>;
type T20 = [number, number];
type T21 = readonly [number, number];
declare function f1(ma... | Add tests for decorators and declaration emit from error free source | Add tests for decorators and declaration emit from error free source
| TypeScript | apache-2.0 | SaschaNaz/TypeScript,alexeagle/TypeScript,kpreisser/TypeScript,minestarks/TypeScript,minestarks/TypeScript,RyanCavanaugh/TypeScript,Microsoft/TypeScript,nojvek/TypeScript,minestarks/TypeScript,kitsonk/TypeScript,kitsonk/TypeScript,kpreisser/TypeScript,kpreisser/TypeScript,alexeagle/TypeScript,alexeagle/TypeScript,Micro... | ---
+++
@@ -0,0 +1,23 @@
+// @strict: true
+// @declaration: true
+// @emitDecoratorMetadata: true
+// @experimentalDecorators: true
+
+type T10 = string[];
+type T11 = Array<string>;
+type T12 = readonly string[];
+type T13 = ReadonlyArray<string>;
+
+type T20 = [number, number];
+type T21 = readonly [number, number... | |
56fe305d81a37be6c43376172ed85fa1230414f3 | ui/common/src/wheel.ts | ui/common/src/wheel.ts | export default function shouldScroll(e: WheelEvent, threshold: number): boolean {
/** Track distance scrolled across multiple wheel events, resetting after 500 ms. */
const lastScrollDirection = lichess.tempStorage.get('lastScrollDirection');
let scrollTotal = parseInt(lichess.tempStorage.get('scrollTotal') || '... | Add common function for tracking scroll distance | Add common function for tracking scroll distance
| TypeScript | agpl-3.0 | arex1337/lila,arex1337/lila,arex1337/lila,arex1337/lila,arex1337/lila,arex1337/lila,arex1337/lila | ---
+++
@@ -0,0 +1,27 @@
+export default function shouldScroll(e: WheelEvent, threshold: number): boolean {
+ /** Track distance scrolled across multiple wheel events, resetting after 500 ms. */
+ const lastScrollDirection = lichess.tempStorage.get('lastScrollDirection');
+ let scrollTotal = parseInt(lichess.temp... | |
1de7a769ebc87d83ba6231af585aa0a79ed4c859 | __mocks__/@stencil/state-tunnel.tsx | __mocks__/@stencil/state-tunnel.tsx | var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < ... | Add jest's mock feature and mocking state_tunnel to resolve test error | Add jest's mock feature and mocking state_tunnel to resolve test error
| TypeScript | mit | scania/corporate-ui,scania/corporate-ui | ---
+++
@@ -0,0 +1,90 @@
+var __rest = (this && this.__rest) || function (s, e) {
+ var t = {};
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+ t[p] = s[p];
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
+ for (var i = 0, p = Obje... | |
e581b0f1a29fcf70964b9ad73ed482ac642f7e32 | packages/glimmer-util/lib/assert.ts | packages/glimmer-util/lib/assert.ts | import Logger from './logger';
// let alreadyWarned = false;
export function debugAssert(test, msg) {
// if (!alreadyWarned) {
// alreadyWarned = true;
// Logger.warn("Don't leave debug assertions on in public builds");
// }
if (!test) {
throw new Error(msg || "assertion failure");
}
}
export fu... | // import Logger from './logger';
// let alreadyWarned = false;
export function debugAssert(test, msg) {
// if (!alreadyWarned) {
// alreadyWarned = true;
// Logger.warn("Don't leave debug assertions on in public builds");
// }
if (!test) {
throw new Error(msg || "assertion failure");
}
}
export... | Comment out (now) unused import | Comment out (now) unused import
| TypeScript | mit | lbdm44/glimmer-vm,glimmerjs/glimmer-vm,tildeio/glimmer,tildeio/glimmer,glimmerjs/glimmer-vm,tildeio/glimmer,lbdm44/glimmer-vm,chadhietala/glimmer,chadhietala/glimmer,chadhietala/glimmer,glimmerjs/glimmer-vm,chadhietala/glimmer,lbdm44/glimmer-vm | ---
+++
@@ -1,4 +1,4 @@
-import Logger from './logger';
+// import Logger from './logger';
// let alreadyWarned = false;
|
e1df7e8969d491c46afae4d2c88d72d744b46721 | tests/typescript.ts | tests/typescript.ts | // Test file to check Typescript types for the .js dist
import noUiSlider from 'dist/nouislider.js';
const element: HTMLElement|null = document.querySelector('#slider');
if (element) {
noUiSlider.create(element, {
start: [20, 50],
range: {
min: 0,
'50%': 30,
ma... | Add test file to check Typescript types for the .js dist | Add test file to check Typescript types for the .js dist
| TypeScript | mit | leongersen/noUiSlider,leongersen/noUiSlider,leongersen/noUiSlider,leongersen/noUiSlider | ---
+++
@@ -0,0 +1,27 @@
+// Test file to check Typescript types for the .js dist
+import noUiSlider from 'dist/nouislider.js';
+
+const element: HTMLElement|null = document.querySelector('#slider');
+
+if (element) {
+
+ noUiSlider.create(element, {
+ start: [20, 50],
+ range: {
+ min: 0,... | |
d6fe5776f8d135b3293e5fa2f9d01f8417ffab9d | jsonwebtoken/jsonwebtoken-tests.ts | jsonwebtoken/jsonwebtoken-tests.ts | /**
* Test suite created by Maxime LUCE <https://github.com/SomaticIT>
*
* Created by using code samples from https://github.com/auth0/node-jsonwebtoken.
*/
/// <reference path="../node/node.d.ts" />
/// <reference path="jsonwebtoken.d.ts" />
import jwt = require("jsonwebtoken");
import fs = require("fs");... | Add test suite for jsonwebtoken package | Add test suite for jsonwebtoken package
| TypeScript | mit | GlennQuirynen/DefinitelyTyped,MugeSo/DefinitelyTyped,jimthedev/DefinitelyTyped,muenchdo/DefinitelyTyped,abner/DefinitelyTyped,mareek/DefinitelyTyped,daptiv/DefinitelyTyped,onecentlin/DefinitelyTyped,stanislavHamara/DefinitelyTyped,alvarorahul/DefinitelyTyped,nitintutlani/DefinitelyTyped,jacqt/DefinitelyTyped,one-pieces... | ---
+++
@@ -0,0 +1,64 @@
+/**
+ * Test suite created by Maxime LUCE <https://github.com/SomaticIT>
+ *
+ * Created by using code samples from https://github.com/auth0/node-jsonwebtoken.
+ */
+
+/// <reference path="../node/node.d.ts" />
+/// <reference path="jsonwebtoken.d.ts" />
+
+import jwt = require("jsonw... | |
6efd97e8e6a752004ae8964af8e3b377064e4909 | script/validate-changelog.ts | script/validate-changelog.ts | #!/usr/bin/env ts-node
import * as Path from 'path'
import * as Fs from 'fs'
import * as Ajv from 'ajv'
function handleError(error: string) {
console.error(error)
process.exit(-1)
}
function formatErrors(errors: Ajv.ErrorObject[]): string {
return errors
.map(error => {
const { dataPath, message } =... | Revert "remove old changelog validate script" | Revert "remove old changelog validate script"
This reverts commit 58d41f678959cfed96d30eb3b1b2c533a2eb47f9.
| TypeScript | mit | kactus-io/kactus,shiftkey/desktop,kactus-io/kactus,artivilla/desktop,say25/desktop,artivilla/desktop,j-f1/forked-desktop,kactus-io/kactus,say25/desktop,j-f1/forked-desktop,shiftkey/desktop,say25/desktop,artivilla/desktop,shiftkey/desktop,say25/desktop,shiftkey/desktop,desktop/desktop,desktop/desktop,desktop/desktop,kac... | ---
+++
@@ -0,0 +1,81 @@
+#!/usr/bin/env ts-node
+
+import * as Path from 'path'
+import * as Fs from 'fs'
+
+import * as Ajv from 'ajv'
+
+function handleError(error: string) {
+ console.error(error)
+ process.exit(-1)
+}
+
+function formatErrors(errors: Ajv.ErrorObject[]): string {
+ return errors
+ .map(erro... | |
c4dd36443aaf629725ecfdfda2ebd8a03e179391 | src/main/io/settings-io.ts | src/main/io/settings-io.ts | // Copyright 2016 underdolphin(masato sueda)
//
// 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 require... | Add io for settings file | Add io for settings file
| TypeScript | apache-2.0 | underdolphin/SoundRebuild,underdolphin/SoundRebuild,underdolphin/SoundRebuild | ---
+++
@@ -0,0 +1,30 @@
+// Copyright 2016 underdolphin(masato sueda)
+//
+// 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/LI... | |
6ca778ddea235e69d4d3122dada2672b4e8f8062 | polygerrit-ui/app/elements/shared/gr-account-chip/gr-account-chip_test.ts | polygerrit-ui/app/elements/shared/gr-account-chip/gr-account-chip_test.ts | /**
* @license
* Copyright (C) 2021 The Android Open Source Project
*
* 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 require... | Add shadow dom UT for gr-account-chip | Add shadow dom UT for gr-account-chip
Change-Id: I0628297ff259e344b85e4b8ed7c399bf17b0cfa9
| TypeScript | apache-2.0 | GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit | ---
+++
@@ -0,0 +1,58 @@
+/**
+ * @license
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * 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/licen... | |
01d071046a9a8b131f8d5cadbc70295cb6da9e85 | src/utils/number.spec.ts | src/utils/number.spec.ts | import { distance, makeDivisibleBy } from "./number";
describe("distance", () => {
it("does basic straight line distance", () => {
expect(distance(1, 1, 1, 2)).toBe(1);
});
});
describe("makeDivisibleBy", () => {
it("returns same number if already divisible", () => {
expect(makeDivisibleBy(4, 4)).toBe(4... | Add an example unit test | Add an example unit test
| TypeScript | unlicense | PartyPlanner64/PartyPlanner64,PartyPlanner64/PartyPlanner64,PartyPlanner64/PartyPlanner64 | ---
+++
@@ -0,0 +1,27 @@
+import { distance, makeDivisibleBy } from "./number";
+
+describe("distance", () => {
+ it("does basic straight line distance", () => {
+ expect(distance(1, 1, 1, 2)).toBe(1);
+ });
+});
+
+describe("makeDivisibleBy", () => {
+ it("returns same number if already divisible", () => {
+ ... | |
94220b146b1072ad7c68afa4f8505d44a1fd5c0a | app/src/lib/dispatcher/emoji-store.ts | app/src/lib/dispatcher/emoji-store.ts | import * as Fs from 'fs'
import * as Path from 'path'
import * as Url from 'url'
export default class EmojiStore {
/** Map from shorcut (e.g., +1) to on disk URL. */
public readonly emoji = new Map<string, string>()
public read(): Promise<void> {
return new Promise((resolve, reject) => {
Fs.readFile(P... | Read in the emoji lookup table | Read in the emoji lookup table
| TypeScript | mit | artivilla/desktop,kactus-io/kactus,shiftkey/desktop,artivilla/desktop,shiftkey/desktop,gengjiawen/desktop,BugTesterTest/desktops,desktop/desktop,shiftkey/desktop,kactus-io/kactus,BugTesterTest/desktops,desktop/desktop,j-f1/forked-desktop,desktop/desktop,hjobrien/desktop,hjobrien/desktop,gengjiawen/desktop,kactus-io/kac... | ---
+++
@@ -0,0 +1,37 @@
+import * as Fs from 'fs'
+import * as Path from 'path'
+import * as Url from 'url'
+
+export default class EmojiStore {
+ /** Map from shorcut (e.g., +1) to on disk URL. */
+ public readonly emoji = new Map<string, string>()
+
+ public read(): Promise<void> {
+ return new Promise((reso... | |
bd133aed103af6c1e7c2ece9ee4dc8d14cfc2d0c | src/libs/constants/error_authors.ts | src/libs/constants/error_authors.ts | export interface ErrorAuthors {
"Additional Word Hint": string
"Capitalization Hint": string
"Flexible Additional Word Hint": string
"Flexible Missing Word Hint": string
"Flexible Modified Word Hint": string
"Focus Point Hint": string
"Incorrect Sequence Hint": string
"Missing Details Hint": string
"M... | Make a constants file for authors. | Make a constants file for authors.
| TypeScript | agpl-3.0 | empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core | ---
+++
@@ -0,0 +1,51 @@
+export interface ErrorAuthors {
+ "Additional Word Hint": string
+ "Capitalization Hint": string
+ "Flexible Additional Word Hint": string
+ "Flexible Missing Word Hint": string
+ "Flexible Modified Word Hint": string
+ "Focus Point Hint": string
+ "Incorrect Sequence Hint": string
+ ... | |
82a1d72f9bc26b4fa0c0ef224931cf3ab5922e38 | modules/core/test/v2/unit/coins/hbar.ts | modules/core/test/v2/unit/coins/hbar.ts | import * as Promise from 'bluebird';
import { Hbar } from '../../../../src/v2/coins/';
const co = Promise.coroutine;
import { TestBitGo } from '../../../lib/test_bitgo';
describe('Hedera Hashgraph:', function() {
let bitgo;
let basecoin;
before(function() {
bitgo = new TestBitGo({ env: 'mock' });
bitgo... | Add simple tests to Hbar skeleton | Add simple tests to Hbar skeleton
Ticket: BG-23027
| TypeScript | apache-2.0 | BitGo/BitGoJS,BitGo/BitGoJS,BitGo/BitGoJS,BitGo/BitGoJS | ---
+++
@@ -0,0 +1,49 @@
+import * as Promise from 'bluebird';
+import { Hbar } from '../../../../src/v2/coins/';
+
+const co = Promise.coroutine;
+import { TestBitGo } from '../../../lib/test_bitgo';
+
+describe('Hedera Hashgraph:', function() {
+ let bitgo;
+ let basecoin;
+
+ before(function() {
+ bitgo = ne... | |
4f6b5b1cda03d11ec130440da1edff6385fe4c18 | src/Test/Ast/InlineDocument/OutlineConventions.ts | src/Test/Ast/InlineDocument/OutlineConventions.ts | import { expect } from 'chai'
import Up from'../../../index'
import { InlineUpDocument } from'../../../SyntaxNodes/InlineUpDocument'
import { PlainTextNode } from'../../../SyntaxNodes/PlainTextNode'
context('Inline documents completely ignore outline conventions. This includes:', () => {
specify('Outline separation... | Add 5 passing inline document tests | Add 5 passing inline document tests
| TypeScript | mit | start/up,start/up | ---
+++
@@ -0,0 +1,42 @@
+import { expect } from 'chai'
+import Up from'../../../index'
+import { InlineUpDocument } from'../../../SyntaxNodes/InlineUpDocument'
+import { PlainTextNode } from'../../../SyntaxNodes/PlainTextNode'
+
+
+context('Inline documents completely ignore outline conventions. This includes:', () ... | |
010580f9d286ad941006346ee607022046653c6e | src/Test/Html/Config/TableOfContents.ts | src/Test/Html/Config/TableOfContents.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 main heading within the table of contents', () ... | 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 main heading... | |
3ecde6a2ecd7f5ee12b728a3a0fbcc912bcb0f8b | src/scripts/generate-lexicon.ts | src/scripts/generate-lexicon.ts | const nlp = require('compromise'); // tslint:disable-line
const verbConjugations: Lexicon[] = require('../../lexicon/verb-conjugations.json'); // tslint:disable-line
import { writeFile } from 'mz/fs';
import { join } from 'path';
const tenses = [
'infinitive',
'past',
'gerund',
'present',
];
interface TenseTo... | Create script for generating lexicons | Create script for generating lexicons
| TypeScript | mit | martinhartt/messagelint,martinhartt/messagelint,martinhartt/messagelint | ---
+++
@@ -0,0 +1,73 @@
+const nlp = require('compromise'); // tslint:disable-line
+const verbConjugations: Lexicon[] = require('../../lexicon/verb-conjugations.json'); // tslint:disable-line
+import { writeFile } from 'mz/fs';
+import { join } from 'path';
+
+const tenses = [
+ 'infinitive',
+ 'past',
+ 'gerund'... | |
c385cb0adce1db3366cebe747b6ab22940ba76aa | src/main/client/app/framework/components/Security.tsx | src/main/client/app/framework/components/Security.tsx | import preact from "preact"
import {SessionState, sessionStore, SessionUser, UserRole} from "../session/sessionStore";
import StoreListenerComponent from "../utils/dom";
import {Function1} from "../lib";
interface HocOnLoggedInProps {
user?: SessionUser
}
type OnLoggedInProps<P> = HocOnLoggedInProps & P
export fun... | Create component to better handle security. | Create component to better handle security.
Because sometime, we need to display some components
only when the user have some rights, create two component to handle
authentication and authorization: `OnLoggedIn` and `OnGranted`.
This commit do the following:
* Create the two components
| TypeScript | mit | kneelnrise/vep,kneelnrise/vep,kneelnrise/vep | ---
+++
@@ -0,0 +1,58 @@
+import preact from "preact"
+import {SessionState, sessionStore, SessionUser, UserRole} from "../session/sessionStore";
+import StoreListenerComponent from "../utils/dom";
+import {Function1} from "../lib";
+
+interface HocOnLoggedInProps {
+ user?: SessionUser
+}
+
+type OnLoggedInProps<P>... | |
d93d3ebccf065c7c657ba9fdd13c7a33ed2205b4 | src/random_strategy.ts | src/random_strategy.ts |
import {IStrategy} from "./strategy_runner";
export class RandomStrategy implements IStrategy {
public playCard(gameState: GameState): [number, Card] {
let flag = _.random(1, 9);
return [flag, _.sample(gameState.playerCards)];
};
}
| Add a strategy that randomly selects cards | feat(RandomStrategy): Add a strategy that randomly selects cards
| TypeScript | mit | grantpatten/battleline-ai,grantpatten/battleline-ai | ---
+++
@@ -0,0 +1,9 @@
+
+import {IStrategy} from "./strategy_runner";
+
+export class RandomStrategy implements IStrategy {
+ public playCard(gameState: GameState): [number, Card] {
+ let flag = _.random(1, 9);
+ return [flag, _.sample(gameState.playerCards)];
+ };
+} | |
2b8b253d2ad51c229df4cfac865b02bc2fa8f591 | packages/gitgraph-core/src/__tests__/gitgraph.getRenderedData.commits.test.ts | packages/gitgraph-core/src/__tests__/gitgraph.getRenderedData.commits.test.ts | import { GitgraphCore } from "../index";
describe("Gitgraph.getRenderedData.commits", () => {
it("should use a default message on merge", () => {
const gitgraph = new GitgraphCore();
const master = gitgraph.branch("master");
master.commit("one");
const develop = gitgraph.branch("develop");
deve... | Test getRenderedData commit messages specifically | Test getRenderedData commit messages specifically
| TypeScript | mit | nicoespeon/gitgraph.js,nicoespeon/gitgraph.js,nicoespeon/gitgraph.js,nicoespeon/gitgraph.js | ---
+++
@@ -0,0 +1,22 @@
+import { GitgraphCore } from "../index";
+
+describe("Gitgraph.getRenderedData.commits", () => {
+ it("should use a default message on merge", () => {
+ const gitgraph = new GitgraphCore();
+
+ const master = gitgraph.branch("master");
+ master.commit("one");
+
+ const develop =... | |
3de3eb4a823f751c0ca6b1a4798a537510f22e01 | src/math/math.ts | src/math/math.ts | import * as _ from 'lodash';
/**
* Computes the minimum and maxiumum value of `collection`.
* This method complements the lodash
* [http://devdocs.io/lodash~4/index#minBy](minBy) and
* [http://devdocs.io/lodash~4/index#maxBy](maxBy) functions
* by allowing an Object `collection`, supplying the
* `iteratee` two a... | Add the bounds utility function. | Add the bounds utility function.
| TypeScript | bsd-2-clause | ohsu-qin/qiprofile,ohsu-qin/qiprofile,ohsu-qin/qiprofile,ohsu-qin/qiprofile | ---
+++
@@ -0,0 +1,41 @@
+import * as _ from 'lodash';
+
+/**
+ * Computes the minimum and maxiumum value of `collection`.
+ * This method complements the lodash
+ * [http://devdocs.io/lodash~4/index#minBy](minBy) and
+ * [http://devdocs.io/lodash~4/index#maxBy](maxBy) functions
+ * by allowing an Object `collection`... | |
73756b42c1de0737d7dcd59529e85bb4819f8373 | webpack/farmware/__tests__/farmware_test.tsx | webpack/farmware/__tests__/farmware_test.tsx | jest.mock("react-redux", () => ({
connect: jest.fn()
}));
import * as React from "react";
import { mount } from "enzyme";
import { FarmwarePage } from "../index";
import { FarmwareProps } from "../../devices/interfaces";
describe("<FarmwarePage />", () => {
it("renders widgets", () => {
const props: FarmwareP... | jest.mock("react-redux", () => ({
connect: jest.fn()
}));
jest.mock("../../session", () => ({
Session: {
getBool: () => true // Simulate opt-in to beta features.
}
}));
import * as React from "react";
import { mount } from "enzyme";
import { FarmwarePage } from "../index";
import { FarmwareProps } from "../... | Fix false positive test failure | Fix false positive test failure
| TypeScript | mit | gabrielburnworth/Farmbot-Web-App,RickCarlino/farmbot-web-app,gabrielburnworth/Farmbot-Web-App,gabrielburnworth/Farmbot-Web-App,RickCarlino/farmbot-web-app,gabrielburnworth/Farmbot-Web-App,RickCarlino/farmbot-web-app,FarmBot/Farmbot-Web-API,FarmBot/farmbot-web-app,FarmBot/Farmbot-Web-API,RickCarlino/farmbot-web-app,Rick... | ---
+++
@@ -1,5 +1,11 @@
jest.mock("react-redux", () => ({
connect: jest.fn()
+}));
+
+jest.mock("../../session", () => ({
+ Session: {
+ getBool: () => true // Simulate opt-in to beta features.
+ }
}));
import * as React from "react"; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.