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
cf79ce75cd616e6cf9c43bd866d76c9ff6c6bea1
src/extension/utils/vscode/editor.ts
src/extension/utils/vscode/editor.ts
import * as vs from "vscode"; export function showCode(editor: vs.TextEditor, displayRange: vs.Range, highlightRange: vs.Range, selectionRange?: vs.Range): void { if (selectionRange) editor.selection = new vs.Selection(selectionRange.start, selectionRange.end); // Ensure the code is visible on screen. editor.rev...
import * as vs from "vscode"; export function showCode(editor: vs.TextEditor, displayRange: vs.Range, highlightRange: vs.Range, selectionRange?: vs.Range): void { if (selectionRange) editor.selection = new vs.Selection(selectionRange.start, selectionRange.end); // Ensure the code is visible on screen. editor.rev...
Remove workaround for VS Code issue that's now resolved
Remove workaround for VS Code issue that's now resolved
TypeScript
mit
Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code
--- +++ @@ -6,10 +6,6 @@ // Ensure the code is visible on screen. editor.revealRange(displayRange, vs.TextEditorRevealType.InCenterIfOutsideViewport); - - // Re-reveal the first line, to ensure it was always visible (eg. in case the main range was bigger than the screen). - // Using .Default means it'll do as l...
7c949f10ea177ce857a7902629dd22f649d9faff
app/src/lib/git/index.ts
app/src/lib/git/index.ts
export * from './apply' export * from './branch' export * from './checkout' export * from './clone' export * from './commit' export * from './config' export * from './core' export * from './description' export * from './diff' export * from './fetch' export * from './for-each-ref' export * from './index' export * from '...
export * from './apply' export * from './branch' export * from './checkout' export * from './clone' export * from './commit' export * from './config' export * from './core' export * from './description' export * from './diff' export * from './fetch' export * from './for-each-ref' export * from './init' export * from '....
Remove cyclic dependency that makes everything :fire:
Remove cyclic dependency that makes everything :fire:
TypeScript
mit
desktop/desktop,shiftkey/desktop,shiftkey/desktop,desktop/desktop,j-f1/forked-desktop,kactus-io/kactus,say25/desktop,kactus-io/kactus,say25/desktop,desktop/desktop,say25/desktop,kactus-io/kactus,artivilla/desktop,artivilla/desktop,artivilla/desktop,shiftkey/desktop,j-f1/forked-desktop,artivilla/desktop,kactus-io/kactus...
--- +++ @@ -9,7 +9,6 @@ export * from './diff' export * from './fetch' export * from './for-each-ref' -export * from './index' export * from './init' export * from './log' export * from './pull'
3a72c2099cf61dc26b96b6ab7bb3a3f29fed4d3f
src/assertion-error.ts
src/assertion-error.ts
interface IAssertionErrorOptions { message: string; expected?: Object; actual?: Object; showDiff?: boolean; } export default function ({ message, expected, actual, showDiff }: IAssertionErrorOptions): Error { const error = new Error(message); // Properties used by Mocha and other frameworks to show errors erro...
export default function ({ message, expected, actual, showDiff }: { message: string; expected?: Object; actual?: Object; showDiff?: boolean; }): Error { const error = new Error(message); // Properties used by Mocha and other frameworks to show errors error['expected'] = expected; error['actual'] = actual; err...
Fix use of private interface
Fix use of private interface
TypeScript
mit
dylanparry/ceylon,dylanparry/ceylon
--- +++ @@ -1,11 +1,9 @@ -interface IAssertionErrorOptions { +export default function ({ message, expected, actual, showDiff }: { message: string; expected?: Object; actual?: Object; showDiff?: boolean; -} - -export default function ({ message, expected, actual, showDiff }: IAssertionErrorOptions): Error { +}...
b5044e0050a7bf238b6f7c643b189fe8d89d6166
src/app/shared/categories.ts
src/app/shared/categories.ts
import { Category } from './category.model'; export const CATEGORIES: Category[] = [ { "id": "AudioVideo", "name": "Audio & Video" }, { "id": "Development", "name": "Development" }, { "id": "Education", "name": "Education" }, { "id": "Game", "name": "Game" }, { "id...
import { Category } from './category.model'; export const CATEGORIES: Category[] = [ { "id": "AudioVideo", "name": "Audio & Video" }, { "id": "Development", "name": "Developer Tools" }, { "id": "Education", "name": "Education" }, { "id": "Game", "name": "Games" }, { ...
Rename category names to use the same as Gnome Software
Rename category names to use the same as Gnome Software Fixes https://github.com/flathub/linux-store-frontend/issues/71
TypeScript
apache-2.0
jgarciao/linux-store-frontend,jgarciao/linux-store-frontend,jgarciao/linux-store-frontend
--- +++ @@ -7,7 +7,7 @@ }, { "id": "Development", - "name": "Development" + "name": "Developer Tools" }, { "id": "Education", @@ -15,19 +15,19 @@ }, { "id": "Game", - "name": "Game" + "name": "Games" }, { "id": "Graphics", - "name": "Graphics" + "name": "G...
15ba173abe2476cdc5d8f0d22f37430c18b95f6f
typings/webpack.d.ts
typings/webpack.d.ts
interface WebpackRequireEnsureCallback { (req: WebpackRequire): void } interface WebpackRequire { (id: string): any; (paths: string[], callback: (...modules: any[]) => void): void; ensure(ids: string[], callback: WebpackRequireEnsureCallback, chunkName?: string): Promise<void>; context(directory: string, useSubDi...
interface WebpackRequireEnsureCallback { (req: WebpackRequire): void } interface WebpackRequire { (id: string): any; (paths: string[], callback: (...modules: any[]) => void): void; ensure(ids: string[], callback: WebpackRequireEnsureCallback, chunkName?: string): Promise<void>; context(directory: string, useSubDi...
Change $import typing to not be generic
Change $import typing to not be generic
TypeScript
mit
gamejolt/frontend-lib,gamejolt/frontend-lib,gamejolt/frontend-lib,gamejolt/frontend-lib
--- +++ @@ -14,4 +14,4 @@ } declare var require: WebpackRequire; -declare function $import<T>( path: string ): Promise<T>; +declare function $import( path: string ): Promise<any>;
08c446a8a68eb94afd5c8a01dae409e138da55e3
frontend/src/environments/environment.ts
frontend/src/environments/environment.ts
// The file contents for the current environment will overwrite these during build. // The build system defaults to the dev environment which uses `environment.ts`, but if you do // `ng build --env=prod` then `environment.prod.ts` will be used instead. // The list of which env maps to which file can be found in `.angul...
// The file contents for the current environment will overwrite these during build. // The build system defaults to the dev environment which uses `environment.ts`, but if you do // `ng build --env=prod` then `environment.prod.ts` will be used instead. // The list of which env maps to which file can be found in `.angul...
Fix env frontend dev config
Fix env frontend dev config
TypeScript
mit
tsmean/tsmean,tsmean/tsmean,tsmean/tsmean,tsmean/tsmean
--- +++ @@ -6,6 +6,5 @@ export const environment: Environment = { production: false, - api: 'https://demo-tsmean.herokuapp.com/api/v1' - // api: 'http://localhost:4242/api/v1' + api: 'http://localhost:4242/api/v1', };
a7b70ce21bd5b5856a497a101a37cb1cefc7bfd5
src/index.ts
src/index.ts
import { parse } from './ast'; import { emitString } from './emitter'; import { transform, TypeInjectorTransformer, FunctionBlockTransformer, MethodChainTransformer, AnonymousFunctionTransformer } from './transformers'; import * as fs from 'fs'; declare function require(name: string): any; declare var proces...
import { parse } from './ast'; import { emitString } from './emitter'; import { transform, TypeInjectorTransformer, FunctionBlockTransformer, AnonymousFunctionTransformer } from './transformers'; import * as fs from 'fs'; declare function require(name: string): any; declare var process: any; const util = requi...
Stop using method chain transformer
Stop using method chain transformer
TypeScript
mit
AmnisIO/typewriter,AmnisIO/typewriter,AmnisIO/typewriter
--- +++ @@ -4,7 +4,6 @@ transform, TypeInjectorTransformer, FunctionBlockTransformer, - MethodChainTransformer, AnonymousFunctionTransformer } from './transformers'; import * as fs from 'fs'; @@ -23,7 +22,6 @@ const transformers = [ new FunctionBlockTransformer(), new AnonymousFunctionTran...
4ce4bcd77abc41dca870dcddfc12b4547e901b7d
src/app/states/devices/device-og-kit.ts
src/app/states/devices/device-og-kit.ts
import { AbstractDevice, DeviceParams, DeviceParamsModel, DeviceParamType, DeviceType, RawDevice } from './abstract-device'; import { _ } from '@biesbjerg/ngx-translate-extract/dist/utils/utils'; export class DeviceOGKit extends AbstractDevice { readonly deviceType = DeviceType.OGKit; apparatusVersion ...
import { AbstractDevice, DeviceParams, DeviceParamsModel, DeviceParamType, DeviceType, RawDevice } from './abstract-device'; import { _ } from '@biesbjerg/ngx-translate-extract/dist/utils/utils'; export class DeviceOGKit extends AbstractDevice { readonly deviceType = DeviceType.OGKit; apparatusVersion ...
Fix OGKit device id read on iOS
Fix OGKit device id read on iOS
TypeScript
apache-2.0
openradiation/openradiation-mobile,openradiation/openradiation-mobile,openradiation/openradiation-mobile,openradiation/openradiation-mobile
--- +++ @@ -33,6 +33,6 @@ rawDevice.advertising instanceof ArrayBuffer ? new Uint8Array(rawDevice.advertising).slice(23, 29) : new Uint8Array(rawDevice.advertising.kCBAdvDataManufacturerData); - this.apparatusId = new TextDecoder('utf8').decode(manufacturerData); + this.apparatusId = ne...
51a09b7354ac0727e6da8e0f6cc00382d22faa41
packages/omi-cli/template/app-ts/src/index.tsx
packages/omi-cli/template/app-ts/src/index.tsx
import { tag, WeElement, render, h } from 'omi' import './hello-omi'; import * as logo from './omi.png'; interface AbcEvent extends Event { detail: { name: string; age: number; } } interface MyAppProps { name: string; } interface MyAppData { abc: string; passToChild: string; } @...
import { tag, WeElement, render, h } from 'omi' import './hello-omi'; import * as logo from './omi.png'; interface AbcEvent extends Event { detail: { name: string; age: number; } } interface MyAppProps { name: string; } interface MyAppData { abc: string; passToChild: string; } @...
Remove useless console.log for omi-ts
Remove useless console.log for omi-ts
TypeScript
mit
AlloyTeam/Nuclear,AlloyTeam/Nuclear
--- +++ @@ -47,7 +47,6 @@ } render() { - console.log(logo); return ( <div> <img src={logo} />
28ff5e1e3fa570a1e80db17a9532dd1bac4f2bb4
src/types.ts
src/types.ts
export interface State { inputText: string alphabets: Array<Alphabet> } export interface Alphabet { priority: number letters: Array<Letter> } export interface Letter { value: string block: string } export interface ShermanLetter extends Letter { dots?: number vert?: number lines: number }
export interface State { inputText: string alphabets: Alphabet[] } export interface Alphabet { priority: number letters: Letter[] } export interface Letter { value: string block: string } export interface ShermanLetter extends Letter { dots?: number vert?: number lines: number }
Use the other, better array syntax
Use the other, better array syntax
TypeScript
mit
rossjrw/gallifreyo,rossjrw/gallifreyo,rossjrw/gallifreyo
--- +++ @@ -1,11 +1,11 @@ export interface State { inputText: string - alphabets: Array<Alphabet> + alphabets: Alphabet[] } export interface Alphabet { priority: number - letters: Array<Letter> + letters: Letter[] } export interface Letter {
d9d3661ff654e97a3f4052963797d4ed2a412eae
src/utils.ts
src/utils.ts
export default class Utils { public static getPlatformConfig(platformId: string): any { const config = require(`../platforms/${platformId}/config.json`); return config; } }
export default class Utils { public static getPlatformConfig(platformId: string): any { const config = require(`../platforms/${platformId}/config.json`); return config; } public static getTemplate(platformId: string, templateId: string, type: string): any { const config = require(`....
Add helper function getTemplate to Utils
Add helper function getTemplate to Utils
TypeScript
mit
schulcloud/node-notification-service,schulcloud/node-notification-service,schulcloud/node-notification-service
--- +++ @@ -3,4 +3,9 @@ const config = require(`../platforms/${platformId}/config.json`); return config; } + + public static getTemplate(platformId: string, templateId: string, type: string): any { + const config = require(`../platforms/${platformId}/templates/${templateId}/${type}.js...
dd8d0ba0aeb6099e94af3fc27331485626344208
src/index.ts
src/index.ts
/** * @file The primary entry for Framewerk. * * @author Justin Toon * @license MIT * * @requires ./prototypes/fw.controller.js:Controller * @requires ./prototypes/fw.plugin.js:Plugin */ import { Controller, Plugin } from './prototypes'; interface ControllerList { [key: string]: () => Controller; } /** * ...
/** * @file The primary entry for Framewerk. * * @author Justin Toon * @license MIT * * @requires ./prototypes/fw.controller.js:Controller * @requires ./prototypes/fw.plugin.js:Plugin */ import { Controller, Plugin } from './prototypes'; import { dataSelector } from './utils/fw.utils'; interface ControllerLis...
Check for data-controller presence before initializing
Check for data-controller presence before initializing
TypeScript
mit
overneath42/framewerk
--- +++ @@ -9,6 +9,7 @@ */ import { Controller, Plugin } from './prototypes'; +import { dataSelector } from './utils/fw.utils'; interface ControllerList { [key: string]: () => Controller; @@ -37,7 +38,12 @@ if (controllerKeys.length) { controllerKeys.forEach(name => { - controllers[nam...
34b818bef0be07779e40f6bd359f6ccb07a0fbca
src/index.ts
src/index.ts
#!/usr/bin/env node console.log("vim-js-alternate: initialized"); import ProjectionLoader from "./ProjectionLoader"; import { ProjectionResolver } from "./ProjectionResolver"; var Vim = require("vim-node-driver"); var vim = new Vim(); var projectionLoader = new ProjectionLoader(); var projectionResolver = new Proje...
#!/usr/bin/env node console.log("vim-js-alternate: initialized"); import ProjectionLoader from "./ProjectionLoader"; import { ProjectionResolver } from "./ProjectionResolver"; var Vim = require("vim-node-driver"); var vim = new Vim(); var projectionLoader = new ProjectionLoader(); var projectionResolver = new Proje...
Set up an alternate file cache if the reverse mapping isn't explicitly defined
Set up an alternate file cache if the reverse mapping isn't explicitly defined
TypeScript
mit
extr0py/vim-js-alternate,extr0py/vim-js-alternate
--- +++ @@ -11,10 +11,13 @@ var projectionLoader = new ProjectionLoader(); var projectionResolver = new ProjectionResolver(projectionLoader); +var currentBuffer; var currentAlternateFile = null; +var alternateCache = {}; + vim.on("BufEnter", (args) => { - var currentBuffer = args.currentBuffer; + curren...
bf9fc000bfc00909a6178a3c7b34814c910befc1
src/ui/popup/index.tsx
src/ui/popup/index.tsx
/** * Copyright (c) 2017 Kenny Do * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY...
/** * Copyright (c) 2017 Kenny Do * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY...
Add an ErrorBoundary to the popup
Add an ErrorBoundary to the popup
TypeScript
mit
Cookie-AutoDelete/Cookie-AutoDelete,mrdokenny/Cookie-AutoDelete,Cookie-AutoDelete/Cookie-AutoDelete,Cookie-AutoDelete/Cookie-AutoDelete,mrdokenny/Cookie-AutoDelete
--- +++ @@ -14,6 +14,7 @@ import { Provider } from 'react-redux'; import { createUIStore } from 'redux-webext'; import { sleep } from '../../services/Libs'; +import ErrorBoundary from '../common_components/ErrorBoundary'; import fontAwesomeImports from '../font-awesome-imports'; import App from './App'; @@ -34...
176cd5c61e198d1ed172d10fa0abe8c2b6f53dad
src/app/app.spec.ts
src/app/app.spec.ts
import { it, inject, injectAsync, beforeEachProviders, TestComponentBuilder } from 'angular2/testing'; // Load the implementations that should be tested import {App} from './app'; import {countTotal} from './lib/utils'; import {BudgetService} from './services/budget.service'; import {budgetItems} from './bud...
import { it, inject, injectAsync, beforeEachProviders, TestComponentBuilder } from 'angular2/testing'; // Load the implementations that should be tested import {App} from './app'; import {countTotal} from './lib/utils'; import {BudgetService} from './services/budget.service'; import {BudgetItem} from './budg...
Split tests into test suits & test addItem()
Split tests into test suits & test addItem()
TypeScript
mit
bluebirrrrd/ng2-budget,bluebirrrrd/ng2-budget,bluebirrrrd/ng2-budget
--- +++ @@ -10,6 +10,7 @@ import {App} from './app'; import {countTotal} from './lib/utils'; import {BudgetService} from './services/budget.service'; +import {BudgetItem} from './budget/budget-item'; import {budgetItems} from './budget/budget-items.mock'; @@ -21,23 +22,45 @@ ]); it('should have a mode...
9db4dc352013e5352ff3737ea3aefe917b0fe871
src/modules/pwsh.ts
src/modules/pwsh.ts
import { symlinkOrReplaceFilesInFolderSync } from '../util/files'; import * as fs from 'fs'; import * as logHelper from '../util/log-helper'; import * as path from 'path'; export function install(): void { if (process.platform === 'win32') { logHelper.logStepStarted('pwsh'); const sourceDir = path.join(__dir...
import { symlinkOrReplaceFilesInFolderSync } from '../util/files'; import * as fs from 'fs'; import * as logHelper from '../util/log-helper'; import * as path from 'path'; export function install(): void { if (process.platform === 'win32') { logHelper.logStepStarted('pwsh'); const sourceDir = path.join(__dir...
Fix missing HOME var on Windows
Fix missing HOME var on Windows
TypeScript
mit
Tyriar/dotfiles,Tyriar/dotfiles,Tyriar/dotfiles
--- +++ @@ -7,7 +7,7 @@ if (process.platform === 'win32') { logHelper.logStepStarted('pwsh'); const sourceDir = path.join(__dirname, '../../data/pwsh'); - const destDir = path.join(process.env.HOME!, 'Documents/PowerShell'); + const destDir = path.join(process.env.USERPROFILE || process.env.HOME!, ...
3fd69d677212d664ab200432d0ef25573f480621
src/commons/hooks/useSearch.ts
src/commons/hooks/useSearch.ts
import useUrlState, { Options } from '@ahooksjs/use-url-state' interface ExtOptions<T> { arrayNames?: string[] numberNames?: string[] booleanNames?: string[] } export function useSearch<T>(initialState?: T, options?: Options & ExtOptions<T>) { const { arrayNames, numberNames, booleanNames, ...tail } = options...
import useUrlState, { Options } from '@ahooksjs/use-url-state' interface ExtOptions<T> { arrayNames?: string[] numberNames?: string[] booleanNames?: string[] } export function useSearch<T>(initialState?: T, options?: Options & ExtOptions<T>) { const { arrayNames, numberNames, booleanNames, ...tail } = options...
Fix use search parse error
feat: Fix use search parse error
TypeScript
apache-2.0
mingzuozhibi/mzzb-ui,mingzuozhibi/mzzb-ui,mingzuozhibi/mzzb-ui,mingzuozhibi/mzzb-ui
--- +++ @@ -27,7 +27,7 @@ booleanNames?.forEach((name) => { const value = state[name] if (value == null) return - state[name] = typeof value === 'string' ? Boolean(value) : value + state[name] = typeof value === 'string' ? value === 'true' : value }) return [state, setUrlState] as const
1fe0e6e1bd666da79d4dd1886fce7ace18061295
Day13-Slide-In-On-Roll/Day13-Slide-In-On-Roll/src/app/site/site.component.ts
Day13-Slide-In-On-Roll/Day13-Slide-In-On-Roll/src/app/site/site.component.ts
import { Component, OnInit, HostListener } from '@angular/core'; @Component({ selector: 'app-site', templateUrl: './site.component.html', styleUrls: ['./site.component.css'] }) export class SiteComponent implements OnInit { constructor() { } ngOnInit() { } @HostListener('window:scroll', ['$event']) ...
import { Component, OnDestroy, AfterViewInit, ElementRef, Renderer } from '@angular/core'; import { Observable } from 'rxjs/Observable'; import 'rxjs/add/operator/debounceTime'; import 'rxjs/add/observable/fromEvent' @Component({ selector: 'app-site', templateUrl: './site.component.html', styleUrls: ['./site.com...
Complete angular-30 Day 13 exercise
Complete angular-30 Day 13 exercise
TypeScript
mit
railsstudent/angular-30,railsstudent/angular-30,railsstudent/angular-30
--- +++ @@ -1,20 +1,45 @@ -import { Component, OnInit, HostListener } from '@angular/core'; +import { Component, OnDestroy, AfterViewInit, ElementRef, Renderer } from '@angular/core'; +import { Observable } from 'rxjs/Observable'; +import 'rxjs/add/operator/debounceTime'; +import 'rxjs/add/observable/fromEvent' @C...
889ac359b590168a66c7cc980778cbf2e292cb7d
src/app/hero-search.service.spec.ts
src/app/hero-search.service.spec.ts
import { fakeAsync, inject, TestBed } from '@angular/core/testing' import { BaseRequestOptions, ConnectionBackend, Http, RequestOptions, Response, ResponseOptions } from '@angular/http' import { MockBackend } from '@angular/http/testing' import { Hero } from './hero' import { HeroSearchService } from './hero-search.ser...
import { fakeAsync, inject, TestBed } from '@angular/core/testing' import { BaseRequestOptions, ConnectionBackend, Http, RequestOptions, Response, ResponseOptions } from '@angular/http' import { MockBackend } from '@angular/http/testing' import { Hero } from './hero' import { HeroSearchService } from './hero-search.ser...
Move variables outside the testing class
Move variables outside the testing class
TypeScript
mit
hckhanh/tour-of-heroes,hckhanh/tour-of-heroes,hckhanh/tour-of-heroes
--- +++ @@ -5,6 +5,9 @@ import { HeroSearchService } from './hero-search.service' describe('HeroSearchService', () => { + let backend: MockBackend + let connection: any + beforeEach(() => { this.injector = TestBed.configureTestingModule({ providers: [ @@ -15,8 +18,8 @@ ] }) - thi...
5fb08b0ba198f3709a3543549223093826f64e93
src/server/activitypub/publickey.ts
src/server/activitypub/publickey.ts
import * as express from 'express'; import context from '../../remote/activitypub/renderer/context'; import render from '../../remote/activitypub/renderer/key'; import User from '../../models/user'; const app = express.Router(); app.get('/users/:user/publickey', async (req, res) => { const userId = req.params.user; ...
import * as express from 'express'; import context from '../../remote/activitypub/renderer/context'; import render from '../../remote/activitypub/renderer/key'; import User, { isLocalUser } from '../../models/user'; const app = express.Router(); app.get('/users/:user/publickey', async (req, res) => { const userId = ...
Check whether is local user
Check whether is local user
TypeScript
mit
Tosuke/misskey,syuilo/Misskey,syuilo/Misskey,ha-dai/Misskey,Tosuke/misskey,Tosuke/misskey,Tosuke/misskey,Tosuke/misskey,ha-dai/Misskey
--- +++ @@ -1,7 +1,7 @@ import * as express from 'express'; import context from '../../remote/activitypub/renderer/context'; import render from '../../remote/activitypub/renderer/key'; -import User from '../../models/user'; +import User, { isLocalUser } from '../../models/user'; const app = express.Router(); ...
36b5c266fccaf78a3d799ad2eb1820e3db5cd2c7
AngularBasic/wwwroot/app/app.component.ts
AngularBasic/wwwroot/app/app.component.ts
import { Component } from '@angular/core'; @Component({ selector: 'my-app', moduleId: module.id, templateUrl: 'app.template.html' }) export class AppComponent { }
import { Component } from '@angular/core'; import template from './app.template.html'; @Component({ selector: 'my-app', moduleId: module.id, template: template }) export class AppComponent { }
Use import for app template
Use import for app template
TypeScript
mit
MattJeanes/AngularBasic,MattJeanes/AngularBasic,MattJeanes/AngularBasic,MattJeanes/AngularBasic
--- +++ @@ -1,8 +1,9 @@ import { Component } from '@angular/core'; +import template from './app.template.html'; @Component({ selector: 'my-app', moduleId: module.id, - templateUrl: 'app.template.html' + template: template }) export class AppComponent { }
62a3f060f50b5b005959353aa931ec411bbfde0f
js/charts/FuzzySearch.ts
js/charts/FuzzySearch.ts
import {keyBy} from './Util' const fuzzysort = require("fuzzysort") export default class FuzzySearch<T> { strings: string[] datamap: any constructor(data: T[], key: string) { this.datamap = keyBy(data, key) this.strings = data.map((d: any) => fuzzysort.prepare(d[key])) } search(in...
import {keyBy} from './Util' const fuzzysort = require("fuzzysort") export default class FuzzySearch<T> { strings: string[] datamap: any constructor(data: T[], key: string) { this.datamap = keyBy(data, key) this.strings = data.map((d: any) => fuzzysort.prepare(d[key])) } search(in...
Fix data selector search (ouch)
Fix data selector search (ouch)
TypeScript
mit
aaldaber/owid-grapher,owid/owid-grapher,OurWorldInData/owid-grapher,aaldaber/owid-grapher,aaldaber/owid-grapher,OurWorldInData/owid-grapher,OurWorldInData/owid-grapher,OurWorldInData/our-world-in-data-grapher,aaldaber/owid-grapher,OurWorldInData/our-world-in-data-grapher,OurWorldInData/owid-grapher,owid/owid-grapher,ow...
--- +++ @@ -11,7 +11,8 @@ } search(input: string): T[] { - return fuzzysort.go(input, this.strings).map((result: any) => this.datamap[result._target]) + console.log(fuzzysort.go(input, this.strings)) + return fuzzysort.go(input, this.strings).map((result: any) => this.datamap[result.t...
3673f77bf4a8629ca95bc5c436e298d15313b0be
utils/Formatter.ts
utils/Formatter.ts
export let changeFormattedStatus = (status: string) => { if(!status) return null; if (status.indexOf("상승") != -1 || status.indexOf("+") != -1) { return "up"; } else if (status.indexOf("하락") != -1 || status.indexOf("-") != -1) { return "up"; } else { return "new"; } }
export let changeFormattedStatus = (status: string) => { if(!status) return null; if (status.indexOf("상승") != -1 || status.indexOf("+") != -1) { return "up"; } else if (status.indexOf("하락") != -1 || status.indexOf("-") != -1) { return "down"; } else { return "new"; } };
Fix status of rank as down
Fix status of rank as down
TypeScript
mit
endlessdev/rankr,endlessdev/rankr
--- +++ @@ -3,8 +3,8 @@ if (status.indexOf("상승") != -1 || status.indexOf("+") != -1) { return "up"; } else if (status.indexOf("하락") != -1 || status.indexOf("-") != -1) { - return "up"; + return "down"; } else { return "new"; } -} +};
577753c0bdd60362f661f9d19dffd095125e8837
src/utilities.ts
src/utilities.ts
import { Client, CommandInteraction } from "discord.js"; export class Utilities { public constructor(private readonly client: Client) { } public link = async (interaction: CommandInteraction) => { const link = this.client.generateInvite({ scopes: ["applications.commands"] }); await interactio...
import { Client, CommandInteraction } from "discord.js"; export class Utilities { public constructor(private readonly client: Client) { } public link = async (interaction: CommandInteraction) => { const link = this.client.generateInvite({ scopes: ["applications.commands"] }); await interactio...
Add better messages in error handling.
Add better messages in error handling.
TypeScript
mit
Armos-Games/Echo
--- +++ @@ -18,15 +18,17 @@ const member = interaction.guild.members.cache.get(interaction.user.id); const destination = interaction.options.getChannel("channel"); if (member == null) { - interaction.reply("???????????????"); + console.error(`"member" is null for user ...
283415beab7ee4a5b12d8a74daca1f053e23038d
modules/angular2/angular2_sfx.ts
modules/angular2/angular2_sfx.ts
import * as ng from './angular2'; // the router should have its own SFX bundle // But currently the module arithmetic 'angular2/router_sfx - angular2/angular2', // is not support by system builder. import * as router from './router'; var _prevNg = (<any>window).ng; (<any>window).ng = ng; (<any>window).ngRouter = ro...
import * as ng from './angular2'; // the router and http should have their own SFX bundle // But currently the module arithemtic 'angular2/router_sfx - angular2/angular2', // is not support by system builder. import * as router from './router'; import * as http from './http'; var _prevNg = (<any>window).ng; (<any>win...
Include ngHttp in SFX bundle
fix(sfx): Include ngHttp in SFX bundle fixes: #3934 Closes #3933
TypeScript
mit
caffeinetiger/angular,vicb/angular,trshafer/angular,matsko/angular,ttowncompiled/angular,aaron-goshine/angular,cassand/angular,hess-google/angular,shairez/angular,jasonaden/angular,vandres/angular,angular/angular,tamascsaba/angular,Tragetaschen/angular,nosachamos/angular,juleskremer/angular,Alireza-Dezfoolian/angular,a...
--- +++ @@ -1,8 +1,9 @@ import * as ng from './angular2'; -// the router should have its own SFX bundle -// But currently the module arithmetic 'angular2/router_sfx - angular2/angular2', +// the router and http should have their own SFX bundle +// But currently the module arithemtic 'angular2/router_sfx - angular2/a...
751d62f275a4f55d4994fa50101cbc0e027594ea
app/touchpad/voice.service.ts
app/touchpad/voice.service.ts
import { Injectable } from '@angular/core'; import artyomjs = require('artyom.js'); const artyom = artyomjs.ArtyomBuilder.getInstance(); @Injectable() export class VoiceService { constructor() { // Get an unique ArtyomJS instance artyom.initialize({ lang: "fr-FR", // GreatBritain english con...
import { Injectable } from '@angular/core'; import artyomjs = require('artyom.js'); @Injectable() export class VoiceService { private voiceProvider: IVoiceProvider = new ArtyomProvider(); constructor() { } public say(text: string) { console.log("Saying: ", text); this.voiceProvider.say(text); } ...
Use a Provider interface to be more generic
Use a Provider interface to be more generic
TypeScript
mit
ABAPlan/abaplan-core,ABAPlan/abaplan-core,ABAPlan/abaplan-core
--- +++ @@ -1,29 +1,46 @@ import { Injectable } from '@angular/core'; import artyomjs = require('artyom.js'); -const artyom = artyomjs.ArtyomBuilder.getInstance(); @Injectable() export class VoiceService { - constructor() { - // Get an unique ArtyomJS instance - artyom.initialize({ - lang: "fr-F...
dc28200886abf51cefa597a17267c969793bea26
admin/src/js/app.ts
admin/src/js/app.ts
import * as m from 'mithril'; import Layout from 'components/layout'; import HomePage from 'pages/home'; // import RoutesPage from 'pages/routes'; import PagesPage from 'pages/pages'; import PagePage from 'pages/page'; import LoginPage from 'pages/login'; import ThemePage from 'pages/theme'; import ThemesPage from 'pa...
import * as m from 'mithril'; import Layout from 'components/layout'; import HomePage from 'pages/home'; // import RoutesPage from 'pages/routes'; import PagesPage from 'pages/pages'; import PagePage from 'pages/page'; import LoginPage from 'pages/login'; import ThemePage from 'pages/theme'; import ThemesPage from 'pa...
Fix bug with showing nested templates.
admin: Fix bug with showing nested templates.
TypeScript
apache-2.0
ketchuphq/ketchup,ketchuphq/ketchup,ketchuphq/ketchup,ketchuphq/ketchup,ketchuphq/ketchup
--- +++ @@ -24,7 +24,7 @@ '/admin/compose': Layout(PagePage), '/admin/themes': Layout(ThemesPage), '/admin/themes/:name': Layout(ThemePage), - '/admin/themes/:name/templates/:template': Layout(TemplatePage), + '/admin/themes/:name/templates/:template...': Layout(TemplatePage), '/admin/themes-install': L...
774dc6c77c66c242fb59cdc42da6f641a3281377
src/app/app.routing.ts
src/app/app.routing.ts
import {Routes, RouterModule} from '@angular/router'; import {ModuleWithProviders} from '@angular/core'; import {HomeComponent} from './home/home.component'; import {ResultsComponent} from './results/results.component'; import {AboutComponent} from './about/about.component'; import {ContactComponent} from './contact/c...
import {Routes, RouterModule} from '@angular/router'; import {ModuleWithProviders} from '@angular/core'; import {HomeComponent} from './home/home.component'; import {ResultsComponent} from './results/results.component'; import {AboutComponent} from './about/about.component'; import {ContactComponent} from './contact/c...
Add name parameter to details route
Add name parameter to details route
TypeScript
bsd-3-clause
UoA-eResearch/research-hub,UoA-eResearch/research-hub,UoA-eResearch/research-hub
--- +++ @@ -11,7 +11,7 @@ const appRoutes: Routes = [ {path: 'home', component: HomeComponent}, {path: 'results/:searchText', component: ResultsComponent}, - {path: 'details/:id', component: ProductDetailsComponent}, + {path: 'details/:id/:name', component: ProductDetailsComponent}, {path: 'about', compon...
1c0b146b6b0c968c10c1436abec99d9c336a1458
src/lib/grid-search.component.ts
src/lib/grid-search.component.ts
import { Component, Inject, Optional } from '@angular/core'; import { TubularGrid } from './grid.component'; import { SETTINGS_PROVIDER, ITubularSettingsProvider } from './tubular-settings.service'; @Component({ selector: 'grid-search', template: `<div> <div class="input-group i...
import { Component, Inject, Optional } from '@angular/core'; import { TubularGrid } from './grid.component'; import { SETTINGS_PROVIDER, ITubularSettingsProvider } from './tubular-settings.service'; @Component({ selector: 'grid-search', template: `<div> <div class="input-group i...
Fix bug in search input
Fix bug in search input
TypeScript
mit
unosquare/tubular2,unosquare/tubular2,unosquare/tubular2,unosquare/tubular2
--- +++ @@ -9,7 +9,7 @@ <div class="input-group input-group-sm"> <span class="input-group-addon"><i class="fa fa-search"></i></span> <input #toSearch type="text" class="form-control" - [ngModel]="search" + ...
df8adc44284fb08d86f70695aeea28720f391c73
app/ts/tourabu_content.ts
app/ts/tourabu_content.ts
'use strict'; module TourabuEx.content { chrome.runtime.sendMessage({ type: 'content/load', body: {} }); chrome.runtime.onMessage.addListener((mes, sender, callback) => { if (mes.type === 'capture/start') { callback(getDimension()); } }); function getD...
'use strict'; module TourabuEx.content { chrome.runtime.sendMessage({ type: 'content/load', body: {} }); chrome.runtime.onMessage.addListener((mes, sender, callback) => { if (mes.type === 'capture/start') { callback(getDimension()); } }); function getD...
Fix problem with screen capture
Fix problem with screen capture
TypeScript
mit
ayachigin/tourabu-extension,ayachigin/tourabu-extension,ayachigin/tourabu-extension
--- +++ @@ -13,10 +13,11 @@ }); function getDimension(): TourabuEx.capture.Dimension { - var gameFrame = <any>document.querySelector('#game_frame'), - got = gameFrame.offsetTop, - gol = gameFrame.offsetLeft, - gw = gameFrame.offsetWidth, + var gameFrame = $('...
70222568f8ece6153b878ff82d021e3699460a75
packages/ajv/src/validate.pre-hook.ts
packages/ajv/src/validate.pre-hook.ts
import { Hook, HttpResponseBadRequest, ObjectType } from '@foal/core'; import * as Ajv from 'ajv'; const defaultInstance = new Ajv(); export function validate(schema: ObjectType, ajv = defaultInstance): Hook { const isValid = ajv.compile(schema); return ctx => { if (!isValid(ctx.body)) { return new Http...
import { HttpResponseBadRequest, ObjectType, PreHook } from '@foal/core'; import * as Ajv from 'ajv'; const defaultInstance = new Ajv(); export function validate(schema: ObjectType, ajv = defaultInstance): PreHook { const isValid = ajv.compile(schema); return ctx => { if (!isValid(ctx.body)) { return ne...
Update @foal/ajv with PreHook type.
Update @foal/ajv with PreHook type.
TypeScript
mit
FoalTS/foal,FoalTS/foal,FoalTS/foal,FoalTS/foal
--- +++ @@ -1,9 +1,9 @@ -import { Hook, HttpResponseBadRequest, ObjectType } from '@foal/core'; +import { HttpResponseBadRequest, ObjectType, PreHook } from '@foal/core'; import * as Ajv from 'ajv'; const defaultInstance = new Ajv(); -export function validate(schema: ObjectType, ajv = defaultInstance): Hook { +...
2c04b9977d3f60283839d6fad6863c615abe2295
src/Accordion/Accordion.tsx
src/Accordion/Accordion.tsx
import * as React from 'react'; type AccordionProps = React.HTMLAttributes<HTMLDivElement> & { accordion: boolean; }; const Accordion = ({ accordion, ...rest }: AccordionProps): JSX.Element => { const role = accordion ? 'tablist' : undefined; return <div role={role} {...rest} />; }; export default Accor...
import * as React from 'react'; type AccordionProps = React.HTMLAttributes<HTMLDivElement> & { accordion: boolean; }; const Accordion = ({ accordion, ...rest }: AccordionProps): JSX.Element => { return <div {...rest} />; }; export default Accordion;
Remove unnecessary tablist role from accordion parent
Remove unnecessary tablist role from accordion parent
TypeScript
mit
springload/react-accessible-accordion,springload/react-accessible-accordion,springload/react-accessible-accordion
--- +++ @@ -5,9 +5,7 @@ }; const Accordion = ({ accordion, ...rest }: AccordionProps): JSX.Element => { - const role = accordion ? 'tablist' : undefined; - - return <div role={role} {...rest} />; + return <div {...rest} />; }; export default Accordion;
1ab0617ad981be6bbb38881c378902aebab1b62e
cli-access-check.ts
cli-access-check.ts
// Load the SDK and UUID import * as AWS from 'aws-sdk' import * as uuid from 'uuid' // Create an S3 client const s3 = new AWS.S3() // Create a bucket and upload something into it const bucketName = `node-sdk-check-${uuid.v4()}` async function main() { try { await s3.createBucket({ Bucket: bucketName })....
// Load the SDK and UUID import { S3 } from 'aws-sdk' import * as uuid from 'uuid' // Create an S3 client const s3 = new S3() // Create a bucket and upload something into it const bucketName = `node-sdk-check-${uuid.v4()}` async function main() { try { await s3.createBucket({ Bucket: bucketName }).promis...
Use member import for S3.
Use member import for S3.
TypeScript
mit
go-westeros/aws-devops
--- +++ @@ -1,9 +1,9 @@ // Load the SDK and UUID -import * as AWS from 'aws-sdk' +import { S3 } from 'aws-sdk' import * as uuid from 'uuid' // Create an S3 client -const s3 = new AWS.S3() +const s3 = new S3() // Create a bucket and upload something into it const bucketName = `node-sdk-check-${uuid.v4()}`
449346c169c231874f89010034e9b6d1d0489660
src/service-module/types.ts
src/service-module/types.ts
/* eslint @typescript-eslint/no-explicit-any: 0 */ export interface FeathersVuexOptions { serverAlias: string addOnUpsert?: boolean autoRemove?: boolean debug?: boolean diffOnPatch?: boolean enableEvents?: boolean idField?: string keepCopiesInStore?: boolean nameStyle?: string paramsForServer?: stri...
/* eslint @typescript-eslint/no-explicit-any: 0 */ export interface FeathersVuexOptions { serverAlias: string addOnUpsert?: boolean autoRemove?: boolean debug?: boolean diffOnPatch?: boolean enableEvents?: boolean idField?: string keepCopiesInStore?: boolean nameStyle?: string paramsForServer?: stri...
Add nameStyle and preferUpdate to interface
Add nameStyle and preferUpdate to interface
TypeScript
mit
feathers-plus/feathers-vuex,feathers-plus/feathers-vuex
--- +++ @@ -26,7 +26,9 @@ diffOnPatch?: boolean enableEvents?: boolean idField?: string + nameStyle?: string namespace?: string + preferUpdate?: boolean servicePath?: string state?: {} getters?: {}
877237181394a1c9b0d66c9fddbe2d83bae804c5
src/app/error/error.component.spec.ts
src/app/error/error.component.spec.ts
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { TitleService } from '../shared/title.service'; import { MockTitleService } from '../shared/mocks/mock-title.service'; import { PageHeroComponent } from '../shared/page-hero...
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { It, Mock, Times } from 'typemoq'; import { TitleService } from '../shared/title.service'; import { PageHeroComponent } from '../shared/page-hero/page-hero.component'; impo...
Update mock usage for error component test
Update mock usage for error component test
TypeScript
apache-2.0
jbrowneuk/jblog,jbrowneuk/jblog,jbrowneuk/jblog,jbrowneuk/jblog
--- +++ @@ -1,19 +1,24 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; +import { It, Mock, Times } from 'typemoq'; + import { TitleService } from '../shared/title.service'; -import { MockTitleService } from '../shared/moc...
0e5a8a8ffcf231eb0c3a8b93319cc579f2f69aaf
src/components/Found.tsx
src/components/Found.tsx
import * as React from 'react'; import { Observable } from 'rxjs'; import Message from '../model/Message'; import Track from '../model/Track'; import { regexExt, regexM3U } from '../filters'; import FoundList from './FoundList'; import PlaylistItem from './PlaylistItem'; import './Found.css'; interface Props extends R...
import * as React from 'react'; import { Observable } from 'rxjs'; import Message from '../model/Message'; import Track from '../model/Track'; import { regexExt, regexM3U } from '../filters'; import FoundList from './FoundList'; import PlaylistItem from './PlaylistItem'; import './Found.css'; interface Props extends R...
Support tracks with correct mime type.
Support tracks with correct mime type.
TypeScript
mit
soflete/extereo,soflete/extereo
--- +++ @@ -12,7 +12,7 @@ } function Found(props: Props) { - const tracks = props.tracks.filter(({ href }) => regexExt.test(href)); + const tracks = props.tracks.filter(({ href }) => !regexM3U.test(href)); const playlists = props.tracks.filter(({ href }) => regexM3U.test(href)); return ( ...
a9c9d70b213a2e27c53fbb41dd1ffaef759fb7fb
packages/game/src/game/components/PlayerInfo.tsx
packages/game/src/game/components/PlayerInfo.tsx
import * as React from 'react'; import { Small, Text } from 'rebass'; import InfoPane from 'game/components/InfoPane'; import { Player, User, Values } from '@battles/models'; import { userInfo } from 'os'; type PlayerInfoProps = { user: User; player: Player; isActive: boolean; }; const PlayerInfo: React.Statele...
import * as React from 'react'; import { Small, Text } from 'rebass'; import InfoPane from 'game/components/InfoPane'; import { Player, User, Values } from '@battles/models'; import { userInfo } from 'os'; type PlayerInfoProps = { user: User; player: Player; isActive: boolean; }; const PlayerInfo: React.Statele...
Remove ready state from player info
Remove ready state from player info
TypeScript
mit
tomwwright/graph-battles,tomwwright/graph-battles,tomwwright/graph-battles
--- +++ @@ -24,7 +24,6 @@ ) </Text> <Text>Victory Points {player.victoryPoints}</Text> - <Text>{player.data.ready ? 'Ready' : 'Not Ready'}</Text> </Small> </InfoPane> );
e5edd900d2fbf36eb0fbe3747574740451631543
spec/performance/performance-suite.ts
spec/performance/performance-suite.ts
import { runBenchmarks } from './support/runner'; import { BenchmarkConfig, BenchmarkFactories } from './support/async-bench'; import { QUERY_BENCHMARKS } from './profiling/query-pipeline.perf'; import { COMPARISON } from './comparison/comparison'; import { runComparisons } from './support/compare-runner'; import { Gra...
import { runBenchmarks } from './support/runner'; import { BenchmarkConfig, BenchmarkFactories } from './support/async-bench'; import { QUERY_BENCHMARKS } from './profiling/query-pipeline.perf'; import { COMPARISON } from './comparison/comparison'; import { runComparisons } from './support/compare-runner'; import { Gra...
Enable comparison benchmark by default
Enable comparison benchmark by default
TypeScript
mit
AEB-labs/graphql-weaver,AEB-labs/graphql-weaver
--- +++ @@ -12,7 +12,7 @@ ]; const comparisons: BenchmarkConfig[][] = [ - //COMPARISON + COMPARISON ]; async function run() {
5ec570b4ab8ac27c0e4739c2cd586f7d8b0ed9b3
src/utils/string-utils.ts
src/utils/string-utils.ts
// TODO: Add tests function signCharacter(value: number): string { return value < 0 ? '− ' /* U+2212 U+202F */ : ''; } // Prints an integer padded with leading zeroes export function formatInteger(value: number, padding: number): string { const str = value.toFixed(0); return (str.length >= padding) ? str : ('00...
// TODO: Add tests function signCharacter(value: number): string { return value < 0 ? '−' /* U+2212 */ : ''; } // Prints an integer padded with leading zeroes export function formatInteger(value: number, padding: number): string { const str = value.toFixed(0); return (str.length >= padding) ? str : ('0000000000...
Remove space between minus sign and the number
Remove space between minus sign and the number
TypeScript
apache-2.0
sth-larp/deus-mobile,sth-larp/deus-mobile,sth-larp/deus-mobile,sth-larp/deus-mobile,sth-larp/deus-mobile
--- +++ @@ -1,7 +1,7 @@ // TODO: Add tests function signCharacter(value: number): string { - return value < 0 ? '− ' /* U+2212 U+202F */ : ''; + return value < 0 ? '−' /* U+2212 */ : ''; } // Prints an integer padded with leading zeroes
127325ecb03e36584dc0fd46c984d3344272b8ec
app/scripts/components/route/Suspended.tsx
app/scripts/components/route/Suspended.tsx
import React from 'react'; import { Redirect, Route, RouteProps } from 'react-router-dom'; import Loading from '../page/Loading'; type SuspendedComponent = typeof React.Component | React.LazyExoticComponent<React.ComponentType>; interface SuspendedProps { path: string; component: SuspendedComponent; requ...
import React from 'react'; import { Redirect, Route, RouteProps } from 'react-router-dom'; import Loading from '../page/Loading'; type SuspendedComponent = typeof React.Component | React.FunctionComponent | React.LazyExoticComponent<React.ComponentType>; interface SuspendedProps { path: string; component: Su...
Allow function component type on suspended route
Allow function component type on suspended route
TypeScript
mit
benct/tomlin-web,benct/tomlin-web
--- +++ @@ -3,7 +3,7 @@ import Loading from '../page/Loading'; -type SuspendedComponent = typeof React.Component | React.LazyExoticComponent<React.ComponentType>; +type SuspendedComponent = typeof React.Component | React.FunctionComponent | React.LazyExoticComponent<React.ComponentType>; interface SuspendedPr...
355ff08e7fd4dcb178694b2920fd5ba204378208
test/HEREMap.tests.tsx
test/HEREMap.tests.tsx
import HEREMap from '../src/HEREMap'; import * as chai from 'chai'; import * as sinon from 'sinon'; import { mount, shallow } from 'enzyme'; import * as React from 'react'; describe('<HEREMap />', () => { it('should call componentDidMount when the component is mounted', () => { const spy = sinon.spy(HEREM...
import HEREMap from "../src/HEREMap"; import * as chai from "chai"; import * as sinon from "sinon"; import { mount, shallow } from "enzyme"; import * as React from "react"; describe("<HEREMap />", () => { it("should call componentDidMount when the component is mounted", () => { const didMountSpy = sinon.s...
Apply 'restore' method to the spy (instead of method directly) to fix TS error.
Apply 'restore' method to the spy (instead of method directly) to fix TS error.
TypeScript
mit
Josh-ES/react-here-maps,Josh-ES/react-here-maps
--- +++ @@ -1,21 +1,22 @@ -import HEREMap from '../src/HEREMap'; -import * as chai from 'chai'; -import * as sinon from 'sinon'; -import { mount, shallow } from 'enzyme'; -import * as React from 'react'; +import HEREMap from "../src/HEREMap"; +import * as chai from "chai"; +import * as sinon from "sinon"; +import { m...
6ef495c83fa8837976e76b2055b01820e0cef20f
index.d.ts
index.d.ts
/** * Execute a command cross-platform. * * @param {string} cmd command to execute e.g. `"npm"` * @param {any[]} [args] command argument e.g. `["install", "-g", "git"]` * @param {Partial<crossSpawnPromise.CrossSpawnOptions>} [options] additional options. * @returns {Promise<Uint8Array>} a promise result with `std...
/** * Execute a command cross-platform. * * @param {string} cmd command to execute e.g. `"npm"` * @param {any[]} [args] command argument e.g. `["install", "-g", "git"]` * @param {Partial<crossSpawnPromise.CrossSpawnOptions>} [options] additional options. * @returns {Promise<Uint8Array>} a promise result with `std...
Use real SpawnOptions as base for cross spawn promise options
Use real SpawnOptions as base for cross spawn promise options
TypeScript
mit
zentrick/cross-spawn-promise
--- +++ @@ -6,13 +6,16 @@ * @param {Partial<crossSpawnPromise.CrossSpawnOptions>} [options] additional options. * @returns {Promise<Uint8Array>} a promise result with `stdout` */ + +/// <reference types="node" /> + declare function crossSpawnPromise(cmd: string, args?: any[], options?: Partial<crossSpawnPromis...
125ac71d6c5519fa2e882a9232a124d026d3f86a
packages/objects/src/index.ts
packages/objects/src/index.ts
export * from './types' export * from './clone' export * from './hasOwnProperty' export * from './invoker' export * from './isEmpty' export * from './keys' export * from './length' export * from './lensPath' export * from './lensProp' export * from './path' export * from './prop' export * from './set' export * from '....
export * from './types' export * from './clone' export * from './invoker' export * from './isEmpty' export * from './keys' export * from './length' export * from './lensPath' export * from './lensProp' export * from './path' export * from './prop' export * from './set' export * from './values' // export last to avoid ...
Move hasOwnProperty to the last export
Move hasOwnProperty to the last export hasOwnProperty was conflicting with the native hasOwnProperty in the compiled es5 file. This caused exports defined after it to not be included.
TypeScript
mit
TylorS/typed,TylorS/typed
--- +++ @@ -1,7 +1,6 @@ export * from './types' export * from './clone' -export * from './hasOwnProperty' export * from './invoker' export * from './isEmpty' export * from './keys' @@ -12,3 +11,5 @@ export * from './prop' export * from './set' export * from './values' +// export last to avoid conflicts with...
267af79fd179a2cdb05fc126adcb34781f128fc9
src/app/drawing/drawing.component.ts
src/app/drawing/drawing.component.ts
import { Component, OnInit, Inject, ViewChild } from '@angular/core'; import { SketchpadComponent } from '../sketchpad/components/sketchpad/sketchpad.component'; import { AngularFire, FirebaseRef } from 'angularfire2'; @Component({ selector: 'app-drawing', templateUrl: './drawing.component.html', styleUrls: ['./...
import { Component, OnInit, Inject, ViewChild } from '@angular/core'; import { SketchpadComponent } from '../sketchpad/components/sketchpad/sketchpad.component'; import { AngularFire, FirebaseRef } from 'angularfire2'; @Component({ selector: 'app-drawing', templateUrl: './drawing.component.html', styleUrls: ['./...
Fix bug with uploading images
Fix bug with uploading images
TypeScript
mit
jonas99y/pythagorasvo21,jonas99y/pythagorasvo21,jonas99y/pythagorasvo21
--- +++ @@ -16,20 +16,23 @@ private ref: firebase.storage.Reference; constructor(private af: AngularFire, @Inject(FirebaseRef) fb) { + console.log(fb); this.ref = fb.storage().ref(); + console.log(this.ref); } ngOnInit() { } + clicked($event) { - this.saveCanvasToFirebase(this.sk...
4b59ddc3a0bb5859b6e35af043692e0f0332b40b
integrations/plugin-debugger/src/index.ts
integrations/plugin-debugger/src/index.ts
import { HandleRequest } from '@jovotech/framework'; import { JovoDebugger, JovoDebuggerConfig } from './JovoDebugger'; declare module '@jovotech/framework/dist/types/Extensible' { interface ExtensiblePluginConfig { JovoDebugger?: JovoDebuggerConfig; } interface ExtensiblePlugins { JovoDebugger?: JovoDe...
import { HandleRequest } from '@jovotech/framework'; import { JovoDebugger, JovoDebuggerConfig } from './JovoDebugger'; declare module '@jovotech/framework/dist/types/Extensible' { interface ExtensiblePluginConfig { JovoDebugger?: JovoDebuggerConfig; } interface ExtensiblePlugins { JovoDebugger?: JovoDe...
Add missing exports of errors
:sparkles: Add missing exports of errors
TypeScript
apache-2.0
jovotech/jovo-framework-nodejs,jovotech/jovo-framework-nodejs
--- +++ @@ -19,6 +19,11 @@ HandleRequest.prototype.debuggerRequestId = 0; +export * from './errors/LanguageModelDirectoryNotFoundError'; +export * from './errors/SocketConnectionFailedError'; +export * from './errors/SocketNotConnectedError'; +export * from './errors/WebhookIdNotFoundError'; + export * from './...
06fe1cc070d4366bc72d0da75f871b1ef230ca91
src/main/ts/ephox/sugar/api/view/Width.ts
src/main/ts/ephox/sugar/api/view/Width.ts
import Css from '../properties/Css'; import Dimension from '../../impl/Dimension'; import Element from '../node/Element'; var api = Dimension('width', function (element: Element) { // IMO passing this function is better than using dom['offset' + 'width'] return element.dom().offsetWidth; }); var set = function (e...
import Css from '../properties/Css'; import Dimension from '../../impl/Dimension'; import Element from '../node/Element'; import { HTMLElement } from '@ephox/dom-globals'; var api = Dimension('width', function (element: Element) { // IMO passing this function is better than using dom['offset' + 'width'] return (el...
Add types to enforce the function returning a number
TINY-1600: Add types to enforce the function returning a number
TypeScript
mit
tinymce/tinymce,FernCreek/tinymce,tinymce/tinymce,TeamupCom/tinymce,FernCreek/tinymce,tinymce/tinymce,FernCreek/tinymce,TeamupCom/tinymce
--- +++ @@ -1,10 +1,11 @@ import Css from '../properties/Css'; import Dimension from '../../impl/Dimension'; import Element from '../node/Element'; +import { HTMLElement } from '@ephox/dom-globals'; var api = Dimension('width', function (element: Element) { // IMO passing this function is better than using d...
8c0bb4e883c03d30507661e7347ad2ad48056b4e
webpack/farmware/__tests__/reducer_test.ts
webpack/farmware/__tests__/reducer_test.ts
import { famrwareReducer } from "../reducer"; import { FarmwareState } from "../interfaces"; import { Actions } from "../../constants"; import { fakeImage } from "../../__test_support__/fake_state/resources"; describe("famrwareReducer", () => { it("Removes UUIDs from state on deletion", () => { const image = fa...
import { famrwareReducer } from "../reducer"; import { FarmwareState } from "../interfaces"; import { Actions } from "../../constants"; import { fakeImage } from "../../__test_support__/fake_state/resources"; describe("famrwareReducer", () => { it("Removes UUIDs from state on deletion", () => { const image = fa...
Add test for farmwareReducer INIT_RESOURCE
Add test for farmwareReducer INIT_RESOURCE
TypeScript
mit
gabrielburnworth/Farmbot-Web-App,gabrielburnworth/Farmbot-Web-App,RickCarlino/farmbot-web-app,RickCarlino/farmbot-web-app,FarmBot/Farmbot-Web-API,gabrielburnworth/Farmbot-Web-App,RickCarlino/farmbot-web-app,FarmBot/farmbot-web-app,FarmBot/Farmbot-Web-API,FarmBot/Farmbot-Web-API,RickCarlino/farmbot-web-app,gabrielburnwo...
--- +++ @@ -27,4 +27,16 @@ expect(newState.currentImage).not.toBeUndefined(); expect(newState.currentImage).toBe(image.uuid); }); + + it("sets the current image via INIT_RESOURCE", () => { + const image = fakeImage(); + const oldState: FarmwareState = { currentImage: undefined }; + const newSta...
5f6243668a1f160962a80a439846fe8c49a26bfb
src/testing/support/createElement.ts
src/testing/support/createElement.ts
/** * Create HTML and SVG elements from a valid HTML string. * * NOTE The given HTML must contain only one root element, of type `Element`. */ export function createElement(html: string): Element { return document.createRange().createContextualFragment(html).firstElementChild as Element }
/** * Create HTML and SVG elements from a valid HTML string. * * NOTE The given HTML must contain only one root element, of type `Element`. */ export function createElement(html: string, isSvg = false): Element { if (isSvg) { html = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org...
Add support for SVG element creation
Add support for SVG element creation
TypeScript
agpl-3.0
inad9300/Soil,inad9300/Soil
--- +++ @@ -3,6 +3,13 @@ * * NOTE The given HTML must contain only one root element, of type `Element`. */ -export function createElement(html: string): Element { - return document.createRange().createContextualFragment(html).firstElementChild as Element +export function createElement(html: string, isSvg = f...
deafb704c066e75dc7c826c2a2eb47cf42022b86
src/ts/content/chat/URLWhitelist.tsx
src/ts/content/chat/URLWhitelist.tsx
/** * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ const whitelist = [ /twimg.com$/, /fbcdn.net$/, /imgur.com$/, /trillian.im$/ ]; function ok(text:st...
/** * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ const whitelist = [ /twimg.com$/, /fbcdn.net$/, /imgur.com$/, /trillian.im$/, /imageshack.com$/, ...
Add a bunch of image sharing websites to white list
Add a bunch of image sharing websites to white list
TypeScript
mpl-2.0
jamkoo/cu-patcher-ui,saddieeiddas/cu-patcher-ui,jamkoo/cu-patcher-ui,saddieeiddas/cu-patcher-ui,stanley85/cu-patcher-ui,stanley85/cu-patcher-ui,saddieeiddas/cu-patcher-ui
--- +++ @@ -8,7 +8,18 @@ /twimg.com$/, /fbcdn.net$/, /imgur.com$/, - /trillian.im$/ + /trillian.im$/, + /imageshack.com$/, + /postimage.org$/, + /staticflickr.com$/, + /tinypic.com$/, + /photobucket.com$/, + /cdninstagram.com$/, + /deviantart.net$/, + /imagebam.com$/, + /dropboxusercontent.com$/, ...
fa4bc79cecb2488032c5e581f8b1227d00a712a3
desktop/src/renderer/components/app-settings/app-settings-plugins/app-settings-plugins.tsx
desktop/src/renderer/components/app-settings/app-settings-plugins/app-settings-plugins.tsx
import { Component, h, State } from '@stencil/core' import { CHANNEL } from '../../../../preload/index' import { getAvailablePlugins, pluginStore } from './pluginStore' import { i18n } from '../../../../i18n' @Component({ tag: 'app-settings-plugins', styleUrl: 'app-settings-plugins.css', scoped: true, }) export ...
import { Component, h, State } from '@stencil/core' import { CHANNEL } from '../../../../preload/index' import { getAvailablePlugins, pluginStore } from './pluginStore' import { i18n } from '../../../../i18n' @Component({ tag: 'app-settings-plugins', styleUrl: 'app-settings-plugins.css', scoped: true, }) export ...
Fix rendering of available plugins
fix(Plugins): Fix rendering of available plugins
TypeScript
apache-2.0
stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila
--- +++ @@ -39,7 +39,7 @@ </stencila-button> </div> {pluginStore.plugins.ids.map((pluginName) => ( - <plugin-card pluginName={pluginName}></plugin-card> + <app-settings-plugin-card pluginName={pluginName}></app-settings-plugin-card> ))} </div> )
7f6e56fdcf3dcead2cb7f1fd11cb41fd10084824
packages/@sanity/diff/src/calculate/diffSimple.ts
packages/@sanity/diff/src/calculate/diffSimple.ts
import {SimpleDiff, DiffOptions, NoDiff, NumberInput, BooleanInput} from '../types' export function diffSimple<A, I extends NumberInput<A> | BooleanInput<A>>( fromInput: I, toInput: I, options: DiffOptions ): SimpleDiff<A> | NoDiff { const fromValue = fromInput.value const toValue = toInput.value if (from...
import {SimpleDiff, DiffOptions, NoDiff, NumberInput, BooleanInput} from '../types' export function diffSimple<A, I extends NumberInput<A> | BooleanInput<A>>( fromInput: I, toInput: I, options: DiffOptions ): SimpleDiff<A> | NoDiff { const fromValue = fromInput.value const toValue = toInput.value if (from...
Fix inverted change detection for simple diffs
[diff] Fix inverted change detection for simple diffs
TypeScript
mit
sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity
--- +++ @@ -8,7 +8,7 @@ const fromValue = fromInput.value const toValue = toInput.value - if (fromValue !== toValue) + if (fromValue === toValue) return { type: 'unchanged', fromValue,
c0bb083d1fcd3af5cea489108de5a514a166bb4f
app/shared/map-field.ts
app/shared/map-field.ts
export class MapField { label: string; namespace: string; name: string; uri: string; guidelines: string; source: string; definition: string; obligation: string; range: any; repeatable: boolean; input: string; visible: boolean; }
export class MapField { label: string; namespace: string; name: string; uri: string; guidelines: string; source: string; definition: string; obligation: string; range: any; repeatable: boolean; input: string; visible: boolean; editable: boolean; }
Add 'editable' to MapField class
Add 'editable' to MapField class
TypeScript
mit
uhlibraries-digital/brays,uhlibraries-digital/brays,uhlibraries-digital/brays
--- +++ @@ -11,4 +11,5 @@ repeatable: boolean; input: string; visible: boolean; + editable: boolean; }
83e83c472f1865c86d036e3966427e19c1b35d79
srcts/react-ui/CenteredIcon.tsx
srcts/react-ui/CenteredIcon.tsx
import * as React from "react"; import classNames from "../modules/classnames"; export interface CenteredIconProps extends React.HTMLProps<HTMLSpanElement> { iconProps?:React.HTMLProps<HTMLImageElement> } export interface CenteredIconState { } export default class CenteredIcon extends React.Component<CenteredIconPr...
import * as React from "react"; import * as _ from "lodash"; import classNames from "../modules/classnames"; export interface CenteredIconProps extends React.HTMLProps<HTMLSpanElement> { iconProps?:React.HTMLProps<HTMLImageElement> } export interface CenteredIconState { } export default class CenteredIcon extends R...
Revert "Icon now take focus on mouse enter"
Revert "Icon now take focus on mouse enter" This reverts commit 3c3843bc0538ae76d749b973ecc41f7fa707f37c.
TypeScript
mpl-2.0
WeaveTeam/WeaveJS,WeaveTeam/WeaveJS,WeaveTeam/WeaveJS,WeaveTeam/WeaveJS
--- +++ @@ -1,4 +1,5 @@ import * as React from "react"; +import * as _ from "lodash"; import classNames from "../modules/classnames"; export interface CenteredIconProps extends React.HTMLProps<HTMLSpanElement> @@ -12,18 +13,15 @@ export default class CenteredIcon extends React.Component<CenteredIconProps, Cen...
abcae859a91690217f608cf4b0c7d489b1c27edf
client/src/app/plants/bed.component.ts
client/src/app/plants/bed.component.ts
import { Component, OnInit } from '@angular/core'; import { PlantListService } from "./plant-list.service"; import { Plant } from "./plant"; import { FilterBy } from "./filter.pipe"; import {Params, ActivatedRoute} from "@angular/router"; @Component({ selector: 'bed-component', templateUrl: 'bed.component.html...
import { Component, OnInit } from '@angular/core'; import { PlantListService } from "./plant-list.service"; import { Plant } from "./plant"; import {Params, ActivatedRoute} from "@angular/router"; @Component({ selector: 'bed-component', templateUrl: 'bed.component.html', }) export class BedComponent implement...
Remove unneeded reference to FilterBy
Remove unneeded reference to FilterBy
TypeScript
mit
UMM-CSci-3601-S17/digital-display-garden-iteration-3-dorfner,UMM-CSci-3601-S17/digital-display-garden-iteration-4-dorfner-v2,UMM-CSci-3601-S17/digital-display-garden-iteration-3-dorfner,UMM-CSci-3601-S17/digital-display-garden-iteration-4-dorfner-v2,UMM-CSci-3601-S17/digital-display-garden-iteration-4-dorfner-v2,UMM-CS...
--- +++ @@ -1,13 +1,11 @@ import { Component, OnInit } from '@angular/core'; import { PlantListService } from "./plant-list.service"; import { Plant } from "./plant"; -import { FilterBy } from "./filter.pipe"; import {Params, ActivatedRoute} from "@angular/router"; @Component({ selector: 'bed-component', ...
5c080d2585915d85e8404ed06532dbe47f5887c1
packages/docusaurus-plugin-typedoc/src/theme/theme.ts
packages/docusaurus-plugin-typedoc/src/theme/theme.ts
import MarkdownTheme from 'typedoc-plugin-markdown/dist/theme'; import { Renderer } from 'typedoc/dist/lib/output/renderer'; import { DocsaurusFrontMatterComponent } from './front-matter-component'; export default class DocusaurusTheme extends MarkdownTheme { constructor(renderer: Renderer, basePath: string) { ...
import MarkdownTheme from 'typedoc-plugin-markdown/dist/theme'; import { PageEvent } from 'typedoc/dist/lib/output/events'; import { Renderer } from 'typedoc/dist/lib/output/renderer'; import { DocsaurusFrontMatterComponent } from './front-matter-component'; export default class DocusaurusTheme extends MarkdownTheme ...
Replace all angle brackets for full `mdx` support
Replace all angle brackets for full `mdx` support
TypeScript
mit
tgreyuk/typedoc-plugin-markdown,tgreyuk/typedoc-plugin-markdown
--- +++ @@ -1,4 +1,5 @@ import MarkdownTheme from 'typedoc-plugin-markdown/dist/theme'; +import { PageEvent } from 'typedoc/dist/lib/output/events'; import { Renderer } from 'typedoc/dist/lib/output/renderer'; import { DocsaurusFrontMatterComponent } from './front-matter-component'; @@ -6,6 +7,15 @@ export defa...
926dd6e83da4d45702f7940c55978568568deb86
appbuilder/appbuilder-bootstrap.ts
appbuilder/appbuilder-bootstrap.ts
require("../bootstrap"); $injector.require("projectConstants", "./appbuilder/project-constants"); $injector.require("projectFilesProvider", "./appbuilder/providers/project-files-provider"); $injector.require("pathFilteringService", "./appbuilder/services/path-filtering"); $injector.require("liveSyncServiceBase", "./ser...
require("../bootstrap"); $injector.require("projectConstants", "./appbuilder/project-constants"); $injector.require("projectFilesProvider", "./appbuilder/providers/project-files-provider"); $injector.require("pathFilteringService", "./appbuilder/services/path-filtering"); $injector.require("liveSyncServiceBase", "./ser...
Fix cannot find module ios-log-filter
Fix cannot find module ios-log-filter Change the path to ios-log-filter to point to the correct folder.
TypeScript
apache-2.0
telerik/mobile-cli-lib,telerik/mobile-cli-lib
--- +++ @@ -11,4 +11,4 @@ $injector.require("cordovaProjectCapabilities", "./appbuilder/project/cordova-project-capabilities"); $injector.require("mobilePlatformsCapabilities", "./appbuilder/mobile-platforms-capabilities"); $injector.requirePublic("npmService", "./appbuilder/services/npm-service"); -$injector.requ...
62ff0a3dc2076f80c8dbeacb615e3fd513510671
examples/arduino-uno/fade.ts
examples/arduino-uno/fade.ts
import { Int, periodic } from '@amnisio/rivulet'; import { Sources, HIGH, LOW, run, createSinks } from '@amnisio/arduino-uno'; // Initialize brightness and change let brightness = 0; let change = 5; const getCurrentBrightness = (event: Int) => { // Make the change to brightness brightness = brightness + change; ...
import { periodic } from '@amnisio/rivulet'; import { Sources, HIGH, LOW, run, createSinks } from '@amnisio/arduino-uno'; // Initialize brightness and change let brightness = 0; let change = 5; const getCurrentBrightness = (event: number) => { // Make the change to brightness brightness = brightness + change; /...
Use number instead of Int
Use number instead of Int
TypeScript
mit
artfuldev/RIoT
--- +++ @@ -1,11 +1,11 @@ -import { Int, periodic } from '@amnisio/rivulet'; +import { periodic } from '@amnisio/rivulet'; import { Sources, HIGH, LOW, run, createSinks } from '@amnisio/arduino-uno'; // Initialize brightness and change let brightness = 0; let change = 5; -const getCurrentBrightness = (event: ...
9b92c517fc500f3f5cbbd1fbad40cea602f201df
packages/lesswrong/lib/abTests.ts
packages/lesswrong/lib/abTests.ts
import { ABTest } from './abTestImpl'; // An A/B test which doesn't do anything (other than randomize you), for testing // the A/B test infrastructure. export const noEffectABTest = new ABTest({ name: "abTestNoEffect", description: "A placeholder A/B test which has no effect", groups: { group1: { descr...
import { ABTest } from './abTestImpl'; // An A/B test which doesn't do anything (other than randomize you), for testing // the A/B test infrastructure. export const noEffectABTest = new ABTest({ name: "abTestNoEffect", description: "A placeholder A/B test which has no effect", groups: { group1: { descr...
Remove remnants of inactive num-posts-on-homepage A/B test
Remove remnants of inactive num-posts-on-homepage A/B test
TypeScript
mit
Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2
--- +++ @@ -16,22 +16,3 @@ }, } }); - -export const numPostsOnHomePage = new ABTest({ - name: "numPostsOnHomePage", - description: "Number of Posts in Latest Posts Section of Home Page", - groups: { - "10": { - description: "Ten posts", - weight: 1, - }, - "13": { - description: "T...
ab9caa459f236a7c921042e9044859340829ea9e
app.ts
app.ts
/// <reference path="MonitoredSocket.ts" /> import MonitoredSocket = require("./MonitoredSocket"); import http = require("http"); import fs = require("fs"); var config = require("./config"); var listenIp: string = config["serv"].ip; var listenPort: number = config["serv"].port; var responseData: string = fs.readFile...
/// <reference path="MonitoredSocket.ts" /> import MonitoredSocket = require("./MonitoredSocket"); import http = require("http"); import fs = require("fs"); var config = require("./config"); var listenIp: string = config["serv"].ip; var listenPort: number = config["serv"].port; var responseData: string = fs.readFile...
Fix push to undefined + up logging
Fix push to undefined + up logging
TypeScript
mit
OzuYatamutsu/is-my-server-up,OzuYatamutsu/is-my-server-up,OzuYatamutsu/is-my-server-up
--- +++ @@ -8,13 +8,15 @@ var listenPort: number = config["serv"].port; var responseData: string = fs.readFileSync("index.html", "utf-8"); -var monitoredSocks: Array<MonitoredSocket>; +var monitoredSocks: Array<MonitoredSocket> = []; function init(): void { for (var service in config["services"]) { ...
fc0f6bea522c58cf1c42325b2377a754572277d9
addons/controls/src/register.tsx
addons/controls/src/register.tsx
import React from 'react'; import addons, { types } from '@storybook/addons'; import { AddonPanel } from '@storybook/components'; import { API } from '@storybook/api'; import { ControlsPanel } from './components/ControlsPanel'; import { ADDON_ID } from './constants'; addons.register(ADDON_ID, (api: API) => { addons....
import React from 'react'; import addons, { types } from '@storybook/addons'; import { AddonPanel } from '@storybook/components'; import { API } from '@storybook/api'; import { ControlsPanel } from './components/ControlsPanel'; import { ADDON_ID, PARAM_KEY } from './constants'; addons.register(ADDON_ID, (api: API) => ...
Fix paramKey handling for tab auto-configurability
Addon-controls: Fix paramKey handling for tab auto-configurability
TypeScript
mit
storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/react-storybook,kadirahq/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook
--- +++ @@ -3,12 +3,13 @@ import { AddonPanel } from '@storybook/components'; import { API } from '@storybook/api'; import { ControlsPanel } from './components/ControlsPanel'; -import { ADDON_ID } from './constants'; +import { ADDON_ID, PARAM_KEY } from './constants'; addons.register(ADDON_ID, (api: API) => { ...
c16422676ee1d4b7abe4fa41ff357f0bbe263b47
src/Artsy/Router/Utils/findCurrentRoute.tsx
src/Artsy/Router/Utils/findCurrentRoute.tsx
import { Match, RouteConfig } from "found" export const findCurrentRoute = ({ routes, routeIndices, }: Match & { route?: RouteConfig }) => { let remainingRouteIndicies = [...routeIndices] let route: RouteConfig = routes[remainingRouteIndicies.shift()] while (remainingRouteIndicies.length > 0) { route = ...
import { Match, RouteConfig } from "found" export const findCurrentRoute = ({ route: baseRoute, routes, routeIndices, }: Match & { route?: RouteConfig }) => { if (!routeIndices || routeIndices.length === 0) { return baseRoute } let remainingRouteIndicies = [...routeIndices] let route: RouteConfig = r...
Add fallback logic if routeIndicies aren't present
Add fallback logic if routeIndicies aren't present
TypeScript
mit
artsy/reaction-force,artsy/reaction-force,artsy/reaction,artsy/reaction,artsy/reaction
--- +++ @@ -1,9 +1,13 @@ import { Match, RouteConfig } from "found" export const findCurrentRoute = ({ + route: baseRoute, routes, routeIndices, }: Match & { route?: RouteConfig }) => { + if (!routeIndices || routeIndices.length === 0) { + return baseRoute + } let remainingRouteIndicies = [...rout...
7fac5aa010769750c040ae8ced46bb9fb0ab418e
src/geometries/ConeBufferGeometry.d.ts
src/geometries/ConeBufferGeometry.d.ts
import { CylinderBufferGeometry } from './CylinderBufferGeometry'; export class ConeBufferGeometry extends CylinderBufferGeometry { /** * @param [radius=1] — Radius of the cone base. * @param [height=1] — Height of the cone. * @param [radialSegment=8] — Number of segmented faces around the circumference of the...
import { CylinderBufferGeometry } from './CylinderBufferGeometry'; export class ConeBufferGeometry extends CylinderBufferGeometry { /** * @param [radius=1] — Radius of the cone base. * @param [height=1] — Height of the cone. * @param [radialSegments=8] — Number of segmented faces around the circumference of th...
Fix typo in ConeBufferGeometry (again)
Fix typo in ConeBufferGeometry (again)
TypeScript
mit
gero3/three.js,greggman/three.js,gero3/three.js,makc/three.js.fork,greggman/three.js,aardgoose/three.js,jpweeks/three.js,kaisalmen/three.js,mrdoob/three.js,06wj/three.js,fyoudine/three.js,WestLangley/three.js,fyoudine/three.js,Liuer/three.js,donmccurdy/three.js,makc/three.js.fork,looeee/three.js,Liuer/three.js,06wj/thr...
--- +++ @@ -5,7 +5,7 @@ /** * @param [radius=1] — Radius of the cone base. * @param [height=1] — Height of the cone. - * @param [radialSegment=8] — Number of segmented faces around the circumference of the cone. + * @param [radialSegments=8] — Number of segmented faces around the circumference of the cone. ...
9f5737eb931b4682b78a556231932ff6755f5141
js/src/common/resolvers/DefaultResolver.ts
js/src/common/resolvers/DefaultResolver.ts
import Mithril from 'mithril'; /** * Generates a route resolver for a given component. * In addition to regular route resolver functionality: * - It provide the current route name as an attr * - It sets a key on the component so a rerender will be triggered on route change. */ export default class DefaultResolver...
import Mithril from 'mithril'; /** * Generates a route resolver for a given component. * In addition to regular route resolver functionality: * - It provide the current route name as an attr * - It sets a key on the component so a rerender will be triggered on route change. */ export default class DefaultResolver...
Fix routeName attr not being passed into pages
Fix routeName attr not being passed into pages
TypeScript
mit
flarum/core,flarum/core,flarum/core
--- +++ @@ -24,11 +24,18 @@ return this.routeName + JSON.stringify(m.route.param()); } + makeAttrs(vnode) { + return { + ...vnode.attrs, + routeName: this.routeName, + }; + } + onmatch(args, requestedPath, route) { return this.component; } render(vnode) { - return [{ ......
68305b299db4201e10406d52e458621e64254bce
src/extension.ts
src/extension.ts
import * as vscode from 'vscode'; import * as client from './client'; export function activate(context: vscode.ExtensionContext) { context.subscriptions.push(client.launch(context)); } export function deactivate() { }
import * as vscode from 'vscode'; import * as client from './client'; export function activate(context: vscode.ExtensionContext) { context.subscriptions.push( vscode.languages.setLanguageConfiguration('reason', { indentationRules: { decreaseIndentPattern: /^(.*\*\/)?\s*\}.*$/, increaseInden...
Add more language config settings for indent, etc.
Add more language config settings for indent, etc.
TypeScript
apache-2.0
freebroccolo/vscode-reasonml,freebroccolo/vscode-reasonml
--- +++ @@ -2,6 +2,37 @@ import * as client from './client'; export function activate(context: vscode.ExtensionContext) { + context.subscriptions.push( + vscode.languages.setLanguageConfiguration('reason', { + indentationRules: { + decreaseIndentPattern: /^(.*\*\/)?\s*\}.*$/, + increaseInde...
fe996b6f28015c8e5e4de88efc349f79f14e8327
src/lib/Components/Gene/Biography.tsx
src/lib/Components/Gene/Biography.tsx
import * as React from "react" import * as Relay from "react-relay/classic" import * as removeMarkdown from "remove-markdown" import { Dimensions, StyleSheet, View, ViewProperties } from "react-native" import SerifText from "../Text/Serif" const sideMargin = Dimensions.get("window").width > 700 ? 50 : 0 interface P...
import * as React from "react" import * as Relay from "react-relay/classic" import removeMarkdown from "remove-markdown" import { Dimensions, StyleSheet, View, ViewProperties } from "react-native" import SerifText from "../Text/Serif" const sideMargin = Dimensions.get("window").width > 700 ? 50 : 0 interface Props ...
Fix default import of remove-markdown.
[Gene] Fix default import of remove-markdown.
TypeScript
mit
artsy/eigen,artsy/eigen,artsy/emission,artsy/emission,artsy/emission,artsy/emission,artsy/emission,artsy/emission,artsy/emission,artsy/eigen,artsy/eigen,artsy/eigen,artsy/eigen,artsy/eigen
--- +++ @@ -1,6 +1,6 @@ import * as React from "react" import * as Relay from "react-relay/classic" -import * as removeMarkdown from "remove-markdown" +import removeMarkdown from "remove-markdown" import { Dimensions, StyleSheet, View, ViewProperties } from "react-native"
56b7f01038040008ccc1355733d6f5bfac2f2f7e
packages/web-api/src/response/AdminEmojiListResponse.ts
packages/web-api/src/response/AdminEmojiListResponse.ts
/* eslint-disable */ ///////////////////////////////////////////////////////////////////////////////////////// // // // !!! DO NOT EDIT THIS FILE !!! // // ...
/* eslint-disable */ ///////////////////////////////////////////////////////////////////////////////////////// // // // !!! DO NOT EDIT THIS FILE !!! // // ...
Update the auto-generated web-api response types
Update the auto-generated web-api response types
TypeScript
mit
slackapi/node-slack-sdk,slackapi/node-slack-sdk,slackapi/node-slack-sdk,slackapi/node-slack-sdk
--- +++ @@ -11,21 +11,17 @@ import { WebAPICallResult } from '../WebClient'; export type AdminEmojiListResponse = WebAPICallResult & { ok?: boolean; - emoji?: AdminEmojiListResponseEmoji; + emoji?: { [key: string]: Emoji }; response_metadata?: ResponseMetadata; erro...
d5b2a77aa152e62156c31596d37de9af3ab37580
src/materials/MeshMatcapMaterial.d.ts
src/materials/MeshMatcapMaterial.d.ts
import { Color } from './../math/Color'; import { Texture } from './../textures/Texture'; import { Vector2 } from './../math/Vector2'; import { MaterialParameters, Material } from './Material'; import { NormalMapTypes } from '../constants'; export interface MeshMatcapMaterialParameters extends MaterialParameters { c...
import { Color } from './../math/Color'; import { Texture } from './../textures/Texture'; import { Vector2 } from './../math/Vector2'; import { MaterialParameters, Material } from './Material'; import { NormalMapTypes } from '../constants'; export interface MeshMatcapMaterialParameters extends MaterialParameters { c...
Fix matcap attribute of MeshMatcapMaterial
TS: Fix matcap attribute of MeshMatcapMaterial
TypeScript
mit
TristanVALCKE/three.js,stanford-gfx/three.js,WestLangley/three.js,06wj/three.js,WestLangley/three.js,looeee/three.js,QingchaoHu/three.js,SpinVR/three.js,mrdoob/three.js,jee7/three.js,sherousee/three.js,Samsy/three.js,fraguada/three.js,fyoudine/three.js,06wj/three.js,jee7/three.js,Itee/three.js,jpweeks/three.js,SpinVR/t...
--- +++ @@ -7,7 +7,7 @@ export interface MeshMatcapMaterialParameters extends MaterialParameters { color?: Color | string | number; - matMap?: Texture; + matcap?: Texture; map?: Texture; bumpMap?: Texture; bumpScale?: number; @@ -28,7 +28,7 @@ constructor( parameters?: MeshMatcapMaterialParameters ); ...
4611cf546fcf3401c017d9bb27d6952a32d012d0
src/app/inventory/store/item-index.ts
src/app/inventory/store/item-index.ts
import { DimItem } from '../item-types'; let _idTracker: { [id: string]: number } = {}; export function resetItemIndexGenerator() { _idTracker = {}; } /** Set an ID for the item that should be unique across all items */ export function createItemIndex(item: DimItem): string { // Try to make a unique, but stable ...
import { DimItem } from '../item-types'; let _idTracker: { [id: string]: number } = {}; export function resetItemIndexGenerator() { _idTracker = {}; } /** Set an ID for the item that should be unique across all items */ export function createItemIndex(item: DimItem): string { // Try to make a unique, but stable ...
Fix item index generation logic
Fix item index generation logic
TypeScript
mit
DestinyItemManager/DIM,DestinyItemManager/DIM,DestinyItemManager/DIM,DestinyItemManager/DIM
--- +++ @@ -9,12 +9,11 @@ /** Set an ID for the item that should be unique across all items */ export function createItemIndex(item: DimItem): string { // Try to make a unique, but stable ID. This isn't always possible, such as in the case of consumables. - let index = item.id; if (item.id === '0') { - _i...
0dd93322e88d0be0d9cda9fa1746a81b991c24c6
src/rules/eoflineRule.ts
src/rules/eoflineRule.ts
/* * Copyright 2013 Palantir Technologies, Inc. * * 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 l...
/* * Copyright 2013 Palantir Technologies, Inc. * * 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 l...
Allow eofline rule to have an empty file
Allow eofline rule to have an empty file
TypeScript
apache-2.0
pspeter3/tslint,RyanCavanaugh/tslint,andy-ms/tslint,Nemo157/tslint,vmmitev/tslint,lukeapage/tslint,Kuniwak/tslint,aciccarello/tslint,berickson1/tslint,Pajn/tslint,spirosikmd/tslint,spirosikmd/tslint,weswigham/tslint,Kuniwak/tslint,berickson1/tslint,prendradjaja/tslint,weswigham/tslint,s-panferov/tslint,ScottSWu/tslint,...
--- +++ @@ -18,6 +18,10 @@ public static FAILURE_STRING = "file should end with a newline"; public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { + if (sourceFile.text === "") { + // if the file is empty, it "ends with a newline", so don't return a failure + return [];...
0f99b872a2d0df6dccebad1de1434114ecd3ac57
app/src/components/core/metaschema/metaSchema.service.ts
app/src/components/core/metaschema/metaSchema.service.ts
module app.core.metaschema { import IHttpPromise = angular.IHttpPromise; import IPromise = angular.IPromise; import IQService = angular.IQService; import IDeferred = angular.IDeferred; import DataschemaService = app.core.dataschema.DataschemaService; export class MetaschemaService { s...
module app.core.metaschema { import IHttpPromise = angular.IHttpPromise; import IPromise = angular.IPromise; import IQService = angular.IQService; import IDeferred = angular.IDeferred; import DataschemaService = app.core.dataschema.DataschemaService; export class MetaschemaService { s...
Fix for the resource not loading on the Integration Server
Fix for the resource not loading on the Integration Server
TypeScript
mit
FelixThieleTUM/JsonFormsEditor,eclipsesource/JsonFormsEditor,eclipsesource/JsonFormsEditor,pancho111203/JsonFormsEditor,pancho111203/JsonFormsEditor,FelixThieleTUM/JsonFormsEditor,eclipsesource/JsonFormsEditor,FelixThieleTUM/JsonFormsEditor,FelixThieleTUM/JsonFormsEditor,eclipsesource/JsonFormsEditor,pancho111203/JsonF...
--- +++ @@ -15,7 +15,7 @@ constructor($http:ng.IHttpService, $q:IQService) { var deffered:IDeferred<Metaschema> = $q.defer(); - $http.get('/resource/metaschema.json').success((json:any):void => { + $http.get('resource/metaschema.json').success((json:any):void => { ...
09b55877abb6ed1a90e9918509d0b3e5ecf59c2f
test/core/logger.spec.ts
test/core/logger.spec.ts
import { logger, debugStream, winstonStream } from '../../src/core/logger'; describe('Core:Logger', () => { describe('debugStream', () => { it('Should has a write property', () => { expect(debugStream.stream.write).toBeDefined(); }); it('Should not throw any error if calling the...
import { Logger, debugStream, winstonStream } from '../../src/core/logger'; const log = Logger('test'); describe('Core:Logger', () => { describe('debugStream', () => { it('Should has a write property', () => { expect(debugStream.stream.write).toBeDefined(); }); it('Should not t...
Update tests for the new logger functions
test(core): Update tests for the new logger functions
TypeScript
mit
w3tecch/express-graphql-typescript-boilerplate,w3tecch/node-ts-boilerplate,w3tecch/node-ts-boilerplate,w3tecch/express-graphql-typescript-boilerplate
--- +++ @@ -1,4 +1,6 @@ -import { logger, debugStream, winstonStream } from '../../src/core/logger'; +import { Logger, debugStream, winstonStream } from '../../src/core/logger'; + +const log = Logger('test'); describe('Core:Logger', () => { describe('debugStream', () => { @@ -17,21 +19,21 @@ expe...
ad0dc287acc700e2eddd16b42139c131475835b5
src/packages/database/pool/pool.ts
src/packages/database/pool/pool.ts
/* * This file is part of CoCalc: Copyright © 2021 Sagemath, Inc. * License: AGPLv3 s.t. "Commons Clause" – see LICENSE.md for details */ import { pghost as host, pguser as user, pgdatabase as database, } from "@cocalc/backend/data"; import dbPassword from "./password"; export * from "./util"; import /*getC...
/* * This file is part of CoCalc: Copyright © 2021 Sagemath, Inc. * License: AGPLv3 s.t. "Commons Clause" – see LICENSE.md for details */ import { pghost as host, pguser as user, pgdatabase as database, } from "@cocalc/backend/data"; import dbPassword from "./password"; export * from "./util"; import getCac...
Revert "temporarily disable certain database caching used by next app"
Revert "temporarily disable certain database caching used by next app" This reverts commit dfe98248abcc04413e3d2ab1e2c662f35c6a4bba.
TypeScript
agpl-3.0
sagemathinc/smc,sagemathinc/smc,sagemathinc/smc,sagemathinc/smc
--- +++ @@ -10,17 +10,15 @@ } from "@cocalc/backend/data"; import dbPassword from "./password"; export * from "./util"; -import /*getCachedPool, */{ Length } from "./cached"; +import getCachedPool, { Length } from "./cached"; import { Pool } from "pg"; let pool: Pool | undefined = undefined; export default ...
d24c0b40961b585800b499edd0748fea27ae3f99
packages/backend-api/src/processing/index.ts
packages/backend-api/src/processing/index.ts
/* Copyright 2017 Google Inc. 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 writing, software dis...
/* Copyright 2017 Google Inc. 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 writing, software dis...
Fix build breakage on demo server.
backend: Fix build breakage on demo server.
TypeScript
apache-2.0
conversationai/conversationai-moderator,conversationai/conversationai-moderator,conversationai/conversationai-moderator,conversationai/conversationai-moderator
--- +++ @@ -14,7 +14,7 @@ limitations under the License. */ -import { USER_GROUP_YOUTUBE } from '@conversationai/moderator-backend-core/src'; +import { USER_GROUP_YOUTUBE } from '@conversationai/moderator-backend-core'; import { youtubeHooks } from '../integrations/youtube/hooks'; import { registerHooks } fro...
d7e60a2185259a6d46d2e9f055b8909d1ba52e26
src/app/components/login/login.component.ts
src/app/components/login/login.component.ts
import {Component, OnInit} from '@angular/core'; import {AwsService} from '../../services/aws-service'; import {ActivatedRoute, Router} from '@angular/router'; @Component({ selector: 'app-login', templateUrl: './login.component.html', styleUrls: ['./login.component.css'] }) export class LoginComponent impl...
import {Component, OnInit} from '@angular/core'; import {AwsService} from '../../services/aws-service'; import {ActivatedRoute, Router} from '@angular/router'; @Component({ selector: 'app-login', templateUrl: './login.component.html', styleUrls: ['./login.component.css'] }) export class LoginComponent impl...
Fix bug that failure loading a report when login via redirect url which includes aws configurations
:skull: Fix bug that failure loading a report when login via redirect url which includes aws configurations
TypeScript
mit
tadashi-aikawa/gemini-viewer,tadashi-aikawa/gemini-viewer,tadashi-aikawa/gemini-viewer
--- +++ @@ -33,7 +33,7 @@ this.awsService.login(this.accessKeyId, this.secretAccessKey, this.useLocalStack, this.localStackEndpoint) .then(() => { this.authenticating = false; - this.router.navigate([this.returnUrl]) + this.router.navigateByUrl(this...
df8b784158b0564e0ed24686cda9bfb7bac87215
components/table/FilterDropdownMenuWrapper.tsx
components/table/FilterDropdownMenuWrapper.tsx
import * as React from 'react'; export interface FilterDropdownMenuWrapperProps { onClick?: React.MouseEventHandler<any>; children?: any; className?: string; } export default (props: FilterDropdownMenuWrapperProps) => ( <div className={props.className} onClick={props.onClick}> {props.children} </div> );...
import * as React from 'react'; export interface FilterDropdownMenuWrapperProps { children?: any; className?: string; } export default (props: FilterDropdownMenuWrapperProps) => ( <div className={props.className} onClick={e => e.stopPropagation()}> {props.children} </div> );
Fix Table filters trigger sort
:bug: Fix Table filters trigger sort close #13891 close #13933 close #13790
TypeScript
mit
zheeeng/ant-design,elevensky/ant-design,elevensky/ant-design,icaife/ant-design,icaife/ant-design,elevensky/ant-design,icaife/ant-design,elevensky/ant-design,ant-design/ant-design,ant-design/ant-design,icaife/ant-design,ant-design/ant-design,zheeeng/ant-design,ant-design/ant-design,zheeeng/ant-design,zheeeng/ant-design
--- +++ @@ -1,13 +1,12 @@ import * as React from 'react'; export interface FilterDropdownMenuWrapperProps { - onClick?: React.MouseEventHandler<any>; children?: any; className?: string; } export default (props: FilterDropdownMenuWrapperProps) => ( - <div className={props.className} onClick={props.onCl...
fe02c75338a51bf7961075c6776e3e29683b9358
tools/env/prod.ts
tools/env/prod.ts
import {EnvConfig} from './env-config.interface'; const ProdConfig: EnvConfig = { ENV: 'PROD', API: 'https://d4el2racxe.execute-api.us-east-1.amazonaws.com/mock', AWS_REGION: 'us-east-1', COGNITO_USERPOOL: 'us-east-1_0UqEwkU0H', COGNITO_IDENTITYPOOL: 'us-east-1:38c1785e-4101-4eb4-b489-6fe8608406d0', COGNIT...
import {EnvConfig} from './env-config.interface'; const ProdConfig: EnvConfig = { ENV: 'PROD', API: 'https://d4el2racxe.execute-api.us-east-1.amazonaws.com/mock', AWS_REGION: 'us-east-1', COGNITO_USERPOOL: 'us-east-1_0UqEwkU0H', COGNITO_IDENTITYPOOL: 'us-east-1:38c1785e-4101-4eb4-b489-6fe8608406d0', COGNIT...
Update the Cognito App ID for Prod Config
Update the Cognito App ID for Prod Config
TypeScript
mit
formigio/angular-frontend,formigio/angular-frontend,formigio/angular-frontend
--- +++ @@ -6,7 +6,7 @@ AWS_REGION: 'us-east-1', COGNITO_USERPOOL: 'us-east-1_0UqEwkU0H', COGNITO_IDENTITYPOOL: 'us-east-1:38c1785e-4101-4eb4-b489-6fe8608406d0', - COGNITO_CLIENT_ID: '3mj2tpe89ihqo412m9ckml6jk' + COGNITO_CLIENT_ID: '1nupbfn12bgmra4ueie0dqagnv' }; export = ProdConfig;
983bbfb026a1eb56362fadf6a60a19815bdc22ff
spec/viewer/LoadingService.spec.ts
spec/viewer/LoadingService.spec.ts
/// <reference path="../../typings/browser.d.ts" /> import {LoadingService} from "../../src/Viewer"; describe("LoadingService", () => { var loadingService: LoadingService; beforeEach(() => { loadingService = new LoadingService(); }); it("should emit loading status", (done) => { loadi...
/// <reference path="../../typings/browser.d.ts" /> import {LoadingService} from "../../src/Viewer"; describe("LoadingService", () => { var loadingService: LoadingService; beforeEach(() => { loadingService = new LoadingService(); }); it("should be initialized to not loading", (done) => { ...
Remove timing based loading service test.
Remove timing based loading service test.
TypeScript
mit
mapillary/mapillary-js,mapillary/mapillary-js
--- +++ @@ -9,23 +9,11 @@ loadingService = new LoadingService(); }); - it("should emit loading status", (done) => { - loadingService.loading$.subscribe((loading: boolean) => { - expect(loading).toBe(false); - done(); - }); - - loadingService.startLoading("...
f986d6129c8c50b193aacf9a23de1f11be40bb34
src/app/core/models/run-record.model.ts
src/app/core/models/run-record.model.ts
import { RunDuration } from '../run-duration'; import { MongooseRunStatus } from '../mongoose-run-status'; export interface MongooseRunRecord { status: MongooseRunStatus; startTime: String; Nodes: String[]; Duration: RunDuration; comment: String; }
import { RunDuration } from '../run-duration'; import { MongooseRunStatus } from '../mongoose-run-status'; export class MongooseRunRecord { constructor(status: MongooseRunStatus, startTime: String, Nodes: String[], duration: RunDuration, comment: String) { } }
Replace type of MongooseRunRecord from interface to class.
Replace type of MongooseRunRecord from interface to class.
TypeScript
mit
emc-mongoose/console,emc-mongoose/console,emc-mongoose/console
--- +++ @@ -1,10 +1,8 @@ import { RunDuration } from '../run-duration'; import { MongooseRunStatus } from '../mongoose-run-status'; -export interface MongooseRunRecord { - status: MongooseRunStatus; - startTime: String; - Nodes: String[]; - Duration: RunDuration; - comment: String; +export clas...
516c18cc093535ddf354ee638c91a9ecab0d5342
src/browser/components/error/servererror.tsx
src/browser/components/error/servererror.tsx
// Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. import * as React from 'react'; let shell: Electron.Shell = (window as any).require('electron').remote.shell; export namespace ServerError { export interface Props { launchFromPath: () => void; ...
// Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. import * as React from 'react'; let shell: Electron.Shell = (window as any).require('electron').remote.shell; export namespace ServerError { export interface Props { launchFromPath: () => void; ...
Add note about Jupyter notebook version
Add note about Jupyter notebook version
TypeScript
bsd-3-clause
nproctor/jupyterlab_app,nproctor/jupyterlab_app,nproctor/jupyterlab_app
--- +++ @@ -20,7 +20,7 @@ <div className='jpe-ServerError-content'> <div className='jpe-ServerError-icon'></div> <h1 className='jpe-ServerError-header'>Jupyter Server Not Found</h1> - <p className='jpe-ServerError-subhead'>We were unable to launch a Jupyte...
6667189339b084d7f49b743a020dba701702c1d0
JSlider.ts
JSlider.ts
/** * Created by sigurdbergsvela on 15.01.14. */ ///<reference path="defs/jquery.d.ts"/> class JSlider { private _options = { }; private sliderWrapper : JQuery; private slidesWrapper : JQuery; private slides : JQuery; /** * Creates a new slider out of an HTMLElement * * The htmlElement is expected...
/** * Created by sigurdbergsvela on 15.01.14. */ ///<reference path="defs/jquery.d.ts"/> class JSlider { private _options = { }; private sliderWrapper : JQuery; private slidesWrapper : JQuery; private slides : JQuery; /** * Creates a new slider out of an HTMLElement * * The htmlElement is expected...
Fix default for 'delay' option
Fix default for 'delay' option
TypeScript
lgpl-2.1
sigurdsvela/JSlider
--- +++ @@ -31,7 +31,7 @@ * .delay : How long between each slide, -1 for no automated sliding */ constructor(sliderWrapper : HTMLDivElement, options : Object = {}) { - this._options = options['delay'] || 100; + this._options['delay'] = options['delay'] || 100; this.sliderWrapper = jQuery(sliderWrappe...
aa986c84d5053d6f9d0883c00a66dcfe2b82024c
src/app/app-nav-views.ts
src/app/app-nav-views.ts
export const views: Object[] = [ { name: 'Dashboard', icon: 'home', link: [''] }, { name: 'Lazy', icon: 'file_download', link: ['lazy'] }, { name: 'Sync', icon: 'done', link: ['sync'] }, { name: 'Bad Link', icon: 'error', link: ['wronglink'] } ];
export const views: Object[] = [ { name: 'Dashboard', icon: 'home', link: [''] }, { name: 'Sme UP', icon: 'home', link: ['smeup'] }, { name: 'Lazy', icon: 'file_download', link: ['lazy'] }, { name: 'Sync', icon: 'done', link: ['sync'] }, { name: 'B...
Add Sme UP to views
Add Sme UP to views
TypeScript
mit
fioletti-smeup/ng-smeup,fioletti-smeup/ng-smeup,fioletti-smeup/ng-smeup
--- +++ @@ -3,6 +3,11 @@ name: 'Dashboard', icon: 'home', link: [''] + }, + { + name: 'Sme UP', + icon: 'home', + link: ['smeup'] }, { name: 'Lazy',
544fdf23bf013ef7202b085a9796a1fbd9523b0e
typescript/tssearch/src/searchoption.ts
typescript/tssearch/src/searchoption.ts
/* * searchoption.js * * encapsulates a search option */ "use strict"; interface SettingsFunc { (): void; } export class SearchOption { shortarg: string; longarg: string; desc: string; func: SettingsFunc; public sortarg: string; constructor(shortarg: string, longarg: string, desc: st...
/* * searchoption.js * * encapsulates a search option */ "use strict"; export class SearchOption { shortarg: string; longarg: string; desc: string; public sortarg: string; constructor(shortarg: string, longarg: string, desc: string) { this.shortarg = shortarg; this.longarg = l...
Remove func property from SearchOption
Remove func property from SearchOption
TypeScript
mit
clarkcb/xsearch,clarkcb/xsearch,clarkcb/xsearch,clarkcb/xsearch,clarkcb/xsearch,clarkcb/xsearch,clarkcb/xsearch,clarkcb/xsearch,clarkcb/xsearch,clarkcb/xsearch,clarkcb/xsearch,clarkcb/xsearch,clarkcb/xsearch,clarkcb/xsearch,clarkcb/xsearch,clarkcb/xsearch
--- +++ @@ -6,22 +6,16 @@ "use strict"; -interface SettingsFunc { - (): void; -} - export class SearchOption { shortarg: string; longarg: string; desc: string; - func: SettingsFunc; public sortarg: string; - constructor(shortarg: string, longarg: string, desc: string, func: Settin...
b0648fff1eac4b470f077b13738a6a84618f4a2e
app/src/ui/clone-repository/github-clone.tsx
app/src/ui/clone-repository/github-clone.tsx
import * as React from 'react' import { getDefaultDir } from '../lib/default-dir' import { DialogContent } from '../dialog' import { TextBox } from '../lib/text-box' import { Row } from '../lib/row' import { Button } from '../lib/button' interface ICloneGithubRepositoryProps { // readonly onError: (error: Error | nu...
Add component for cloning GitHub repos
Add component for cloning GitHub repos
TypeScript
mit
say25/desktop,desktop/desktop,shiftkey/desktop,shiftkey/desktop,shiftkey/desktop,gengjiawen/desktop,hjobrien/desktop,kactus-io/kactus,gengjiawen/desktop,say25/desktop,j-f1/forked-desktop,j-f1/forked-desktop,hjobrien/desktop,kactus-io/kactus,artivilla/desktop,kactus-io/kactus,say25/desktop,artivilla/desktop,desktop/desk...
--- +++ @@ -0,0 +1,72 @@ +import * as React from 'react' +import { getDefaultDir } from '../lib/default-dir' +import { DialogContent } from '../dialog' +import { TextBox } from '../lib/text-box' +import { Row } from '../lib/row' +import { Button } from '../lib/button' + +interface ICloneGithubRepositoryProps { + // ...
47c4e867f0f3c1a56a2e8ff92c77dd65c9f15609
src/components/todo.ts
src/components/todo.ts
import Component from 'inferno-component' import h from 'inferno-hyperscript' interface Props { title: string, completed: boolean, toggle(), remove() } interface State {} export default class Todo extends Component<Props, State> { render() { return h('div', [ h('input', { type: 'checkbox'...
import Component from 'inferno-component' import h from 'inferno-hyperscript' interface Props { title: string, completed: boolean, toggle: () => void, remove: () => void } interface State {} export default class Todo extends Component<Props, State> { render() { return h('div', [ h('input', { ...
Tweak Todo Component Props type
Tweak Todo Component Props type
TypeScript
mit
y0za/typescript-inferno-todo,y0za/typescript-inferno-todo,y0za/typescript-inferno-todo
--- +++ @@ -4,8 +4,8 @@ interface Props { title: string, completed: boolean, - toggle(), - remove() + toggle: () => void, + remove: () => void } interface State {}
a8c6fb992c909a634afb1dd688efcf1bd19b4acc
src/view.ts
src/view.ts
import {StatusBarItem} from 'vscode'; export interface IView { /** * Refresh the view. */ refresh(text: string): void; } export class StatusBarView implements IView { private _statusBarItem: StatusBarItem; constructor(statusBarItem: StatusBarItem) { this._statusBarI...
import {StatusBarItem} from 'vscode'; export interface IView { /** * Refresh the view. */ refresh(text: string): void; } export class StatusBarView implements IView { private _statusBarItem: StatusBarItem; constructor(statusBarItem: StatusBarItem) { this._statusBarI...
Make the blame informations popup when clicking on statusBar.
Make the blame informations popup when clicking on statusBar.
TypeScript
mit
waderyan/vscode-gitblame
--- +++ @@ -16,6 +16,7 @@ constructor(statusBarItem: StatusBarItem) { this._statusBarItem = statusBarItem; + this._statusBarItem.command = "extension.blame" }; refresh(text: string) {
1ee647e63243ce4076ab43b5a42f1f2548e5d7db
src/images/actions.tsx
src/images/actions.tsx
import * as Axios from "axios"; import { Thunk } from "../redux/interfaces"; import { Point } from "../farm_designer/interfaces"; import { API } from "../api"; import { success } from "../ui"; const QUERY = { meta: { created_by: "plant-detection" } }; const URL = API.current.pointSearchPath; export function resetWeed...
import * as Axios from "axios"; import { Thunk } from "../redux/interfaces"; import { Point } from "../farm_designer/interfaces"; import { API } from "../api"; import { success, error } from "../ui"; import { t } from "i18next"; const QUERY = { meta: { created_by: "plant-detection" } }; const URL = API.current.pointS...
Break weed deletion into chunks of 300 to prevent long URLs
Break weed deletion into chunks of 300 to prevent long URLs
TypeScript
mit
RickCarlino/farmbot-web-frontend,FarmBot/farmbot-web-frontend,MrChristofferson/farmbot-web-frontend,FarmBot/farmbot-web-frontend,RickCarlino/farmbot-web-frontend,MrChristofferson/farmbot-web-frontend
--- +++ @@ -2,28 +2,36 @@ import { Thunk } from "../redux/interfaces"; import { Point } from "../farm_designer/interfaces"; import { API } from "../api"; -import { success } from "../ui"; +import { success, error } from "../ui"; +import { t } from "i18next"; const QUERY = { meta: { created_by: "plant-detectio...
d186d8e843ef8c78129edce389e6b2fb8d6d9c80
angular/src/account/account.component.ts
angular/src/account/account.component.ts
import { Component, ViewContainerRef, OnInit, ViewEncapsulation, Injector } from '@angular/core'; import { LoginService } from './login/login.service'; import { AppComponentBase } from '@shared/app-component-base'; @Component({ templateUrl: './account.component.html', styleUrls: [ './account.component....
import { Component, ViewContainerRef, OnInit, ViewEncapsulation, Injector } from '@angular/core'; import { LoginService } from './login/login.service'; import { AppComponentBase } from '@shared/app-component-base'; @Component({ templateUrl: './account.component.html', styleUrls: [ './account.component....
Add a class instead of override the whole attribute
Add a class instead of override the whole attribute
TypeScript
mit
aspnetboilerplate/module-zero-core-template,aspnetboilerplate/module-zero-core-template,aspnetboilerplate/module-zero-core-template,aspnetboilerplate/module-zero-core-template,aspnetboilerplate/module-zero-core-template
--- +++ @@ -31,6 +31,6 @@ } ngOnInit(): void { - $('body').attr('class', 'login-page'); + $('body').addClass('login-page'); } }
a4bacb926537a8b9edc576eda9678122f9858d20
src/index.ts
src/index.ts
/// <reference path="./asana.d.ts" /> import Asana = require("asana"); export function getAsanaClient(): Asana.Client { return Asana.Client.create(); }
/// <reference path="./asana.d.ts" /> import Asana = require("asana"); /** * Example function that uses the asana npm package (for testing gulp). * TODO: Delete once I start implementing the tester. * * @returns {Asana.Client} */ export function getAsanaClient(): Asana.Client { return Asana.Client.create(); }...
Add comment to test function
Add comment to test function
TypeScript
mit
Asana/api-explorer,Asana/api-explorer
--- +++ @@ -1,6 +1,12 @@ /// <reference path="./asana.d.ts" /> import Asana = require("asana"); +/** + * Example function that uses the asana npm package (for testing gulp). + * TODO: Delete once I start implementing the tester. + * + * @returns {Asana.Client} + */ export function getAsanaClient(): Asana.Client ...
f84eaa861e55b5e258016c9c88e2b7bd2c03ec25
src/lazy-views/loading.tsx
src/lazy-views/loading.tsx
import * as React from 'react' import {Spinner} from '../material/spinner' import style from './loading.css' export function Loading() { return ( <div className={style.container}> <Spinner /> </div> ) }
import * as React from 'react' import {LoadingComponentProps} from 'react-loadable' import {Spinner} from '../material/spinner' import style from './loading.css' import {Ouch} from '../error-boundary/ouch' export function Loading({error, pastDelay}: LoadingComponentProps) { if (error) { return <Ouch error="Faile...
Fix improper use of react-loadable component
Fix improper use of react-loadable component
TypeScript
mit
Holi0317/bridge-calc,Holi0317/bridge-calc,Holi0317/bridge-calc
--- +++ @@ -1,11 +1,19 @@ import * as React from 'react' +import {LoadingComponentProps} from 'react-loadable' import {Spinner} from '../material/spinner' import style from './loading.css' +import {Ouch} from '../error-boundary/ouch' -export function Loading() { - return ( - <div className={style.container}>...
6c01fb92c84f2558bb4cc70207d1918a79a5634d
src/app/classes/string/string-helper.spec.ts
src/app/classes/string/string-helper.spec.ts
import { Whitespace } from '../whitespace/whitespace'; export class StringHelper { readonly whitespace = new Whitespace(); /** * Assert supplied strings are equal. Shows line by line difference */ assertEquals(one: string, other: string): void { const oneLines = this.lines(one); ...
import { Whitespace } from '../whitespace/whitespace'; export class StringHelper { readonly whitespace = new Whitespace(); /** * Assert supplied strings are equal. Shows line by line difference */ assertEquals(one: string, other: string): void { const oneLines = this.lines(one); ...
Add line numbers to string helper output
Add line numbers to string helper output
TypeScript
mit
bvkatwijk/code-tools,bvkatwijk/code-tools,bvkatwijk/code-tools
--- +++ @@ -13,7 +13,7 @@ expect(oneLines.length).toEqual(otherLines.length); for (let i = 0; i < oneLines.length; i++) { - expect(this.whitespace.show(oneLines[i])).toEqual(this.whitespace.show(otherLines[i])); + expect('[line ' + i + ']' + this.whitespace.show(oneLines[i]))...
f48a6085733d23eaf0933126a1ace928af007ae7
src/App.test.tsx
src/App.test.tsx
import { createRoot } from 'react-dom/client' import { App } from './App' describe('App', () => { test('renders', () => { const container = document.createElement('div') const root = createRoot(container) root.render(<App />) root.unmount() container.remove() }) })
import { render, screen } from '@testing-library/react' import { App } from './App' const renderApp = () => render(<App />) describe('App', () => { test('renders a link to the repository', () => { renderApp() const link: HTMLAnchorElement = screen.getByRole('link', { name: 'Go to GitHub repository p...
Test for presence of repository link
Test for presence of repository link
TypeScript
mit
joelgeorgev/react-checkbox-tree,joelgeorgev/react-checkbox-tree
--- +++ @@ -1,15 +1,20 @@ -import { createRoot } from 'react-dom/client' +import { render, screen } from '@testing-library/react' import { App } from './App' +const renderApp = () => render(<App />) + describe('App', () => { - test('renders', () => { - const container = document.createElement('div') - co...
40cd722eaf97da5b8e45381269c7504ad9f37fe7
packages/common/exceptions/http.exception.ts
packages/common/exceptions/http.exception.ts
export class HttpException extends Error { public readonly message: any; /** * Base Nest application exception, which is handled by the default Exceptions Handler. * If you throw an exception from your HTTP route handlers, Nest will map them to the appropriate HTTP response and send to the client. * * ...
export class HttpException extends Error { public readonly message: any; /** * Base Nest application exception, which is handled by the default Exceptions Handler. * If you throw an exception from your HTTP route handlers, Nest will map them to the appropriate HTTP response and send to the client. * * ...
Change name to not collide with duplicate definition in RpcException
Change name to not collide with duplicate definition in RpcException
TypeScript
mit
kamilmysliwiec/nest,kamilmysliwiec/nest
--- +++ @@ -31,7 +31,7 @@ return this.status; } - private getError(target) { + private getErrorString(target) { if(typeof target === 'string') { return target; } @@ -40,7 +40,7 @@ } public toString(): string { - const message = this.getError(this.message); + const message = ...
bf319915d4f78dc5a9f526bf37a0ee8875260bcb
src/cli/index.ts
src/cli/index.ts
import sade from 'sade'; import * as pkg from '../../package.json'; const prog = sade('svelte').version(pkg.version); prog .command('compile <input>') .option('-o, --output', 'Output (if absent, prints to stdout)') .option('-f, --format', 'Type of output (amd, cjs, es, iife, umd)') .option('-g, --globals', 'Comm...
import sade from 'sade'; import * as pkg from '../../package.json'; const prog = sade('svelte').version(pkg.version); prog .command('compile <input>') .option('-o, --output', 'Output (if absent, prints to stdout)') .option('-f, --format', 'Type of output (amd, cjs, es, iife, umd)') .option('-g, --globals', 'Comm...
Update cli spec to include --customElement option
Update cli spec to include --customElement option
TypeScript
mit
sveltejs/svelte,sveltejs/svelte
--- +++ @@ -17,6 +17,7 @@ .option('--no-css', `Don't include CSS (useful with SSR)`) .option('--immutable', 'Support immutable data structures') .option('--shared', 'Don\'t include shared helpers') + .option('--customElement', 'Generate a custom element') .example('compile App.html > App.js') .example('co...
8c6e6416d44bf72421eacd1293f8eed78f805c23
client-ts/slime.ts
client-ts/slime.ts
import games from "../generated-ts/games"; import AutoPeer from "./AutoPeer"; import { Applet } from "./AppletShims"; window.onload = () => { const autoPeer = AutoPeer.Create("vxv7ldsv1h71ra4i"); const connect = document.getElementById("connect") as HTMLButtonElement; const gamesEl = document.getElementBy...
import games from "../generated-ts/games"; import AutoPeer from "./AutoPeer"; import { Applet } from "./AppletShims"; window.onload = () => { const autoPeer = AutoPeer.Create("vxv7ldsv1h71ra4i"); const connect = document.getElementById("connect") as HTMLButtonElement; const gamesEl = document.getElementBy...
Update document title when game starts.
Update document title when game starts.
TypeScript
mit
mmkal/slimejs,mmkal/slimejs,mmkal/slimejs,mmkal/slimejs
--- +++ @@ -32,5 +32,6 @@ autoPeer.connect(game); }; game.start(); + document.title = name; } };
8353347b054c2b4c8df0af3f1ff8638869724d85
test/rollup/rollup.test.ts
test/rollup/rollup.test.ts
import test from "ava" import execa from "execa" import * as path from "path" import { rollup } from "rollup" import config from "./rollup.config" test("can be bundled using rollup", async t => { const [appBundle, workerBundle] = await Promise.all([ rollup({ input: path.resolve(__dirname, "app.js"), ...
import test from "ava" import execa from "execa" import * as path from "path" import { rollup } from "rollup" import config from "./rollup.config" test("can be bundled using rollup", async t => { const [appBundle, workerBundle] = await Promise.all([ rollup({ input: path.resolve(__dirname, "app.js"), ...
Add quick-fix for windows CI issue
Add quick-fix for windows CI issue
TypeScript
mit
andywer/threads.js,andywer/threads.js,andywer/thread.js
--- +++ @@ -27,6 +27,11 @@ }) ]) + if (process.platform === "win32") { + // Quick-fix for weird Windows issue in CI + return t.pass() + } + const result = await execa.command("puppet-run --serve ./dist/worker.js:/worker.js ./dist/app.js", { cwd: __dirname, stderr: process.stderr
76df38c6df3bc93bec180507ffa89ec090f734f7
src/context.ts
src/context.ts
import {run} from "enonic-fp/context"; import {chain, IOEither} from "fp-ts/IOEither"; import {RunContext} from "enonic-types/context"; export function chainRun(runContext: RunContext) : <E, A, B>(f: (a: A) => IOEither<E, B>) => (ma: IOEither<E, A>) => IOEither<E, B> { return <E, A, B>(f: (a: A) => IOEither<E, B>...
import {run} from "enonic-fp/context"; import {chain, IOEither} from "fp-ts/IOEither"; import {RunContext} from "enonic-types/context"; export function chainRun(runContext: RunContext) : <E, A, B>(f: (a: A) => IOEither<E, B>) => (ma: IOEither<E, A>) => IOEither<E, B> { return <E, A, B>(f: (a: A) => IOEither<E, B>...
Add more generics for Context.chainRun
Add more generics for Context.chainRun
TypeScript
mit
ItemConsulting/wizardry
--- +++ @@ -5,7 +5,7 @@ export function chainRun(runContext: RunContext) : <E, A, B>(f: (a: A) => IOEither<E, B>) => (ma: IOEither<E, A>) => IOEither<E, B> { - return <E, A, B>(f: (a: A) => IOEither<E, B>) => chain((a: A) => run(runContext)(f(a))) + return <E, A, B>(f: (a: A) => IOEither<E, B>) => chain<E, A,...
9552c9fd5b61b7bdda0dfd1a05e56c16b6669924
src/components/index.ts
src/components/index.ts
import { Stream } from 'xstream'; import { DOMSource } from '@cycle/dom/xstream-typings'; import { VNode } from '@cycle/dom'; import { Style } from './../styles'; export interface UIComponent { (sources: UIComponentSources): UIComponentSinks; } export interface UIComponentSources { dom: DOMSource; style$: Strea...
import { Stream } from 'xstream'; import { DOMSource } from '@cycle/dom/xstream-typings'; import { VNode } from '@cycle/dom'; import { Style } from './../styles'; export interface UIComponent { (sources: UIComponentSources): UIComponentSinks; } export interface UIComponentSources { dom: DOMSource; style$?: Stre...
Make style$ and class$ of UIComponent optional
Make style$ and class$ of UIComponent optional
TypeScript
mit
cyclic-ui/cyclic-ui,cyclic-ui/cyclic-ui
--- +++ @@ -9,8 +9,8 @@ export interface UIComponentSources { dom: DOMSource; - style$: Stream<Style>; - classes$: Stream<string>; + style$?: Stream<Style>; + classes$?: Stream<string>; } export interface UIComponentSinks {
108cdf149865d45656fed156cf3049b02b030341
src/Styleguide/Components/MarketInsights.tsx
src/Styleguide/Components/MarketInsights.tsx
import React from "react" import { Responsive } from "../Utils/Responsive" import { Box, BorderBox } from "../Elements/Box" import { Flex } from "../Elements/Flex" import { Sans } from "@artsy/palette" const wrapper = xs => props => xs ? <Flex flexDirection="column" mb={3} {...props} /> : <Box {...props} /> export ...
import React from "react" import { Responsive } from "../Utils/Responsive" import { Box, BorderBox } from "../Elements/Box" import { Flex } from "../Elements/Flex" import { Sans } from "@artsy/palette" const wrapper = xs => props => xs ? <Flex flexDirection="column" mb={3} {...props} /> : <Box {...props} /> export ...
Add key for iterated elements
Add key for iterated elements
TypeScript
mit
xtina-starr/reaction,xtina-starr/reaction,artsy/reaction,xtina-starr/reaction,artsy/reaction-force,artsy/reaction,artsy/reaction,xtina-starr/reaction,artsy/reaction-force
--- +++ @@ -25,7 +25,7 @@ const TextWrap = wrapper(xs) return this.props.insights.map(insight => { return ( - <TextWrap> + <TextWrap key={insight.primaryLabel}> <Sans size="2" weight="medium" display="inline" mr={3}> ...
710179823c3c2056dd80e2c9cf610607c2acfeff
src/helpers/regex.ts
src/helpers/regex.ts
import escapeStringRegexp = require('escape-string-regexp'); import { Command } from '../chat-service/command'; export function createCommandRegex(commands: string[], rootCommand = false): RegExp { let beginning = ''; let end = ''; if (rootCommand) { beginning = '^'; end = '$'; } ...
import escapeStringRegexp = require('escape-string-regexp'); import { Command } from '../chat-service/command'; export function createCommandRegex(commands: string[], rootCommand = false): RegExp { const beginning = rootCommand ? '^' : ''; const end = rootCommand ? '$' : ''; return new RegExp(`${beginnin...
Use shorthand expression for variable assignment in createCommandRegex
Use shorthand expression for variable assignment in createCommandRegex
TypeScript
mit
Ionaru/MarketBot
--- +++ @@ -3,12 +3,8 @@ import { Command } from '../chat-service/command'; export function createCommandRegex(commands: string[], rootCommand = false): RegExp { - let beginning = ''; - let end = ''; - if (rootCommand) { - beginning = '^'; - end = '$'; - } + const beginning = rootComm...
327b16ac2e038892a1bc1fa4ecf619f0f69f77d0
src/utils/Generic.ts
src/utils/Generic.ts
/** * Copyright (c) 2016 The xterm.js authors. All rights reserved. * @license MIT */ /** * Return if the given array contains the given element * @param {Array} array The array to search for the given element. * @param {Object} el The element to look for into the array */ export function contains(arr: any[], e...
/** * Copyright (c) 2016 The xterm.js authors. All rights reserved. * @license MIT */ /** * Return if the given array contains the given element * @param {Array} array The array to search for the given element. * @param {Object} el The element to look for into the array */ export function contains(arr: any[], e...
Add repeat polyfill for repeating a string
Add repeat polyfill for repeating a string
TypeScript
mit
sourcelair/xterm.js,akalipetis/xterm.js,xtermjs/xterm.js,xtermjs/xterm.js,Tyriar/xterm.js,sourcelair/xterm.js,Tyriar/xterm.js,Tyriar/xterm.js,sourcelair/xterm.js,akalipetis/xterm.js,xtermjs/xterm.js,akalipetis/xterm.js,sourcelair/xterm.js,xtermjs/xterm.js,xtermjs/xterm.js,akalipetis/xterm.js,Tyriar/xterm.js,Tyriar/xter...
--- +++ @@ -11,3 +11,31 @@ export function contains(arr: any[], el: any): boolean { return arr.indexOf(el) >= 0; } + +/** + * Returns a string repeated a given number of times + * Polyfill from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat + * @param {Number} coun...