messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { isDevMode, Injectable } from \"@angular/core\";\nimport { Http, Response } from \"@angular/http\";\nimport { Observable } from \"rxjs/Observable\";\nimport \"rxjs/add/operator/catch\";\nimport \"rxjs/add/operator/map\";\nimport... | typescript | edit | 0 | 3 | mit | 41899cb7fdfc9e87fa4d2773f106f84c2c3dceb2 | gbrlsnchs/angry-log | src/lib/angry-log.service.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/// <reference path=\"./node_modules/ng1-template-gulp/typings/gulp.config.d.ts\"/>\n\n'use strict';\n\nlet utils: IUtils = require('ng1-template-gulp').utils;\n\nmodule.exports = function(config: IConfig) {\n /**\n * Create all ... | typescript | edit | 0 | 1 | apache-2.0 | 8fa165917d76d839e0cffd537eea70cd239a71f7 | angular-template/ng1-template,angular-template/ng1-template,angular-template/ng1-template,angular-template/ng1-template | gulp.config.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { git } from './core'\nimport { Repository } from '../../models/repository'\n\nexport async function getChangedPathsInIndex(repository: Repository): Promise<string[]> {\n const result = await git([ 'diff-index', '--cached', '--n... | typescript | edit | 0 | 3 | mit | f38a254092364b0a9dd7d9455cb05db1b181011c | say25/desktop,desktop/desktop,shiftkey/desktop,gengjiawen/desktop,shiftkey/desktop,artivilla/desktop,hjobrien/desktop,hjobrien/desktop,kactus-io/kactus,j-f1/forked-desktop,say25/desktop,say25/desktop,gengjiawen/desktop,kactus-io/kactus,gengjiawen/desktop,gengjiawen/desktop,hjobrien/desktop,kactus-io/kactus,shiftkey/des... | app/src/lib/git/diff-index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { LoadState } from './load.state'\n\n\nexport class BootState extends Phaser.State {\n\n static KEY: string = 'boot_state'\n\n create(): void {\n this.game.stage.backgroundColor = 'd6f3f6'\n this.game.scale.pa... | typescript | edit | 0 | 1 | mit | c2b64708ddbdde889b38dc29ad8f599117d64dec | dmk2014/phaser-template,dmk2014/phaser-template,dmk2014/phaser-template | src/states/boot.state.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {Encoding} from './Encoding';\n\nimport * as util from './util';\nimport * as consts from './consts';\nimport * as data from './data';\nimport * as enc from './enc';\nimport * as encDef from './encDef';\nimport * as compiler from... | typescript | edit | 0 | 0 | bsd-3-clause | 499b333a32473863a6d54b6427254e13e4a344b6 | uwdata/vega-lite,uwdata/vega-lite,vega/vega-lite,uwdata/vega-lite,vega/vega-lite,uwdata/vega-lite,vega/vega-lite,vega/vega-lite,vega/vega-lite,uwdata/vega-lite | src/vl.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n\n\nimport * as BluebirdPromise from \"bluebird\";\nimport Nodemailer = require(\"nodemailer\");\n\nimport { AbstractEmailNotifier } from \"../notifiers/AbstractEmailNotifier\";\nimport { SmtpNotifierConfiguration } from \"../configurat... | typescript | edit | 0 | 2 | mit | a4d7ade79104c7d8b0c476955f8ac99058453c25 | clems4ever/two-factor-auth-server,clems4ever/authelia,clems4ever/two-factor-auth-server,clems4ever/authelia,clems4ever/authelia,clems4ever/authelia,clems4ever/authelia | server/src/lib/notifiers/SmtpNotifier.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport const validateInbounds = (value: string) => {\r\n const num = parseFloat(value);\r\n return num >= 0 && num <= 100;\r\n};\r\n\r\nexport const validateInteger = (value: string): boolean => /^\\d+$/.test(value);\r\n\r\nexport con... | typescript | edit | 0 | 3 | mit | ce6b328932073433713ec142511f7c1967623805 | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | src/utils/validation.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport * from './null/null.component';\nexport * from './home/home.component';\nexport * from './login/login.component';\nexport * from './logout/logout.component';\nexport * from './setup/setup.component';\nexport * from './topbar/topb... | typescript | edit | 0 | 0 | mit | 45c680b7772de61e7a735b2f8dcba202ca94824c | petrstehlik/pyngShop,petrstehlik/pyngShop,petrstehlik/pyngShop,petrstehlik/pyngShop | www/src/app/components/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as ts from 'typescript';\n\nimport {Checker} from '../../checker';\nimport {ErrorCode} from '../../error_code';\nimport {debugLog} from '../ast_tools';\nimport {Fixer} from '../fixer';\nimport {PropertyMatcher} from '../propert... | typescript | edit | 0 | 6 | apache-2.0 | 74a26d37e42c270e4e28d3c80fec5cbf99edec8e | google/tsec,google/tsec | src/third_party/tsetse/util/pattern_engines/property_write_engine.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport class WmsMaterial extends THREE.MeshPhongMaterial {\n\n constructor(public options: any) {\n super({\n map: getLoader(),\n transparent: true,\n opacity: options.opacity ? options.opacity : 1,\n ... | typescript | edit | 0 | 3 | apache-2.0 | 3f4ed7631686f2a3805be41b6fd9a3878164dd21 | Tomella/explorer-3d,Tomella/explorer-3d,Tomella/explorer-3d | source/material/wmsmaterial.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { HitDatabaseEntry } from '../types';\r\n\r\nexport const conflictsPreserveBonus = (\r\n oldEntry: HitDatabaseEntry,\r\n newEntry: HitDatabaseEntry\r\n): HitDatabaseEntry => {\r\n return {\r\n ...newEntry,\r\n bonus: old... | typescript | edit | 0 | 1 | mit | ff113ba3c010b831ef791628ec8b2c0544e3cb9b | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | src/utils/hitDatabase.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport axios from 'axios';\n\nexport namespace Config {\n interface BackendConfig {\n scoreToWinSet: number;\n setsToWinMatch: number;\n }\n\n export let pointsPerMatch: number;\n export let pointsPerSet: number;\n export con... | typescript | edit | 0 | 1 | bsd-3-clause | b9bd4f933f3820f4fe954b34fc9cc9a5712b7cd6 | holisticon/ranked,holisticon/ranked,holisticon/ranked,holisticon/ranked,holisticon/ranked | frontend/src/main/js/config.tsx | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { git } from './core'\nimport { Repository } from '../../models/repository'\n\n/**\n * Update the ref to a new value.\n *\n * @param repository - The repository in which the ref exists.\n * @param ref - The ref to update. ... | typescript | edit | 0 | 2 | mit | 560671921ac9063610cdf9ae551de3d63018b95b | artivilla/desktop,say25/desktop,kactus-io/kactus,kactus-io/kactus,desktop/desktop,shiftkey/desktop,artivilla/desktop,desktop/desktop,kactus-io/kactus,j-f1/forked-desktop,j-f1/forked-desktop,j-f1/forked-desktop,kactus-io/kactus,shiftkey/desktop,artivilla/desktop,shiftkey/desktop,desktop/desktop,j-f1/forked-desktop,say25... | app/src/lib/git/update-ref.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport React, { FunctionComponent } from 'react';\nimport { addons, types } from '@storybook/addons';\nimport { ADDON_ID } from './constants';\n\nconst PreviewWrapper: FunctionComponent<{}> = p => (\n <div className=\"my-edit-wrapper\"... | typescript | edit | null | null | mit | 2aa4507f8471dca2b985c515c47a132c7cad5d9b | kadirahq/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook | dev-kits/addon-preview-wrapper/src/register.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { AuthHttp } from '../../utils/AuthHttp.service';\nimport { Component } from '@angular/core';\nimport { MentiiConfig } from '../../mentii.config';\nimport { Router } from '@angular/router';\nimport { SigninModel } from './signin.... | typescript | edit | 0 | 2 | mit | cbb5884de5d1ba198e0d68d9ddd62c76f7d59bab | mentii/mentii,mentii/mentii,mentii/mentii,mentii/mentii,mentii/mentii | Frontend/app/user/signin/signin.component.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { DoublyLinkedList, DoublyLinkedNode, Pair } from '..';\n\nexport class LruCache<T, U> {\n private cache: Map<T, Pair<U, DoublyLinkedNode<T>>> = new Map<T, Pair<U, DoublyLinkedNode<T>>>();\n private lru: DoublyLinkedList<T>... | typescript | edit | 0 | 1 | mit | f829e40e5b166862b7b028da54fd01a0e6f63148 | worsnupd/ts-data-structures | src/lru-cache/lru-cache.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { PopupType } from '../../models/popup'\nimport { Dispatcher } from '../../ui/dispatcher'\n\nclass TrampolineUIHelper {\n // The dispatcher must be set before this helper can do anything\n private dispatcher!: Dispatcher\n\n p... | typescript | edit | 0 | 1 | mit | f586e0779bc8b46fad7609768494ee969691a24c | say25/desktop,artivilla/desktop,artivilla/desktop,shiftkey/desktop,j-f1/forked-desktop,desktop/desktop,artivilla/desktop,artivilla/desktop,shiftkey/desktop,shiftkey/desktop,say25/desktop,desktop/desktop,j-f1/forked-desktop,say25/desktop,say25/desktop,j-f1/forked-desktop,desktop/desktop,shiftkey/desktop,j-f1/forked-desk... | app/src/lib/trampoline/trampoline-ui-helper.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {ServerLoader} from \"@tsed/common\";\nimport * as awsServerlessExpress from \"aws-serverless-express\";\nimport {Server} from \"./Server\";\n\n// NOTE: If you get ERR_CONTENT_DECODING_FAILED in your browser, this is likely\n// d... | typescript | edit | 0 | 1 | mit | c187e0a0aa62cdb8c1f5a707dd2a9fccbf7dfb4a | Romakita/ts-express-decorators,Romakita/ts-express-decorators,Romakita/ts-express-decorators,Romakita/ts-express-decorators | examples/aws/src/LambdaServer.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/// <reference path=\"pinkyswear.d.ts\" />\n\nvar promise: PinkySwear.Promise = pinkySwear();\n\npromise.then(function(value) {\n console.log(\"Success with value \" + value + \"1\");\n}, function(value) {\n console.log(\"Failure ... | typescript | edit | 0 | 1 | mit | 4dd05dcff9617923be2f7136ac3b8c236dc10077 | GlennQuirynen/DefinitelyTyped,mcliment/DefinitelyTyped,elisee/DefinitelyTyped,Syati/DefinitelyTyped,laurentiustamate94/DefinitelyTyped,amanmahajan7/DefinitelyTyped,ashwinr/DefinitelyTyped,arusakov/DefinitelyTyped,zuzusik/DefinitelyTyped,EnableSoftware/DefinitelyTyped,PopSugar/DefinitelyTyped,martinduparc/DefinitelyType... | pinkyswear/pinkyswear-tests.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from 'react';\nimport { loadScript } from 'utils/helpers';\nimport { Grid, createStyles, Theme, withStyles } from '@material-ui/core';\n\nconst styles = (theme: Theme) =>\n createStyles({\n '@global': {\n '#co... | typescript | edit | null | null | mit | ec4a5fefe815efeac548b6b466239ab8f82309c3 | mbrookes/material-ui,rscnt/material-ui,mbrookes/material-ui,callemall/material-ui,callemall/material-ui,oliviertassinari/material-ui,mui-org/material-ui,rscnt/material-ui,callemall/material-ui,oliviertassinari/material-ui,oliviertassinari/material-ui,dmtrKovalenko/material-ui-pickers,mbrookes/material-ui,callemall/mate... | docs/_shared/Ad.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { NgModule } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\n\nimport { TodoComponent } from './todo.component';\n\nimport { FirstUpperPipe } from '../../shared/pipes/first-upper.pipe';\n\nimpor... | typescript | edit | 0 | 0 | mit | 75ab7a99f93d51924e7a69b4f36ab78a6325d2ac | compodoc/compodoc-demo-todomvc-angular2,compodoc/compodoc-demo-todomvc-angular2,compodoc/compodoc-demo-todomvc-angular,compodoc/compodoc-demo-todomvc-angular2,compodoc/compodoc-demo-todomvc-angular | src/app/list/todo/todo.module.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { spawn } from 'child_process'\nimport { platform } from 'os'\n\nexport function openTerminal(fullPath: string) {\n const currentPlatform = platform()\n let command = ''\n\n switch (currentPlatform) {\n case 'darwin': {\n ... | typescript | edit | 0 | 3 | mit | 363c641a3f570fd16bd347a36372a8c2abdda695 | say25/desktop,artivilla/desktop,gengjiawen/desktop,desktop/desktop,j-f1/forked-desktop,kactus-io/kactus,say25/desktop,say25/desktop,BugTesterTest/desktops,hjobrien/desktop,gengjiawen/desktop,artivilla/desktop,kactus-io/kactus,j-f1/forked-desktop,gengjiawen/desktop,kactus-io/kactus,shiftkey/desktop,desktop/desktop,artiv... | app/src/lib/open-terminal.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\ndeclare namespace SuperError {\r\n interface SuperErrorI {\r\n name: string;\r\n message: string;\r\n [k: string]: any;\r\n\r\n new(...args: any[]): SuperError;\r\n }\r\n}\r\n\r\ninterface SuperError extends Error {\r\n n... | typescript | edit | 0 | 1 | mit | f2480014a73374e6d73e39cb0dc7d649edb39fe1 | busbud/super-error | index.d.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {Injectable} from \"@angular/core\";\nimport {Todo} from \"../models/todo.model\";\n\nconst STORAGE_KEY = 'angular2-todo';\n\n@Injectable()\nexport class TodoService {\n\n todos:Todo[];\n\n constructor() {\n const persistedT... | typescript | edit | 0 | 2 | mit | 78c00de080094068531c30f189190098168b5c49 | mitsuruog/angular2-todo-tutorial,mitsuruog/angular2-todo,mitsuruog/angular2-todo,mitsuruog/angular2-todo-tutorial,mitsuruog/angular2-todo-tutorial | app/services/todo.service.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { ActionReducer, Action } from '@ngrx/store';\nimport { PetTag, initialTag } from './../core/pet-tag.model';\n\n// Export action types\nexport const SELECT_SHAPE = 'SELECT_SHAPE';\nexport const SELECT_FONT = 'SELECT_FONT';\nexpor... | typescript | edit | 0 | 8 | mit | a1cd93f7aa6a2d60ea11123be321850a5ee7596d | kmaida/pet-tags-ngrx,auth0-blog/pet-tags-ngrx,auth0-blog/pet-tags-ngrx,auth0-blog/pet-tags-ngrx,kmaida/pet-tags-ngrx,kmaida/pet-tags-ngrx | src/app/core/pet-tag.reducer.ts | accepted | null | true |
[
{
"role": "user",
"content": "Write typescript code for the following: feat(Date): Format eLife's publication date correctly"
},
{
"role": "assistant",
"content": "import { first, ready } from '../../util'\nimport DateTimeFormat = Intl.DateTimeFormat\n\nfunction elifeFormatDate(date: Date): stri... | typescript | new_file | 0 | 2 | apache-2.0 | d0603a2f7ac0e7a66e779ba5dea09d3b81f760a3 | stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila | src/themes/elife/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Owner } from '@glimmer/di';\nimport { Option } from '@glimmer/interfaces';\nimport { ManagerDelegate } from './component-managers/custom';\n\nconst MANAGERS: WeakMap<object, ManagerWrapper<unknown>> = new WeakMap();\n\nconst ge... | typescript | edit | 0 | 1 | mit | 1fd5a7b0db2c2b874ab7c161a6ac5a5c17905d2b | glimmerjs/glimmer.js,glimmerjs/glimmer.js,glimmerjs/glimmer.js,glimmerjs/glimmer.js | packages/@glimmer/application/src/components/utils.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport React from 'react';\nimport { storiesOf } from '@storybook/react';\nimport { Button } from './Button';\nimport { Icons } from '../icon/icon';\n\nimport { Form } from '../form/index';\n\nconst { Button: FormButton } = Form;\n\nsto... | typescript | edit | null | null | mit | eddbc0f6c5b6d9f5ac6883fe99378cbf736f52a6 | storybooks/storybook,storybooks/storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,kadirahq/react-storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook | lib/components/src/Button/Button.stories.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { RefObject } from 'react';\n\nimport { Direction, IEditor } from 'roosterjs-editor-types';\n\nimport { EditorActions } from '../../interface';\n\n/**\n * @param editorInstance\n * @returns set of external actions\n */\nconst get... | typescript | edit | 0 | 2 | mit | 8dd82e1211334e1e1be8249ba32004f8d2a9626d | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | packages/components/components/editor/rooster/helpers/getRoosterEditorActions.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { EventEmitter } from \"@angular/core\";\n\nexport interface Notification {\n id?: string\n type: string\n icon: string\n title?: string\n content?: string\n override?: any\n html?: any\n state?: string\n ... | typescript | edit | 0 | 0 | mit | 2a90c39bc05d253f8ddda1d11916efe0d30d9436 | flauc/angular2-notifications,flauc/angular2-notifications,flauc/angular2-notifications | src/notification.type.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/*-----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|---------------------------------------------------... | typescript | edit | 0 | 0 | bsd-3-clause | 527b8834097e0c303cee9d59c36fa16677951819 | jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab | buildutils/src/patch-release.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// Definitions by: Carlos Ballesteros Velasco <https://github.com/soywiz>\n// Leon Yu <https://github.com/leonyu>\n// BendingBender <https://github.com/BendingBender>\n// Maple Miao <https... | typescript | edit | 0 | 1 | mit | 09fcc980bd4ab85a39750d38db7eac8406e7c771 | form-data/form-data,felixge/node-form-data | index.d.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport Orbit from '@orbit/core';\n\nexport function jsonapiResponse(_options: any, body?: any, timeout?: number): Promise<Response> {\n let options: any;\n let response: Response;\n\n if (typeof _options === 'number') {\n options ... | typescript | edit | 0 | 8 | mit | b73f719ed4935eb150d5c7ff776980468075c5c0 | orbitjs/orbit.js,orbitjs/orbit-core,orbitjs/orbit.js | packages/@orbit/jsonapi/test/support/jsonapi.ts | rejected_duplicate | Near-duplicate of sample 112377 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/*!\r\n * Knockout decorator\r\n * (c) vario\r\n * License: MIT (http://www.opensource.org/licenses/mit-license.php)\r\n */\r\n\r\nnamespace variotry.KnockoutDecorator\r\n{\r\n\tvar storeObservableKey = \"__vtKnockoutObservables__\";\r... | typescript | edit | 0 | 4 | mit | b16da0bdd9690b8d3af3e70862ec4757ea4b95b8 | variotry/knockout-decorator,variotry/knockout-decorator | src/knockout-decorator.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Observable, components } from 'knockout';\n\nexport function setState<T>(state: T): void;\n\nexport function getState<T>(): Observable<T>;\n\ninterface ViewModelFactoryFunction {\n (params?: components.ViewModelParams): compon... | typescript | edit | 0 | 1 | mit | 8f55a45f2a60dae53f1bb2b5e9476e4fa68aa5f8 | Spreetail/knockout-store | index.d.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// The purpose of this unpleasant hack is to make both `parsing` and `rendering`\n// settings optional, while still requiring that at least one of the two be provided.\nexport type Settings =\n {\n parsing?: Settings.Parsing\n re... | typescript | edit | 0 | 0 | mit | 48ec31a2804785072605a247b9dae9f430e6e8f0 | start/up,start/up | src/Settings.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport class Dependument {\n private source: string;\n private output: string;\n\n constructor(options: any) {\n if (!options.source) {\n throw new Error(\"No source path specified in options\");\n }\n\n if (!options.ou... | typescript | edit | 0 | 3 | unlicense | 2a0151d2e0b1bf9cf9f25f357df93d6fbc6aa9f5 | Jameskmonger/dependument,Jameskmonger/dependument,dependument/dependument,dependument/dependument | src/dependument.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { clickAddon, visit } from '../helper';\n\ndescribe('Knobs', () => {\n beforeEach(() => {\n visit('official-storybook/?path=/story/addons-knobs-withknobs--tweaks-static-values');\n });\n\n it('[text] it should change a stri... | typescript | edit | 0 | 1 | mit | 74365c9bacfd62c51c89924015d83db533d7291a | storybooks/react-storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook | cypress/integration/knobs.spec.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { useEffect, useMemo, useState } from 'react';\r\nimport type { ServerOptions } from '../../../ts/types/server-options';\r\nimport { useOption } from '../../shared/useOption';\r\n\r\nexport const useServerOptions = ({ initialCach... | typescript | edit | 0 | 3 | bsd-2-clause | 51d4fe0839983b20f46cb37bc5a52135d6b92f4c | ashmind/SharpLab,ashmind/SharpLab,ashmind/SharpLab,ashmind/SharpLab,ashmind/SharpLab,ashmind/SharpLab | source/WebApp/app/code/code-editor/useServerOptions.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { createServer } from 'restify';\nimport { BotConnectorBot } from 'botbuilder';\n\nconst appId = process.env['BF_APP_ID'];\nconst appSecret = process.env['BF_APP_SECRET'];\nconst bot = new BotConnectorBot({ appId, appSecret });\n... | typescript | edit | 0 | 1 | mit | deb0e207566bf5e0326393bc4f67307bba739928 | duncanmak/mr-robot | src/app.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n\nimport * as Logger from \"../logging/logger\";\n\ninterface ActiveUsers {\n [channelName: string]: {\n [userId: string]: number;\n }[];\n}\n\nexport class Active {\n activeUsers: ActiveUsers;\n activeTime: number;\n... | typescript | edit | 0 | 2 | mit | 805b65c408b99bdd87f9ff1ea33a6037ea17aaf8 | CactusBot/Sepal,CactusDev/Sepal,CactusDev/Sepal | src/active/active.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n'use strict';\r\n\r\nimport { RestClientSettings } from './models/configurationSettings';\r\nimport * as Constants from './constants';\r\nimport * as appInsights from \"applicationinsights\";\r\n\r\nappInsights.setup(Constants.AiKey)\r\... | typescript | edit | 0 | 3 | mit | 44e00efc13823b5e739029a3dd455ceff0acf597 | Huachao/vscode-restclient,Huachao/vscode-restclient | src/telemetry.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { c } from 'ttag';\nimport { useState } from 'react';\n\nimport { FormModal, Loader } from '../../components';\nimport PasswordTotpInputs from './PasswordTotpInputs';\nimport useAskAuth from './useAskAuth';\n\ninterface Props {\n... | typescript | edit | null | null | mit | 57d5e5fb119e509f01c1d9ec2e11752fa1f8998f | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | packages/components/containers/password/AskAuthModal.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { ReadConverter } from '../types/index'\nimport { readValue } from './converter'\n\ntype GetReturn<T> = [T] extends [undefined]\n ? object & { [property: string]: string }\n : string | undefined\n\nexport default function <T ex... | typescript | edit | 0 | 0 | mit | 43b3f1d78e5e29cdd87127c57affa4fcf6e2e2a5 | carhartl/js-cookie,carhartl/js-cookie | src/get.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// This module renders an element with an emoji using\n// a non system-default font to workaround an Chrome\n// issue that causes unexpected spacing on emojis.\n// More info:\n// https://bugs.chromium.org/p/chromium/issues/detail?id=111... | typescript | edit | 0 | 0 | mit | 0f469017ae406fadc92bc878fadfee209fcdb623 | j-f1/forked-desktop,say25/desktop,kactus-io/kactus,desktop/desktop,j-f1/forked-desktop,desktop/desktop,artivilla/desktop,artivilla/desktop,shiftkey/desktop,desktop/desktop,shiftkey/desktop,kactus-io/kactus,say25/desktop,artivilla/desktop,shiftkey/desktop,desktop/desktop,kactus-io/kactus,say25/desktop,kactus-io/kactus,s... | app/src/lib/fix-emoji-spacing.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { } from 'jasmine';\nimport { async, inject } from '@angular/core/testing';\n\nimport { configureTest } from './config';\nimport { ContentService, ShareService, ContentSearchRequest, ShareContent, ShareBasicCreateRequest, OutputA... | typescript | edit | 0 | 1 | mit | 00dda7aba47e7d785e11ec860cf40046a72f397a | Picturepark/Picturepark.SDK.TypeScript,Picturepark/Picturepark.SDK.TypeScript,Picturepark/Picturepark.SDK.TypeScript | src/picturepark-sdk-v1-angular/projects/picturepark-sdk-v1-angular/src/tests/share-service.spec.ts | rejected_duplicate | Near-duplicate of sample 113067 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Component, OnInit } from '@angular/core';\nimport { Http } from '@angular/http';\nimport { Router } from '@angular/router';\n//import { AuthHttp } from 'angular2-jwt';\nimport { contentHeaders } from '../common/headers';\nimpor... | typescript | edit | 0 | 1 | mit | 16e28245a8fd113ce648a0b062587e4c244cebdd | secularHub/MembersApp,secularHub/MembersApp,secularHub/MembersApp | src/app/login/login.component.ts | accepted | null | true |
[
{
"role": "user",
"content": "Write typescript code for the following: Add comment explaining purpose of file"
},
{
"role": "assistant",
"content": "/*\n * This file exists purely to ensure that there is a single entry point\n * for the UMD build. It should do nothing more than import 'expect'\n... | typescript | new_file | 0 | 0 | mit | 7d458f2f0753f0c55b27a0e4059770163d877f97 | dylanparry/ceylon,dylanparry/ceylon | src/umd.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n'use strict';\nimport batch from './batch';\nimport request = require('request');\nimport log = require('./log');\nimport pjson = require('pjson');\n\nconst current_version = pjson.version;\n\n/* Check if the current version is the lat... | typescript | edit | 0 | 4 | mit | a44d1ae6684148edd4f15d57d0b807866e38e200 | Godzil/Crunchy,Godzil/crunchyroll.js,Godzil/crunchyroll.js,Godzil/Crunchy,Godzil/Crunchy | src/cli.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { commands } from \"vscode\";\nimport { ActionType, IBindingItem } from \"../IBindingItem\";\nimport { createQuickPick } from \"../utils\";\nimport { IMenuItem } from \"./IMenuItem\";\n\nexport default class MenuItem implements I... | typescript | edit | 0 | 5 | mit | f4756fd8ce7abaecc4966d1e5b49873b8221fc3d | VSpaceCode/VSpaceCode,VSpaceCode/VSpaceCode | src/menu/menuItem.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport class StepMock implements Xrm.ProcessFlow.Step {\n public required: boolean;\n public name: string;\n public attribute: string;\n\n constructor(name: string, attribute: string, required: boolean) {\n this.name = name;\n ... | typescript | edit | 0 | 1 | mit | 13dd14e3692b478849ee1b041f00ce750ddfb9af | camelCaseDave/xrm-mock,camelCaseDave/xrm-mock | src/xrm-mock/processflow/step/step.mock.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport _ from 'lodash';\nimport axios from 'axios';\nimport toastr from 'toastr';\n\nexport default class SettingsRepository {\n\n static getSetting(key: string, def: any | null = null): any {\n let result = _.find(window.Pane... | typescript | edit | 0 | 4 | mit | 349d90061a782f64d9c08044c6a7bfe5ffb3c253 | mrkirby153/KirBotPanel,mrkirby153/KirBotPanel,mrkirby153/KirBotPanel,mrkirby153/KirBotPanel | resources/assets/js/settings_repository.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport React from \"react\"\nimport styled from \"styled-components\"\nimport { space, SpaceProps, themeGet } from \"styled-system\"\n\nconst HR = styled.div.attrs<SpaceProps>({})`\n ${space};\n border-top: 1px solid ${themeGet(\"colo... | typescript | edit | 0 | 0 | mit | 3afe29d7e96b691f74aa7e8ce01f60a2cebdc499 | artsy/reaction-force,xtina-starr/reaction,artsy/reaction-force,xtina-starr/reaction,artsy/reaction,artsy/reaction,xtina-starr/reaction,artsy/reaction,xtina-starr/reaction | src/Styleguide/Elements/Separator.tsx | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/* tslint:disable:no-unused-variable */\n\n/*!\n * Window Object Service Test\n *\n * Copyright(c) Exequiel Ceasar Navarrete <<EMAIL>>\n * Licensed under MIT\n */\n\nimport { TestBed, async, inject } from '@angular/core/testing';\nimpor... | typescript | edit | 0 | 1 | mit | 00b34f00d77a3567d12ee496815e58ea354bdd58 | ecsnavarretemit/sarai-ng2,ecsnavarretemit/sarai-interactive-maps,ecsnavarretemit/sarai-interactive-maps,ecsnavarretemit/sarai-ng2,ecsnavarretemit/sarai-interactive-maps,ecsnavarretemit/sarai-ng2 | src/app/window.service.spec.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { EnvConfig } from './env-config.interface';\n\nconst BaseConfig: EnvConfig = {\n // Sample API url\n API: 'https://demo.com',\n RELEASEURL: 'https://github.com/nie-ine/raeber-website/releases/tag/0.12.0',\n RELEASEVERSION: '... | typescript | edit | 0 | 0 | mit | ffb99c43e4f62c5dfeb7a66c70fe293d2f9f3f7a | nie-ine/raeber-website,nie-ine/raeber-website,nie-ine/raeber-website,nie-ine/raeber-website | tools/env/base.ts | rejected_duplicate | Near-duplicate of sample 112906 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/// <reference path='../src/sfc.d.ts' />\n\nimport Vue from 'vue';\nimport VueHighlightJS, { Options } from '../src';\n\nimport javascript from 'highlight.js/lib/languages/javascript';\nimport vue from '../lib/languages/vue';\n\nimport ... | typescript | edit | 0 | 1 | mit | a4c3be5e5bc0ea8742c208d5ea6fd6a0244a2bb7 | gluons/vue-highlight.js | dev/main.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {getString, setString} from \"application-settings\";\nimport {connectionType, getConnectionType, startMonitoring} from \"connectivity\";\nvar Everlive = require(\"../shared/everlive.all.min\");\n\nexport class Config {\n static... | typescript | edit | 0 | 2 | mit | 1cd1c4bdcc99f7d753081a294546ee46910379cd | anhoev/cms-mobile,qtagtech/nativescript_tutorial,NativeScript/sample-Groceries,qtagtech/nativescript_tutorial,tjvantoll/sample-Groceries,anhoev/cms-mobile,qtagtech/nativescript_tutorial,poly-mer/community,tjvantoll/sample-Groceries,dzfweb/sample-groceries,dzfweb/sample-groceries,poly-mer/community,anhoev/cms-mobile,Ice... | app/shared/config.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport Diff from \"./Diff\"\n\nexport default class NotificationManager {\n\tunseen: number\n\ticon: HTMLElement\n\tcounter: HTMLElement\n\n\tconstructor() {\n\t\tthis.icon = document.getElementById(\"notification-icon\")\n\t\tthis.coun... | typescript | edit | 0 | 3 | mit | 528ba49dee28d4c801522c8cb12b538924e4b3e0 | animenotifier/notify.moe,animenotifier/notify.moe,animenotifier/notify.moe | scripts/NotificationManager.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport OperationLog from \"./helperFunctions/OperationLog\";\n\nfunction getResultLen(log: OperationLog) {\n return log.result.type === \"string\"\n ? log.result.length\n : (log.result.primitive + \"\").length;\n}\n\nexport defau... | typescript | edit | 0 | 6 | mit | 7b19f6875d27ef7e96f0b25d49f01c94c31a9345 | mattzeunert/FromJS,mattzeunert/FromJS,mattzeunert/FromJS,mattzeunert/FromJS | packages/core/src/traverseConcat.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as angular from 'angular';\n<% if (!moduleOnly) { %>import { <%= pName %>Config } from './<%= hName %>.config';\nimport { <%= pName %>Controller } from './<%= hName %>.controller';\n\n<% } %>export const <%= pName %>Module = an... | typescript | edit | null | null | mit | 4547b74f53c807d0098e6a513e5ddc87e6673224 | Kurtz1993/ngts-cli,Kurtz1993/ngts-cli,Kurtz1993/ngts-cli | templates/module/_name.module.ts | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {execute, parse} from \"graphql\";\nimport {ProxyConfig} from \"../../src/config/proxy-configuration\";\nimport {createProxySchema} from \"../../src/proxy-schema\";\n\n/**\n * Create a graphql proxy for a configuration and execut... | typescript | edit | 0 | 2 | mit | b3892c565028a5212300e6f0f46fef99814020dc | AEB-labs/graphql-weaver,AEB-labs/graphql-weaver | spec/regression/helpers.ts | rejected_duplicate | Near-duplicate of sample 113107 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from \"react\";\nimport { connect } from \"react-redux\";\n\nimport Book from \"../component/Book\";\nimport BooksMenu from \"../component/BooksMenu\";\nimport config from \"../config\";\nimport { IBook } from \"../lib... | typescript | edit | null | null | mit | 46756513fd949986284fbedc0c096e4e8ef1d367 | raviqqe/code2d,raviqqe/code2d,raviqqe/code2d,raviqqe/code2d | app/src/container/Books.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {Component, Input} from '@angular/core';\nimport {NgbDateParserFormatter, NgbDateStruct} from '@ng-bootstrap/ng-bootstrap';\nimport {Resource} from '../../../model/resource';\nimport {DocumentEditChangeMonitor} from '../document-... | typescript | edit | 0 | 5 | apache-2.0 | e84a4195546370474de15f8de614c7d56adbd542 | dainst/idai-components-2,dainst/idai-components-2,dainst/idai-components-2 | src/core/documents/docedit/forms/date.component.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { async, ComponentFixture, TestBed } from '@angular/core/testing';\nimport { RouterTestingModule } from '@angular/router/testing';\n\nimport { LogoutComponent } from './logout.component';\n\ndescribe('LogoutComponent', () => {\n ... | typescript | edit | 0 | 1 | apache-2.0 | 2e38182131d321b06dee1ed39f9c9f4bb00c16d8 | eKiosk/HardwareSensorSystem,eKiosk/HardwareSensorSystem,eKiosk/HardwareSensorSystem | src/HardwareSensorSystem/wwwsrc/app/logout/logout.component.spec.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { generateReducer } from \"../generate_reducer\";\nimport { TickerState } from \"./interfaces\";\n\nlet YELLOW = \"#fd6\",\n RED = \"#e66\",\n GREEN = \"#6a4\";\n\nfunction change(color: string, message: string, show = true... | typescript | edit | 0 | 1 | mit | 6c2b10c82ae7712e11c3e8ea5e0b8938369214e4 | MrChristofferson/farmbot-web-frontend,roryaronson/farmbot-web-frontend,roryaronson/farmbot-web-frontend,FarmBot/farmbot-web-frontend,MrChristofferson/farmbot-web-frontend,FarmBot/farmbot-web-frontend,roryaronson/farmbot-web-frontend,RickCarlino/farmbot-web-frontend,RickCarlino/farmbot-web-frontend | src/components/ticker/reducer.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport interface CoreEvents {\n CHANNEL_CREATED: string;\n GET_CURRENT_STORY: string;\n SET_CURRENT_STORY: string;\n GET_STORIES: string;\n SET_STORIES: string;\n SELECT_STORY: string;\n APPLY_SHORTCUT: string;\n STORY_ADDED: st... | typescript | edit | 0 | 0 | mit | 008ae8a0a70f09f43d328d0ab39e58e86946e32f | storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,kadirahq/react-storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook | lib/core-events/src/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Bracket } from './Bracket'\n\n\n// Many of our conventions incorporate brackets. These are the ones we recognize.\nexport const BRACKETS = [\n new Bracket('(', ')'),\n new Bracket('[', ']'),\n new Bracket('{', '}')\n]\n\n```... | typescript | edit | 0 | 0 | mit | 7ae13f712bb81fc94f422e5833af4aa55b3a0cd8 | start/up,start/up | src/Parsing/Inline/Tokenization/Brackets.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as childProcess from 'child_process';\nimport Xev from 'xev';\n\nconst ev = new Xev();\n\nexport default function() {\n\tconst log: any[] = [];\n\n\tconst p = childProcess.fork(__dirname + '/notes-stats-child.js');\n\n\tp.on('m... | typescript | edit | 0 | 2 | mit | 5e788f0da48a13dae08b09ca8156a92f0884795d | ha-dai/Misskey,Tosuke/misskey,Tosuke/misskey,Tosuke/misskey,syuilo/Misskey,Tosuke/misskey,Tosuke/misskey,syuilo/Misskey,ha-dai/Misskey | src/daemons/notes-stats.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { ReactElement, ComponentClass } from 'react';\n\nexport type Selector = string | ComponentClass<{}>;\nexport type Matcher = any;\n\nexport interface Tree<P, C> {\n type: ComponentClass<P> | string;\n props: P;\n reRender(prop... | typescript | edit | 0 | 1 | mit | 76fda1f3b1fd4028f03bb726cd15823804493dd3 | glenjamin/skin-deep,glenjamin/skin-deep | skin-deep.d.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {services} from \"../services/index\";\nimport * as _ from \"lodash\";\n\nmonaco.languages.setMonarchTokensProvider(\"shell\", {\n tokenizer: {\n root: [\n {\n regex: /.+/,\n act... | typescript | edit | 0 | 1 | mit | c16f51e232204e064aa8d1888d5294575ddcf628 | black-screen/black-screen,vshatskyi/black-screen,shockone/black-screen,vshatskyi/black-screen,railsware/upterm,shockone/black-screen,vshatskyi/black-screen,black-screen/black-screen,vshatskyi/black-screen,black-screen/black-screen,railsware/upterm | src/monaco/ShellHistoryLanguage.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/*\n\thighlight.js definition by Niklas Mollenhauer\n\tLast Update: 10.09.2013\n\tSource Code: https://github.com/isagalaev/highlight.js\n\tProject Page: http://softwaremaniacs.org/soft/highlight/en/\n*/\n\n/// <reference path=\"highlig... | typescript | edit | 0 | 0 | mit | 4f8425580accc61defad55e2abb3f8ffd0773f91 | raijinsetsu/DefinitelyTyped,MarlonFan/DefinitelyTyped,shlomiassaf/DefinitelyTyped,wilfrem/DefinitelyTyped,DzmitryDulko/DefinitelyTyped,AgentME/DefinitelyTyped,stacktracejs/DefinitelyTyped,uestcNaldo/DefinitelyTyped,jraymakers/DefinitelyTyped,newclear/DefinitelyTyped,evansolomon/DefinitelyTyped,jsaelhof/DefinitelyTyped,... | highlightjs/highlightjs-tests.ts | rejected_duplicate | Near-duplicate of sample 113370 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Component, OnInit, Input } from '@angular/core';\n\n@Component({\n selector: 'mh-thumbnail',\n templateUrl: './thumbnail.component.html',\n styleUrls: ['./thumbnail.component.css']\n})\nexport class ThumbnailComponent implem... | typescript | edit | 0 | 1 | mit | 1caee21c93f8adb9016b754e79ba23e62d3d23b8 | dmytroyarmak/angular2-marvel-heroes,dmytroyarmak/angular2-marvel-heroes,dmytroyarmak/angular2-marvel-heroes | src/app/shared/components/thumbnail/thumbnail.component.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport tests = require(\"../testRunner\");\nimport trace = require(\"trace\");\nimport {Page} from \"ui/page\";\nimport {GridLayout} from \"ui/layouts/grid-layout\";\n\ntrace.enable();\ntrace.addCategories(trace.categories.Test + \",\"... | typescript | edit | 0 | 2 | mit | 5aa502a9476beba2365b317d4ca14c3ac79a391f | NativeScript/NativeScript,NativeScript/NativeScript,NativeScript/NativeScript,NativeScript/NativeScript,NativeScript/NativeScript | apps/tests/app/mainPage.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from 'react'\nimport { Component } from 'react'\nimport { StyleSheet } from 'react-native'\nimport { Text } from 'react-native'\nimport { View } from 'react-native'\n\nimport { Card } from './Card'\nimport { Circle } f... | typescript | edit | null | null | mit | e75da1d3603b6b54ccf320ec510f72c99ba71b83 | janaagaard75/desert-walk,janaagaard75/desert-walk | src/App.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {Configuration} from './Configuration';\nimport {TrueConfiguration} from './TrueConfiguration';\nimport {FalseConfiguration} from './FalseConfiguration';\n\nexport class JSONConfiguration implements Configuration {\n construct... | typescript | edit | 0 | 4 | apache-2.0 | c0ef3b8f681820135ec27e46e424b800870a79ca | janschulte/smle,janschulte/smle,janschulte/smle,janschulte/smle | src/app/services/config/JSONConfiguration.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for ... | typescript | edit | 0 | 2 | mit | e9bb38e81a42bdc1cec1e9f71c15e60b7edc3c28 | stringham/vscode,landonepps/vscode,cleidigh/vscode,0xmohit/vscode,rishii7/vscode,KattMingMing/vscode,hoovercj/vscode,0xmohit/vscode,the-ress/vscode,Zalastax/vscode,gagangupt16/vscode,hoovercj/vscode,Microsoft/vscode,Microsoft/vscode,Microsoft/vscode,DustinCampbell/vscode,KattMingMing/vscode,stringham/vscode,joaomoreno/... | extensions/merge-conflict/src/contentProvider.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Vector3 } from './../math/Vector3';\nimport { Line } from './../objects/Line';\nimport { Mesh } from './../objects/Mesh';\nimport { Color } from './../math/Color';\nimport { Object3D } from './../core/Object3D';\n\n// Extras / ... | typescript | edit | 0 | 1 | mit | d0e5e67b167b87255ac4ad146cf577aa6850892f | looeee/three.js,donmccurdy/three.js,Liuer/three.js,greggman/three.js,gero3/three.js,gero3/three.js,WestLangley/three.js,aardgoose/three.js,06wj/three.js,kaisalmen/three.js,donmccurdy/three.js,fyoudine/three.js,kaisalmen/three.js,06wj/three.js,Liuer/three.js,aardgoose/three.js,looeee/three.js,mrdoob/three.js,makc/three.... | src/helpers/ArrowHelper.d.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from 'react'\nimport { Octicon, OcticonSymbol } from '../octicons'\nimport { APIRefState } from '../../lib/api'\nimport { assertNever } from '../../lib/fatal-error'\nimport * as classNames from 'classnames'\nimport { P... | typescript | edit | null | null | mit | c4dc21875a53d2ee669cfb5e950c75241943508a | say25/desktop,shiftkey/desktop,desktop/desktop,j-f1/forked-desktop,shiftkey/desktop,kactus-io/kactus,say25/desktop,kactus-io/kactus,artivilla/desktop,kactus-io/kactus,j-f1/forked-desktop,say25/desktop,shiftkey/desktop,shiftkey/desktop,say25/desktop,j-f1/forked-desktop,kactus-io/kactus,desktop/desktop,artivilla/desktop,... | app/src/ui/branches/ci-status.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport HelpPage = require('help');\nimport Workspace = require('workspace');\nimport Settings = require('settings');\n\nclass Application {\n help = new HelpPage();\n workspace: Workspace;\n settings: Settings;\n\n construc... | typescript | edit | 0 | 2 | mit | 4c50172f81f16289ab4c61ba3ff3c84377fa2780 | arthot/calque,arthot/calque,arthot/calque | src/Calque/core/app.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Injectable } from '@angular/core';\nimport { Error } from './error/error';\nimport { Observable } from 'rxjs/Observable';\nimport { environment } from '../../environments/environment';\nimport { HttpErrorResponse } from '@angul... | typescript | edit | 0 | 5 | mit | 63772291b23c207d603431c265d9692746e06500 | Crunchy-Torch/coddy,Crunchy-Torch/coddy,Crunchy-Torch/coddy,Crunchy-Torch/coddy,Crunchy-Torch/coddy | front/src/app/shared/base.service.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n'use strict';\r\n\r\nimport { RestClientSettings } from './models/configurationSettings';\r\nimport * as Constants from './constants';\r\nimport * as appInsights from \"applicationinsights\";\r\n\r\nappInsights.setup(Constants.AiKey)\r\... | typescript | edit | 0 | 3 | mit | 4e9b96fc5a2b02e07b863d59e5386eff76ef3ad1 | Huachao/vscode-restclient,Huachao/vscode-restclient | src/telemetry.ts | rejected_duplicate | Near-duplicate of sample 114718 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n'use strict';\nimport { GitHubService } from './github';\n\nexport class GitLabService extends GitHubService {\n\n constructor(public domain: string, public path: string, public custom: boolean = false) {\n super(domain, path)... | typescript | edit | 0 | 5 | mit | 6d7f44e091a47c28bbcf7c169ec3775b6fa7aac5 | eamodio/vscode-gitlens,eamodio/vscode-gitlens,eamodio/vscode-gitlens | src/git/remotes/gitlab.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { hitDatabaseSelector, databaseFIlterSettingsSelector } from './index';\r\nimport { createSelector } from 'reselect';\r\nimport { HitDatabaseEntry } from 'types';\r\n\r\nexport const hitDatabaseFilteredBySearchTerm = createSelect... | typescript | edit | 0 | 2 | mit | 5ec8a96dde9826044f6750f804d0b8c1f90f0882 | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | src/selectors/databaseFilterSettings.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport type { Locale } from '../types'\nimport formatDistance from './_lib/formatDistance/index'\nimport formatLong from './_lib/formatLong/index'\nimport formatRelative from './_lib/formatRelative/index'\nimport localize from './_lib/l... | typescript | edit | 0 | 0 | mit | e18ff095665e386c77ab79137592c36c5e6183a7 | date-fns/date-fns,date-fns/date-fns,date-fns/date-fns | src/locale/km/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Alarms } from 'webextension-polyfill-ts'\n\nimport BackgroundScript from '.'\nimport { QUOTA_USAGE_WARN_PERC } from './constants'\nimport { EVENT_NOTIFS } from 'src/notifications/notifications'\n\nexport interface AlarmConfig e... | typescript | edit | 0 | 2 | mit | f2b82dd3c3cb8c7c2623a0d34f1efe6cf67f9f66 | WorldBrain/WebMemex,WorldBrain/WebMemex | src/background-script/alarms.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport React from 'react';\nimport { c } from 'ttag';\n\nimport { AutoReplySection, SettingsPropsShared } from 'react-components';\n\nimport PrivateMainSettingsAreaWithPermissions from '../../components/PrivateMainSettingsAreaWithPermis... | typescript | edit | null | null | mit | 5c008d8c6f678d2ed0bee64ced213fa1d06b92cb | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | applications/account/src/app/containers/mail/MailAutoReplySettings.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { QueueItem, SearchResult } from '../types';\r\nimport * as v4 from 'uuid/v4';\r\n\r\nexport const blankQueueItem = (groupId: string): QueueItem => ({\r\n groupId,\r\n hitId: '[REFRESH_REQUIRED]' + v4(),\r\n assignmentId: '[RE... | typescript | edit | 0 | 1 | mit | 1afb7d88e286e47893a0f8de2aa37c33f9317a6a | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | src/utils/queueItem.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { gql } from \"apollo-server\";\nimport { createTestClient } from \"apollo-server-testing\";\nimport { server } from \"../src\";\n\ndescribe(\"Queries\", () => {\n it(\"returns a list of kernelspecs\", async () => {\n const {... | typescript | edit | 0 | 1 | bsd-3-clause | 62805b4e7a4a426cb32c18a5ec5e8583f8f9d2fc | nteract/composition,nteract/composition,nteract/nteract,nteract/nteract,nteract/composition,nteract/nteract,nteract/nteract,nteract/nteract | packages/kernel-relay/__tests__/index.spec.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\ntype Optional<T> = T | null\n\nexport interface Schedule {\n pages: SchedulePage[]\n}\n\nexport interface SchedulePage {\n day: Day\n events: Event[]\n}\n\nexport interface Day {\n id: string\n date: Date\n}\n\nexport int... | typescript | edit | 0 | 0 | apache-2.0 | 9f181b6c00b2581d2eb0d07c4bdf7c51f5e8d4f7 | squanchy-dev/squanchy-firebase,squanchy-dev/squanchy-firebase | functions/src/schedule-view/schedule-view-data.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n'use strict';\n\nexport interface IDataContractsHelper {\n\tversionEndpoint(endpoint: string, versionNumber: number): string;\n}\n\nclass DataContractsHelper implements IDataContractsHelper {\n\tversionEndpoint(endpoint: string, version... | typescript | edit | 0 | 2 | mit | 5929280081f43dceffdb5ba24f724abd87f0ad9c | SamGraber/TypeScript-Angular-Utilities,RenovoSolutions/TypeScript-Angular-Utilities,RenovoSolutions/TypeScript-Angular-Utilities,SamGraber/TypeScript-Angular-Utilities | source/services/dataContracts/dataContractsHelper/dataContractsHelper.service.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport default interface Config {\n tags: string[];\n exports: { [files: string]: string | string[] };\n};\n\n```\n\nApply this change: Make properties in depcop.json optional"
},
{
"role": "assistant",
"content": "exp... | typescript | edit | 0 | 0 | mit | 7f20c7c574ece194dc849e9f973d8b04ced4d4c0 | smikula/good-fences,smikula/good-fences | src/types/Config.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {BrowserWindow} from 'electron'\n\nimport Stats from './stats'\n\nexport default class AppWindow {\n private window: Electron.BrowserWindow\n private stats: Stats\n\n public constructor(stats: Stats) {\n\n this.window = new... | typescript | edit | 0 | 2 | mit | 33cbef3840faea210b52f8d49d54416059b1ae67 | BugTesterTest/desktops,j-f1/forked-desktop,kactus-io/kactus,shiftkey/desktop,hjobrien/desktop,kactus-io/kactus,say25/desktop,say25/desktop,desktop/desktop,kactus-io/kactus,hjobrien/desktop,artivilla/desktop,gengjiawen/desktop,gengjiawen/desktop,desktop/desktop,BugTesterTest/desktops,gengjiawen/desktop,j-f1/forked-deskt... | src/main-process/app-window.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from 'react';\nimport { OverlayTrigger, Tooltip } from 'react-bootstrap';\n\nimport './bookmarkStar.less';\n\nexport interface Props {\n active: boolean;\n callback?: () => any;\n}\n\nfunction BookmarkStar({active, c... | typescript | edit | null | null | apache-2.0 | 95b60c5acc2888398e9562ba4bc97d94b4ad90cb | polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon | client/src/components/bookmarkStar.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\ninterface BackwardsCompatChartView {\n prototype: {\n containerSelector(): string;\n container_selector(): string;\n createValueFormatter(): (value: number) => string;\n isEmpty(): boolean;\n is_empty(): boolean;\n ma... | typescript | edit | 0 | 1 | mit | 0d77a616d7877d0a8f5af383652d6619e0d6a5cd | quintel/etmodel,quintel/etmodel,quintel/etmodel,quintel/etmodel | app/javascript/charts/utils/backwardsCompat.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport styled from 'styled-components'\n\nimport { Intro, CheckboxTree } from './components'\nimport data from './data/data.json'\nimport github from './assets/github.svg'\n\nconst Main = styled.main`\n display: flex;\n flex-direction... | typescript | edit | null | null | mit | 2a316f5e2906eb9bc0d57618a980e5fbccd62e17 | joelgeorgev/react-checkbox-tree,joelgeorgev/react-checkbox-tree | src/App.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport Knex from 'knex';\nimport {\n Identifiable,\n ConnectorConstructor,\n ModelStatic,\n ModelConstructor,\n Bindings\n} from '@next-model/core';\n\nexport class NextModelKnexConnector<S extends Identifiable> implements Connecto... | typescript | edit | 0 | 2 | mit | 1f5920428392356903155634cb8fd90af06da62e | tamino-martinius/node-next-model-knex-connector | src/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Injectable } from '@angular/core';\nimport { Http } from '@angular/http';\nimport { Camera, CameraOptions } from '@ionic-native/camera';\nimport { Observable } from 'rxjs/Observable';\nimport 'rxjs/add/operator/map';\nimport 'r... | typescript | edit | 0 | 1 | mit | c81edb9e1a4984dd6811b5a4b2777b0319d7b73a | IMSmobile/app,IMSmobile/app,IMSmobile/app,IMSmobile/app | src/providers/camera-service.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport interface ChoiceJsonObject {\n selected: boolean,\n feedback: string,\n hasFixedScore: boolean,\n fixedScore: number,\n criteriumId: string,\n levelId: string\n}\n\nexport default class Choice {\n public sele... | typescript | edit | 0 | 2 | mit | 1f7f0676fb07ffa274b1d12ef7ecd5b066938163 | cosnics/cosnics,cosnics/cosnics,forelo/cosnics,cosnics/cosnics,forelo/cosnics,cosnics/cosnics,cosnics/cosnics,forelo/cosnics,forelo/cosnics,forelo/cosnics,cosnics/cosnics,cosnics/cosnics,forelo/cosnics,forelo/cosnics,forelo/cosnics,cosnics/cosnics | src/Chamilo/Core/Repository/ContentObject/Rubric/Resources/Source/src/Domain/Choice.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Directive, Input, HostListener, Renderer, ElementRef, DoCheck } from '@angular/core';\nimport { TreeDraggedElement } from '../models/tree-dragged-element.model';\n\nconst DRAG_OVER_CLASS = 'is-dragging-over';\n\n@Directive({\n ... | typescript | edit | 0 | 2 | mit | df91a63fa9b2504e95d4bec159c216cda45ff852 | 500tech/angular2-tree-component,Alexey3/angular-tree-component,sm-allen/angular-tree-component,500tech/angular2-tree-component,sm-allen/angular-tree-component,Alexey3/angular-tree-component,sm-allen/angular-tree-component,500tech/angular2-tree-component,Alexey3/angular-tree-component | lib/directives/tree-drag.directive.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Injectable } from \"@angular/core\";\n\nexport interface LaddaConfigArgs {\n style?: string;\n spinnerSize?: number;\n spinnerColor?: string;\n spinnerLines?: number;\n}\n\nexport let configAttributes: {[key: string... | typescript | edit | 0 | 1 | mit | cf7169db9e658bdab086dbc7f4761f3629e85a9f | moff/angular2-ladda,moff/angular2-ladda | module/ladda-config.ts | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.