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 { Link, LockIcon } from \"@artsy/palette\"\nimport { SecurePayment_artwork } from \"__generated__/SecurePayment_artwork.graphql\"\nimport React from \"react\"\nimport { createFragmentContainer } from \"react-relay\"\nimport { gra...
typescript
edit
null
null
mit
8b0f10e13406cf8e6406a9f36d676bd3232af55c
artsy/reaction-force,artsy/reaction,artsy/reaction,xtina-starr/reaction,xtina-starr/reaction,artsy/reaction-force,xtina-starr/reaction,xtina-starr/reaction,artsy/reaction
src/Apps/Artwork/Components/TrustSignals/SecurePayment.tsx
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { PropMetadata, PropMetadataSym, ModelPropertiesSym } from '../core/metadata';\nimport * as sequelize from 'sequelize';\nimport 'reflect-metadata';\n\nexport function Prop(propMeta?: PropMetadata) {\n let meta = propMeta || {};...
typescript
edit
0
9
mit
36518e0a8b4c9bfca10ccda758c525c36c743aed
miter-framework/miter,miter-framework/miter
src/decorators/prop.decorator.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\n/**\n * @license\n * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You...
typescript
edit
0
0
apache-2.0
daeae314faed84b03f0d9f4ddb6ab8aeed410593
PolymerLabs/incremental-dom,google/incremental-dom,PolymerLabs/incremental-dom,google/incremental-dom,google/incremental-dom,jridgewell/incremental-dom,sparhami/incremental-dom,jridgewell/incremental-dom,sparhami/incremental-dom,sparhami/incremental-dom,jridgewell/incremental-dom,sparhami/incremental-dom,PolymerLabs/in...
src/types.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'my-app',\n template: '<div class=\"form-group\">' +\n '<h1>To-Do <small>List</small></h1>' +\n '<form role=\"form\">'+\n '<input type=\"text\" ...
typescript
edit
0
3
mit
713b29eb1094c3c09ac210c2abbbfc70a3f37f3d
zainmustafa/angular2-do,zainmustafa/angular2-do,zainmustafa/angular2-do
app/app.component.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { AppComponent } from './app.component';\n\nimport { async, ComponentFixture, TestBed } from '@angular/core/testing';\nimport { By } from '@angular/platform-browser';\nimport { DebugElement } from '@angular/core';\n\nde...
typescript
edit
0
1
mit
7bb6efec162f81422076428b3972d83a418a5929
briggySmalls/late-train-mate,briggySmalls/late-train-mate,briggySmalls/late-train-mate
src/app/app.component.spec.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport * as React from 'react';\nimport { Modal } from 'react-bootstrap';\nimport { connect } from 'react-redux';\n\nimport { angular2react } from '@waldur/shims/angular2react';\n\nimport { closeModalDialog } from './actions';\nimport '...
typescript
edit
null
null
mit
51b0a20699657a6c50a6063d503dc493adeb4922
opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport
src/modal/ModalRoot.tsx
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport * as React from 'react'\nimport { IAutocompletionProvider } from './index'\n\n/** Autocompletion provider for emoji. */\nexport default class EmojiAutocompletionProvider implements IAutocompletionProvider<string> {\n private emo...
typescript
edit
null
null
mit
43be48871a57c83cfb8d824ccacc55c719f43121
hjobrien/desktop,j-f1/forked-desktop,BugTesterTest/desktops,j-f1/forked-desktop,j-f1/forked-desktop,say25/desktop,say25/desktop,gengjiawen/desktop,hjobrien/desktop,say25/desktop,kactus-io/kactus,gengjiawen/desktop,shiftkey/desktop,artivilla/desktop,artivilla/desktop,BugTesterTest/desktops,say25/desktop,j-f1/forked-desk...
app/src/ui/autocompletion/emoji-autocompletion-provider.tsx
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { FunctionLikeDeclaration, Identifier, TypeReferenceNode } from 'typescript';\nimport { Context } from '../contexts';\nimport { EmitResult, emit } from './';\n\nconst emitFunctionDeclaration = (node: FunctionLikeDeclaration, cont...
typescript
edit
0
1
mit
ff74c2839477ef9e4836f4eebde037f2390338e4
AmnisIO/typewriter,AmnisIO/typewriter,AmnisIO/typewriter
src/emitter/declarations.ts
rejected_duplicate
Near-duplicate of sample 112702
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport React, { ReactElement } from 'react';\nimport { Card } from 'react-bootstrap';\nimport { ResultDocument } from '../../api/result';\nimport DocumentTeaser from '../document/DocumentTeaser';\n\n\nexport default function DocumentHie...
typescript
edit
null
null
apache-2.0
e66b260258fa0930ac598d33e03fda2c8dbd8a76
dainst/idai-field-web,dainst/idai-field-web,dainst/idai-field-web
ui/src/shared/documents/DocumentHierarchyHeader.tsx
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { } from 'jasmine';\nimport app from '../index-jsx';\n\nconst model = 'x';\nconst view = _ => <div>{_}</div>;\nconst update = {\n hi: (_, val) => val\n}\n\ndescribe('vdom-jsx', () => {\n\n let element;\n beforeEach(()=>{\n ...
typescript
edit
null
null
mit
5931c9fa6cca60c58b9a96a128626148dc343d16
yysun/apprun,yysun/apprun,yysun/apprun
tests/vdom_jsx.spec.tsx
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { Component, Host, Input, OnInit, Optional } from '@angular/core';\nimport { Preference } from '../../services/preference/types';\nimport { PreferenceGroupComponent } from '../preference-group/preference-group.component';\nimport...
typescript
edit
0
0
apache-2.0
3f2d9f176a30cf3c0e475355b00a4b43648fb7b7
googleinterns/guide-doge,googleinterns/guide-doge,googleinterns/guide-doge
src/components/preference-item/preference-item.component.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport {ISolution} from '../solution.interface';\n\nexport class Solution implements ISolution<string, string> {\n static CHARS = \"0123456789abcdef\";\n\n solve(input: string) {\n var pairs = {};\n for (var c = 0; c < Solution....
typescript
edit
0
2
unlicense
3d2ee519360a78e425fbd7b4c8fa098878b94843
Jameskmonger/challenges
problems/complementary-colours/solution.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport Component from \"inferno-component\"\n\nexport default class App extends Component<{}, {}> {\n render() {\n return <div>Hello, Inferno</div>\n }\n}\n```\n\nApply this change: Add react lib to example" }, { "r...
typescript
edit
null
null
mit
1d9da65138dd2005e5abb7f3808dcab14c51f7a1
wizawu/1c,wizawu/1c,wizawu/1c,wizawu/1c
example/js/components/App.tsx
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { Component, OnInit } from '@angular/core';\n\ndeclare var electron: any;\n@Component({\n selector:'<dashboard>',\n templateUrl: 'app/dashboard/template.html',\n styleUrls: ['app/dashboard/style.css']\n})\nexport class D...
typescript
edit
0
2
mit
e0b1354f5cdb4a74a8ef1d4c2497802a3b45f5d0
FreeMasen/time.manager,FreeMasen/time.manager,FreeMasen/time.manager
app/dashboard/component.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\n\nimport { ProductService } from 'app/services/product.service';\n\n@Component({\n selector: 'app-product-new',\n templateU...
typescript
edit
0
1
mit
f9ad4fa11618ee94a22ad4c2c136071b2f18a1ca
petrstehlik/pyngShop,petrstehlik/pyngShop,petrstehlik/pyngShop,petrstehlik/pyngShop
www/src/app/components/product-new/product-new.component.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport SettingData, { DefaultSettingData } from '../shared/SettingData';\n\nexport const load = async(): Promise<SettingData> => {\n let { settings } = await browser.storage.local.get('settings');\n if (!settings) {\n return Defaul...
typescript
edit
0
3
mit
67e02cd9cb772a6b37e0d0fff3131d8ef4657d45
ueokande/vim-vixen,ueokande/vim-vixen,ueokande/vim-vixen
src/settings/storage.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport 'reflect-metadata';\nimport React from 'react';\nimport { Container } from 'libs/typedi';\nimport { render } from 'react-dom';\nimport { configure } from 'mobx';\nimport { enableLogging } from 'mobx-logger';\n\nimport { registerS...
typescript
edit
null
null
mit
10125540ce3ee3e1ee8c3d441cbf29e264b80ded
cannoneyed/fiddle,cannoneyed/fiddle,cannoneyed/fiddle
app/index.tsx
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport {GithubRepo} from '../../models/githubAppModel';\nimport {AppPlugin, settings} from '../github-app-settings';\n\nimport {addLabels, deleteLabels} from './manage-github-labels';\n\n// TODO: Conditional types might allow us to defi...
typescript
edit
0
4
apache-2.0
cfc4b9d955a26606a554e210f4914829181b5267
PolymerLabs/project-health,PolymerLabs/project-health,PolymerLabs/project-health
src/server/controllers/settings/priority-issues.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\n'use strict';\n\nconst isBrowser = new Function('try {return this===window;}catch(e){return false;}');\n\nlet useES6 = false;\nif (!isBrowser()) {\n const fs = require('fs');\n useES6 = process.env.ES6 === 'true';\n if (!useES6...
typescript
edit
0
3
mit
3f0a3521c14d424bc594e93f8a652c61a2fe2d1f
thiagobustamante/typescript-ioc,thiagobustamante/typescript-ioc
src/index.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { NgModule, ModuleWithProviders } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DeviceDetectorService } from './device-detector.service';\n\n@NgModule({\n imports: [\n CommonModule\n ]\n})\...
typescript
edit
0
1
mit
fd5d03cf3d96354b69adedb6cd9adaf5675adcc9
KoderLabs/ng2-device-detector,KoderLabs/ng2-device-detector
src/index.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport areIntlLocalesSupported from 'intl-locales-supported'\n\nexport const importIntlPolyfill = async () => {\n const IntlPolyfill = await import('intl')\n global.Intl = IntlPolyfill.default\n}\n\nexport const checkForIntlPolyfill =...
typescript
edit
0
4
mit
7920a0fe8af72b859b08292beff808f5debe0dd5
DivanteLtd/vue-storefront,pkarw/vue-storefront,pkarw/vue-storefront,DivanteLtd/vue-storefront,pkarw/vue-storefront,DivanteLtd/vue-storefront,DivanteLtd/vue-storefront,pkarw/vue-storefront
core/i18n/intl.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nexport default (blob: Blob) =>\n new Promise<string>((resolve, reject) => {\n const reader = new FileReader()\n reader.readAsDataURL(blob)\n\n reader.onloadend = function() {\n let result = reader.resu...
typescript
edit
0
2
mit
dba1a0bf176a11bf291ee49debb8e4a0d7169514
WorldBrain/WebMemex,WorldBrain/WebMemex
src/util/encode-blob.ts
rejected_duplicate
Near-duplicate of sample 113639
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport minecraftData from \"minecraft-data\";\nimport { Plugin } from \"mineflayer\";\n\nimport { IndexedData } from \"./types\";\nimport { isArmor } from \"./lib/isArmor\";\nimport { equipItem } from \"./lib/equipItem\";\n\nconst initi...
typescript
edit
0
8
mit
1e9287bc4ffefebb04aeb47e43283c15f977fcfb
G07cha/MineflayerArmorManager
src/index.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nexport class DnDCharacter {\n public static generateAbilityScore(): number {\n return DnDCharacter.randomInt(3, 18)\n }\n\n public static getModifierFor(abilityValue: number): number {\n return Math.floor((abilityValue - 10) / ...
typescript
edit
0
1
mit
a3988f34b21e8c7b4ddf5fb7e12b29495344e874
rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism
typescript/dnd-character/dnd-character.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport React from \"react\";\nimport { setInputCode } from \"../Terminal/InputField\";\n\nexport function ClickablePre({ children }: { children: any }) {\n return (\n <pre className=\"clickable\">\n <code\n onClick={() =...
typescript
edit
null
null
apache-2.0
3798faec825f0e91bed983078c4191a0d2f83563
calebegg/proof-pad,calebegg/proof-pad,calebegg/proof-pad,calebegg/proof-pad,calebegg/proof-pad
src/tutorial/ClickablePre.tsx
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { Handler } from 'express'\n\ndeclare interface GuardOptions {\n requestProperty?: string\n permissionsProperty?: string\n}\n\ndeclare class Guard {\n public constructor(options: GuardOptions);\n\n public check(required: stri...
typescript
edit
0
1
mit
fc04f441d63552afe7ff0a4c9331675b60f4333e
MichielDeMey/express-jwt-permissions
index.d.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\n/// <reference path=\"common.ts\"/>\n\nenum LicenseType {\n\t'CC0',\n\t'CC BY',\n\t'CC BY-SA',\n\t'CC BY-NC',\n\t'CC BY-NC-SA',\n\t'PRIVATE'\n}\n\ninterface GooObject {\n\tid: string;\n\tname: string;\n\tlicense: LicenseType;\n\torigina...
typescript
edit
0
0
mit
b476edaa4513e57cae60e4b25319c82cdb96f2bc
GooTechnologies/datamodel,GooTechnologies/datamodel,GooTechnologies/datamodel
schema/2.0/gooobject.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport React from 'react';\nimport { Route, Switch } from 'react-router-dom';\nimport { TtagLocaleMap } from 'proton-shared/lib/interfaces/Locale';\nimport StandardPublicApp from './StandardPublicApp';\nimport MinimalLoginContainer from...
typescript
edit
null
null
mit
171debaa57137401c400b46967cb281261ea1169
ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient
packages/components/containers/app/StandalonePublicApp.tsx
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport {buildHelper as helper, taskRunner} from \"../Container\";\nconst gulp = require(\"gulp\");\nconst run = require(\"gulp-run\");\nimport * as path from \"path\";\n\nexport default function Test() {\n let settings = helper.getSe...
typescript
edit
0
1
mit
f9f23f6d8047b9b673ccc6e6d4efd8e83f9049dc
mtfranchetto/smild,mtfranchetto/smild,mtfranchetto/smild
lib/tasks/Test.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
f065a26e8120a4c2a4faedec652606478627aafa
OmniSharp/omnisharp-vscode,gregg-miskelly/omnisharp-vscode,OmniSharp/omnisharp-vscode,OmniSharp/omnisharp-vscode,gregg-miskelly/omnisharp-vscode,gregg-miskelly/omnisharp-vscode,OmniSharp/omnisharp-vscode,gregg-miskelly/omnisharp-vscode,OmniSharp/omnisharp-vscode
src/observers/InformationMessageObserver.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\n/// Copyright 2014-2015 Red Hat, Inc. and/or its affiliates\n/// and other contributors as indicated by the @author tags.\n///\n/// Licensed under the Apache License, Version 2.0 (the \"License\");\n/// you may not use this file except ...
typescript
edit
0
0
apache-2.0
e710414fed3b6eb03e386be63ee10d9f294daf20
hawkular/hawkular-ui-components,ammendonca/hawkular-ui-components,hawkular/hawkular-ui-components,mtho11/hawkular-ui-components,mtho11/hawkular-ui-components,ammendonca/hawkular-ui-components,mtho11/hawkular-ui-components,hawkular/hawkular-ui-components,ammendonca/hawkular-ui-components,mtho11/hawkular-ui-components,am...
plugins/metrics/plugins/metrics/ts/metricsGlobals.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport * as DockerClient from 'dockerode'\n\nexport default function getDockerClient(host: Concierge.Host, timeout?: number) {\n // If no hostname is provided, try and use the local unix socket\n if (!host.hostname) {\n const docke...
typescript
edit
0
6
mit
f00882f6811a6787cbe46192d4447529975b61b7
paypac/node-concierge,the-concierge/concierge,paypac/node-concierge,paypac/node-concierge,paypac/node-concierge,the-concierge/concierge,the-concierge/concierge
src/api/docker.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RouterModule, Routes } from '@angular/router';\nimport { PostComponent } from './post/post.component';\nimport { PostListComponent } fr...
typescript
edit
0
0
apache-2.0
b15e10713dd8ce9fc687c6f5816b7d1d0a40162a
jbrowneuk/jblog,jbrowneuk/jblog,jbrowneuk/jblog,jbrowneuk/jblog
src/app/journal/journal.module.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport React from 'react';\nimport { css } from 'react-emotion';\n\nexport const NotApproved = () => (\n <div\n className={css`\n padding: 2rem;\n `}>\n <h1>Come back later!</h1>\n <p>Thanks for registering!</p>\n <...
typescript
edit
null
null
mit
a6daa370ec92bbec5217e4f7d03951a66ac6b9fd
CodeForCharlotte/CMPD-Holiday-Gift,CodeForCharlotte/CMPD-Holiday-Gift,CodeForCharlotte/cmpd-holiday-gift-backend,CodeForCharlotte/CMPD-Holiday-Gift,CodeForCharlotte/cmpd-holiday-gift-backend,CodeForCharlotte/cmpd-holiday-gift-backend,CodeForCharlotte/CMPD-Holiday-Gift
frontend/applications/auth/src/modules/register/NotApproved.tsx
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```typescript\n/**\n * Represents an Exception\n */\nexport class Exception extends Error\n{\n /**\n * A collection of key/value pairs that provide additional user-defined information about the exception.\n */\n private data: any[];\n\n ...
typescript
edit
0
2
mit
df950abe97b2b5006ed072b855bfb9eb6e159792
manuth/MarkdownConverter,manuth/MarkdownConverter,manuth/MarkdownConverter
src/System/Exception.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport * as React from 'react'\nimport { User } from '../../models/user'\nimport { DialogContent } from '../dialog'\n\ninterface IAdvancedPreferencesProps {\n readonly user: User | null\n}\n\ninterface IAdvancedPreferencesState {\n re...
typescript
edit
null
null
mit
efc98c4bd9054b8876a87715ce876a0e8a55a331
j-f1/forked-desktop,BugTesterTest/desktops,artivilla/desktop,shiftkey/desktop,desktop/desktop,BugTesterTest/desktops,BugTesterTest/desktops,artivilla/desktop,kactus-io/kactus,hjobrien/desktop,desktop/desktop,kactus-io/kactus,kactus-io/kactus,say25/desktop,say25/desktop,shiftkey/desktop,say25/desktop,hjobrien/desktop,Bu...
app/src/ui/preferences/advanced.tsx
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { SearchOptions, SearchSort } from '../types';\r\nimport { WorkerSearchParams, WorkerSortParam } from '../worker-mturk-api';\r\n\r\nexport const generateParams = (options: SearchOptions): WorkerSearchParams => {\r\n const { sort...
typescript
edit
0
4
mit
78fb4e244f8d5da57c548900171a3905614748d8
Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine
src/utils/searchOptions.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { fileURLToPath, URL } from 'url';\n\nexport function pathify(path: string): string {\n if (path.startsWith('file://')) {\n path = fileURLToPath(path);\n }\n return path;\n}\n\nexport function instantiateEmscriptenWasm<T ex...
typescript
edit
0
3
apache-2.0
92f52319dae6539307fd071d27c1d8fa8b9d9212
GoogleChromeLabs/squoosh,GoogleChromeLabs/squoosh,GoogleChromeLabs/squoosh,GoogleChromeLabs/squoosh,GoogleChromeLabs/squoosh,GoogleChromeLabs/squoosh
libsquoosh/src/emscripten-utils.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { Component, OnInit } from '@angular/core';\nimport { SocialAuthService, GoogleLoginProvider, SocialUser } from \"angularx-social-login\";\nimport { UserService } from \"../user.service\";\n\n@Component({\n selector: 'app-authen...
typescript
edit
0
1
apache-2.0
d4427654ef34a5ebe0383fff4604f65c6a9136d1
googleinterns/step263-2020,googleinterns/step263-2020,googleinterns/step263-2020,googleinterns/step263-2020
capstone-project/src/main/angular-webapp/src/app/authentication/authentication.component.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nexport interface CustomerSearchOptions {\n /**\n * Text to search for in the shop's customer data.\n */\n query: string;\n\n /**\n * Set the field and direction by which to order results.\n */\n order: string;\n}\n```\n\nApp...
typescript
edit
0
0
mit
66a00f1b72c2f82ebdbd2945698daaf0f8068b42
nozzlegear/Shopify-Prime
options/customers.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { Tree } from '@angular-devkit/schematics';\nimport { SchematicTestRunner } from '@angular-devkit/schematics/testing';\nimport * as path from 'path';\n\n\nconst collectionPath = path.join(__dirname, '../collection.json');\n\n\nde...
typescript
edit
0
1
mit
d8ba97f7e711036d9d90cff76dcabd227fad2bd6
hansl/devkit,hansl/devkit,hansl/devkit,hansl/devkit
packages/schematics/schematics/blank/schematic-files/src/__name@dasherize__/index_spec.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\n/* tslint:disable:no-unused-variable */\n\nimport { TestBed, async } from '@angular/core/testing';\nimport { AppComponent } from './app.component';\n\ndescribe('App: D3Ng2Demo', () => {\n beforeEach(() => {\n TestBed.configureTestin...
typescript
edit
0
1
mit
ae5598fc2315e9e14aa6bf8195677faca1ba86f2
tomwanzek/d3-ng2-demo,tomwanzek/d3-ng2-demo,ardadurak/map_visualisation,ardadurak/map_visualisation,tomwanzek/d3-ng2-demo,ardadurak/map_visualisation
src/app/app.component.spec.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { WATCHER_FOLDER_EDIT, CREATE_WATCHER_FOLDER } from '../constants/index';\r\nimport { WatcherFolder } from '../types';\r\n\r\nexport interface EditWatcherFolder {\r\n readonly type: WATCHER_FOLDER_EDIT;\r\n readonly folderId: s...
typescript
edit
0
1
mit
9fcc6a7e9417011ce641d8790b4cd98bfc9176a6
Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine
src/actions/watcherFolders.ts
accepted
null
true
[ { "role": "user", "content": "Write typescript code for the following: Update specifying disallowimplicitany flag in the old test file." }, { "role": "assistant", "content": "//@disallowimplicitany: true\r\ntry { } catch (error) { } // Shouldn't be an error\r\nfor (var key in this) { } // Should...
typescript
new_file
0
0
apache-2.0
aa164beead2703786e211446e368cb239bee20f9
fdecampredon/jsx-typescript-old-version,popravich/typescript,popravich/typescript,hippich/typescript,mbrowne/typescript-dci,mbrowne/typescript-dci,hippich/typescript,fdecampredon/jsx-typescript-old-version,mbrowne/typescript-dci,hippich/typescript,mbebenita/shumway.ts,mbrowne/typescript-dci,popravich/typescript,mbebeni...
tests/cases/compiler/implicitAnyInCatch.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { Component, createElement } from \"react\";\nimport { Switch } from \"./components/Switch\";\nimport { SwitchContainerProps } from \"./components/SwitchContainer\";\n\nimport * as css from \"./ui/Switch.sass\";\n\n// tslint:disa...
typescript
edit
0
3
apache-2.0
82e27fd2744bfebd479932978e4a0b3db3639714
FlockOfBirds/boolean-slider,FlockOfBirds/boolean-slider
src/Switch.webmodeler.ts
accepted
null
true
[ { "role": "user", "content": "Write typescript code for the following: Add properties used in HsCore to HsConfig type def" }, { "role": "assistant", "content": "export class HsConfig {\n componentsEnabled: any;\n mapInteractionsEnabled: boolean;\n allowAddExternalDatasets: boolean;\n sidebar...
typescript
new_file
0
1
mit
950ae711e2b38f0e5439e0d69f1f7803d23031ed
hslayers/hslayers-ng,hslayers/hslayers-ng,hslayers/hslayers-ng,hslayers/hslayers-ng
config.service.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { DEFAULT_LOCALE } from '../constants';\nimport { TtagLocaleMap } from '../interfaces/Locale';\n\n/**\n * Gets the first specified locale from the browser, if any.\n */\nexport const getBrowserLocale = () => {\n return window....
typescript
edit
0
3
mit
5f27c645b990725e1eeba0313d2871858171415a
ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient
packages/shared/lib/i18n/helper.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport * as Koa from 'koa';\nimport summaly from 'summaly';\n\nmodule.exports = async (ctx: Koa.Context) => {\n\tconst summary = await summaly(ctx.query.url);\n\tsummary.icon = wrap(summary.icon);\n\tsummary.thumbnail = wrap(summary.thu...
typescript
edit
0
4
mit
f40e1ff0cc793e60ae72bdc430c24e372cd86015
syuilo/Misskey,syuilo/Misskey,Tosuke/misskey,ha-dai/Misskey,Tosuke/misskey,ha-dai/Misskey,Tosuke/misskey,Tosuke/misskey,Tosuke/misskey
src/server/web/url-preview.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport * as React from 'react'\n\nimport { Commit } from '../../models/commit'\nimport { RichText } from '../lib/rich-text'\nimport { RelativeTime } from '../relative-time'\nimport { Button } from '../lib/button'\n\ninterface IUndoCommi...
typescript
edit
null
null
mit
a3acfb6cbad2da0a11b8cad55617aaffe58d53a9
j-f1/forked-desktop,hjobrien/desktop,gengjiawen/desktop,desktop/desktop,j-f1/forked-desktop,desktop/desktop,kactus-io/kactus,say25/desktop,gengjiawen/desktop,gengjiawen/desktop,gengjiawen/desktop,BugTesterTest/desktops,kactus-io/kactus,artivilla/desktop,shiftkey/desktop,artivilla/desktop,say25/desktop,j-f1/forked-deskt...
app/src/ui/changes/undo-commit.tsx
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { Component } from '@angular/core';\nimport { AlertService } from '../../shared/alert/services/alert.service';\n\n@Component({\n selector: 'sign-in',\n templateUrl: './sign-in.component.html',\n})\nexport class SignInCompon...
typescript
edit
0
1
mit
b04edae16d6ff5fe7c256467513282ee01c94c4a
denismaster/dcs,denismaster/dcs,denismaster/dcs,denismaster/dcs
src/Diploms.WebUI/ClientApp/app/components/sign-in/sign-in.component.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport {VoidHook} from \"../tasks/Hooks\";\n\nexport default {\n projectType: \"frontend\",\n port: 5000,\n liveReloadPort: 35729,\n distribution: \"dist\",\n targets: \"targets\",\n bootstrapperStyles: \"\",\n wat...
typescript
edit
0
0
mit
748d079a88ee824530895a2cb5c477dc5e9af4d3
mtfranchetto/smild,mtfranchetto/smild,mtfranchetto/smild
lib/settings/DefaultSettings.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { IUser } from '../users';\nimport { RoomType } from './RoomType';\n\nexport interface IRoom {\n id: string;\n name: string;\n type: RoomType;\n creator: IUser;\n usernames: Array<string>;\n isDefault?: boolean;...
typescript
edit
0
0
mit
9f6940b764a76819d7dfb628840f0aaa97120040
graywolf336/temporary-rocketlets-ts-definition,graywolf336/temporary-rocketlets-ts-definition
src/rooms/IRoom.ts
accepted
null
true
[ { "role": "user", "content": "Write typescript code for the following: Add test for sign-in service" }, { "role": "assistant", "content": "/* tslint:disable:no-unused-variable */\n\nimport { TestBed, async, inject } from '@angular/core/testing';\nimport { SignInService } from './sign-in.service'...
typescript
new_file
0
1
bsd-2-clause
444267870d01712bb34f4795ecf9bc8f377066ae
crdschurch/crds-signin-checkin,crdschurch/crds-signin-checkin,crdschurch/crds-signin-checkin,crdschurch/crds-signin-checkin
front_end/src/app/admin/sign-in/sign-in.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.15.1',\n RELEASEVERSION: '...
typescript
edit
0
0
mit
897ec5a3797b1d07dcccd4da13b06a2fdc064b90
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 113627
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { Router } from '@angular/router';\nimport { Component, OnInit } from '@angular/core';\n\n@Component({\n\tselector: 'app-page-not-found',\n\ttemplateUrl: './page-not-found.component.html',\n})\nexport class PageNotFoundComponent ...
typescript
edit
0
1
mit
946deec8d28aef5509387ec10fe2b65e21862b32
Chan4077/angular-rss-reader,Chan4077/angular-rss-reader,Chan4077/angular-rss-reader
src/app/page-not-found/page-not-found.component.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\n/// <reference path=\"index.d.ts\" />\n/// <reference path=\"../jquery/index.d.ts\" />\n\nvar pattern = GeoPattern.generate('GitHub');\npattern.toDataUrl();\n\n$('#geopattern').geopattern('GitHub');\n\n```\n\nApply this change: [geopatt...
typescript
edit
0
0
mit
514967660f23e5a6bd4f87477b5dafdc1d612abf
scriby/DefinitelyTyped,YousefED/DefinitelyTyped,arusakov/DefinitelyTyped,AgentME/DefinitelyTyped,AbraaoAlves/DefinitelyTyped,rolandzwaga/DefinitelyTyped,YousefED/DefinitelyTyped,AbraaoAlves/DefinitelyTyped,georgemarshall/DefinitelyTyped,abbasmhd/DefinitelyTyped,georgemarshall/DefinitelyTyped,mcrawshaw/DefinitelyTyped,a...
geopattern/geopattern-tests.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\n/**\n * Created by Samuel Gratzl on 19.01.2017.\n */\n\nimport {AVectorColumn, IStringVector} from './AVectorColumn';\nimport {EOrientation} from './AColumn';\nimport {mixin} from 'phovea_core/src/index';\nimport {IMultiFormOptions} fro...
typescript
edit
0
1
bsd-3-clause
a5007fb1e7f5c146251d5ceb55957fda50b72954
Caleydo/mothertable,Caleydo/mothertable,Caleydo/mothertable
src/column/StringColumn.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport assert from 'assert'\nimport { messages, IdGenerator } from '@cucumber/messages'\nimport Search from '../../src/search/Search'\nimport { makeFeature, makeScenario, makeStep } from './utils'\nimport Parser from '@cucumber/gherkin/...
typescript
edit
0
1
mit
04c4b432669d3fe2ee8f6b9304cea1a766417972
cucumber/cucumber,cucumber/cucumber,cucumber/cucumber,cucumber/cucumber,cucumber/cucumber,cucumber/cucumber,cucumber/cucumber,cucumber/cucumber,cucumber/cucumber,cucumber/cucumber,cucumber/cucumber,cucumber/cucumber
react/javascript/test/search/FilteringTest.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport {css} from '@microsoft/fast-element';\nimport {display} from '@microsoft/fast-foundation';\nimport {\n\tdensity,\n\tdesignUnit,\n\ttypeRampBaseFontSize,\n\ttypeRampBaseLineHeight,\n} from '../design-tokens';\n\nexport const Panel...
typescript
edit
0
0
mit
fbfc00ab194b77a10182c61316e8a62de1118ff7
microsoft/vscode-webview-ui-toolkit,microsoft/vscode-webview-ui-toolkit,microsoft/vscode-webview-ui-toolkit
src/panels/panel-view.styles.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport React from 'react';\nimport { registerComponent } from '../../lib/vulcan-lib';\nimport Popper from '@material-ui/core/Popper';\n\nconst styles = (theme: ThemeType): JssStyles => ({\n root: {\n position:\"relative\",\n zInd...
typescript
edit
null
null
mit
49abb3186eebe50b16003998c71ea8440c66bc88
Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2
packages/lesswrong/components/sunshineDashboard/SidebarHoverOver.tsx
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport * as path from 'path';\nimport * as Mocha from 'mocha';\nimport * as glob from 'glob';\n\nexport function run(): Promise<void> {\n\t// Create the mocha test\n\tconst mocha = new Mocha({\n\t\tui: 'tdd'\n\t});\n\tmocha.useColors(tr...
typescript
edit
0
3
mit
cbab3e575fa2e58ef1d12b3c9b524e8e59ec87d8
ipatalas/vscode-postfix-ts,ipatalas/vscode-postfix-ts
test/index.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { Request, Response } from 'express'\nimport { FirebaseApp } from '../firebase'\nimport { firestoreRawCollection } from '../firestore/collection'\nimport { TrackData } from '../firestore/data'\nimport { Track } from './tracks-vie...
typescript
edit
0
2
apache-2.0
f4b17c5ccfc9bbc22d853adc321c568d7cd7fb15
squanchy-dev/squanchy-firebase,squanchy-dev/squanchy-firebase
functions/src/tracks-view/generate-tracks.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport React from 'react';\nimport { MainLogo, SupportDropdown, TopNavbar, Hamburger } from 'react-components';\n\ninterface Props extends React.HTMLProps<HTMLElement> {\n expanded?: boolean;\n onToggleExpand: () => void;\n}\n\nco...
typescript
edit
null
null
mit
2ffb30dc60090535f0eddcf3fe631f6cb524b824
ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient
applications/vpn-settings/src/app/components/layout/PrivateHeader.tsx
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { DebugSession } from \"vscode-debugadapter\";\nimport { DartDebugSession } from \"./dart_debug_impl\";\nimport { DartTestDebugSession } from \"./dart_test_debug_impl\";\nimport { FlutterDebugSession } from \"./flutter_debug_impl...
typescript
edit
0
0
mit
22f2ca89704a9740c30d6a96007489b2b9f7ce02
Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code
src/debug/debug_entry.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { IList } from \"../util\";\n\nexport interface IReteNode {\n type:\n | \"join\"\n | \"production\"\n | \"root-join\"\n | \"root\"\n | \"query\"\n | \"negative\"\n | \"accumulator\";\n children: IList<IRete...
typescript
edit
0
1
apache-2.0
694beab534d215f7d5c5dbd65abc4598d495c216
tdreyno/satelite,tdreyno/satelite
packages/satelite/src/rete/nodes/ReteNode.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport * as React from 'react';\n\nconst headerStyle: React.CSSProperties = {\n color: 'white',\n fontSize: '1.2em',\n fontWeight: 'bold',\n paddingLeft: '20px',\n height: '20px',\n display: 'block'\n}\n\nconst NavItem...
typescript
edit
null
null
mit
f12927c0e3d0a3319fe0e7696af600be3843c3fc
the-concierge/concierge,the-concierge/concierge,the-concierge/concierge,paypac/node-concierge,paypac/node-concierge,paypac/node-concierge,paypac/node-concierge
front/react/components/header/nav-item.tsx
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { useParams } from 'react-router';\nimport useFeature from '../../../../hooks/api/getters/useFeature/useFeature';\nimport MetricComponent from '../../view/metric-container';\nimport { useStyles } from './FeatureMetrics.styles';\n...
typescript
edit
null
null
apache-2.0
e1b67a49111cdb67c6b4a6b2ea15c4d3736e6dbb
Unleash/unleash-frontend,Unleash/unleash-frontend,Unleash/unleash-frontend,Unleash/unleash-frontend
src/component/feature/FeatureView2/FeatureMetrics/FeatureMetrics.tsx
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { ITag } from '../tag';\n\n\nexport interface IFile {\n id: number;\n path: string;\n tags: ITag[];\n}\n\n```\n\nApply this change: Add missing webpath property on IFile" }, { "role": "assistant", "content": "impor...
typescript
edit
0
0
mit
571b6778aef578af5741596e81bf46932b085701
waxe/waxe-image,waxe/waxe-image,waxe/waxe-image,waxe/waxe-image,waxe/waxe-image
angular/src/app/file/file.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport TEBEvent from '../../framework/common/event/TEBEvent';\n\nexport default class PingEvent extends TEBEvent<{msg: string, delay: number}> {\n static type = 'PingEvent';\n type = PingEvent.type;\n}\n\n```\n\nApply this change: Add...
typescript
edit
0
0
mit
2880a37c0abd7fe77c853097b3155c2226dcfb57
olegsmetanin/typescript_babel_react_express,olegsmetanin/typescript_babel_react_express
src/common/events/PingEvent.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\n/**\n * Provides the methods to check if Intl APIs are supported.\n */\nexport class IntlAPI {\n\n public static hasIntl(): boolean {\n const hasIntl: boolean = Intl && typeof Intl === \"object\";\n return hasIntl;\n ...
typescript
edit
0
2
mit
251bafc19a415c4d8731b57dea77765cddb1fd3e
robisim74/angular-l10n,robisim74/angular-l10n,robisim74/angular-l10n,robisim74/angular2localization,robisim74/angular-l10n,robisim74/angular2localization
src/services/intl-api.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\n// Type definitions for @ember/string 3.0\n// Project: https://emberjs.com/api/ember/3.4/modules/@ember%2Fstring, https://github.com/emberjs/ember-string\n// Definitions by: Mike North <https://github.com/mike-north>\n// Definitions: ht...
typescript
edit
0
1
mit
30b155a78e59161b83b87f2faf9bf970f169c6ea
dsebastien/DefinitelyTyped,markogresak/DefinitelyTyped,borisyankov/DefinitelyTyped,georgemarshall/DefinitelyTyped,georgemarshall/DefinitelyTyped,mcliment/DefinitelyTyped,dsebastien/DefinitelyTyped,georgemarshall/DefinitelyTyped,borisyankov/DefinitelyTyped,georgemarshall/DefinitelyTyped
types/ember__string/index.d.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { Injectable } from '@angular/core';\nimport { Actions, Effect } from '@ngrx/effects';\n\nimport { Grid } from '../../main/grid/grid.model';\nimport { Note } from '../../../common/core/note.model';\nimport { PlayerActions } from ...
typescript
edit
0
4
mit
ba708f1311e8c694b672b8964ab61a65e0e658ca
FlatThirteen/flat-thirteen,FlatThirteen/flat-thirteen,FlatThirteen/flat-thirteen
src/client/a1/model/player/player.effects.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport React from 'react';\nimport { PAYMENT_METHOD_TYPE, PAYMENT_METHOD_TYPES } from '@proton/shared/lib/constants';\nimport { c } from 'ttag';\nimport { SubscriptionCheckResponse } from '@proton/shared/lib/interfaces';\n\nimport { Pri...
typescript
edit
null
null
mit
79ec518d1ee2ac102ef98e252af111ef9941857c
ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient
applications/account/src/app/signup/CheckoutButton.tsx
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```typescript\n/*---------------------------------------------------------------------------------------------\n* Copyright (c) Alessandro Fragnani. All rights reserved.\n* Licensed under the MIT License. See License.md in the project root for licen...
typescript
edit
0
3
mit
5cca20305a0771b7d4ce58cedfb78d6ef506290c
alefragnani/vscode-read-only-indicator,alefragnani/vscode-read-only-indicator
src/statusBar/controller.ts
rejected_duplicate
Near-duplicate of sample 114599
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport * as chai from 'chai'\nconst expect = chai.expect\n\nimport { GitProcess } from '../../lib'\nimport * as os from 'os'\n\ndescribe('config', () => {\n it('sets http.sslBackend on Windows', async () => {\n if (process.platform ...
typescript
edit
0
2
mit
2ebaf82a51169d44b4ae0ff4e2480e7b0b2b9f9f
desktop/dugite,desktop/dugite,desktop/dugite
test/fast/config-test.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport * as React from 'react';\nimport ReactScrollIntoViewIfNeeded from 'react-scroll-into-view-if-needed';\n\n() => (\n <ReactScrollIntoViewIfNeeded\n active={true}\n options={{\n block: 'start',\n ...
typescript
edit
null
null
mit
5dcfc57e4f868bd24abcfbd3aee1d741c25e631e
dsebastien/DefinitelyTyped,georgemarshall/DefinitelyTyped,borisyankov/DefinitelyTyped,georgemarshall/DefinitelyTyped,dsebastien/DefinitelyTyped,georgemarshall/DefinitelyTyped,markogresak/DefinitelyTyped,georgemarshall/DefinitelyTyped,mcliment/DefinitelyTyped,borisyankov/DefinitelyTyped
types/react-scroll-into-view-if-needed/react-scroll-into-view-if-needed-tests.tsx
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```typescript\n// demo.ts\n\n\"use strict\";\n\n// The stringType variable can be set to any string\nlet unit: string;\n\n// The stringLiteralType can only be set to the type value\n// as well as Null and Undefined, as of now\nlet miles: \"MILES\";\nm...
typescript
edit
0
0
mit
2f28043e91b7f4dce999a9a196cb242e33473f23
var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training
AngularJSWithTS/UseTypesEffectivelyInTS/StringsInTS/demo.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { Injectable } from '@angular/core';\nimport { Observable, ReplaySubject } from 'rxjs';\n\nimport { Track, getTrack } from '../../track/track';\nimport { ModelService } from '../../model/model.service';\nimport { Model, ModelTrac...
typescript
edit
0
5
mit
c0896040674b433fb5763741c053969f3a6e4acd
nb48/chart-hero,nb48/chart-hero,nb48/chart-hero
src/app/time/duration/duration.service.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport createPhpMatcher from './createPhpMatcher';\n\nconst getLatestPhpCliTag = createPhpMatcher('cli-alpine');\n\nexport default getLatestPhpCliTag;\n\n```\n\nApply this change: Fix alpine function naming bug" }, { "role": "as...
typescript
edit
0
0
mit
8c87c70658949f82e7b769a2ce445f099f1683fe
forumone/generator-web-starter,forumone/generator-web-starter,forumone/generator-web-starter,forumone/generator-web-starter,forumone/generator-web-starter
src/app/plugins/platform/Docker/registry/getLatestPhpCliAlpineTag.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport {IUpdatable} from './IUpdatable';\nimport {IRenderable} from './IRenderable';\n\n/**\n * A game object defines an entity in your game's world.<br>\n * It can be for example the player's character, a button, etc.\n */\nexport clas...
typescript
edit
0
1
mit
6ad5c542673d1c8b273c80f46a74be36f5ba0dec
ChibiFR/rythmoos-engine,ChibiFR/rythmoos-engine
src/GameObject.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport {\n beforeEach,\n beforeEachProviders,\n describe,\n expect,\n it,\n inject,\n} from '@angular/core/testing';\nimport { ComponentFixture, TestComponentBuilder } from '@angular/compiler/testing';\nimport { Component } from '...
typescript
edit
0
1
mit
ca97842f85a569f6123f62976f35c51986ffd586
coshx/portfolio_optimizer,coshx/portfolio_optimizer,coshx/portfolio_optimizer,coshx/portfolio_optimizer
src/app/optimizer/optimizer.component.spec.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { createGlobalStyle } from 'styled-components'\n\nconst GlobalStyle = createGlobalStyle`\n a {\n color: inherit;\n }\n`\n\nexport default GlobalStyle\n\n```\n\nApply this change: Apply global background color and text color"...
typescript
edit
0
0
mit
14fd67f422a2bb3b2067a465b4ce7a00ff614ca6
Sarah-Seo/Inpad,Sarah-Seo/Inpad
src/main/components/GlobalStyle.tsx
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { Injectable } from \"@angular/core\";\n\n@Injectable()\nexport class DateService {\n constructor() {}\n\n toMonthAndDay(date: string) {\n return new Date(date).toLocaleDateString([], { month: \"long\", day: \"numeri...
typescript
edit
0
1
mit
6da83bcb6d0d7ee16e824eb6e11f480457135932
blatzblaster/ionic-solo,blatzblaster/ionic-solo,blatzblaster/ionic-solo
app/utilities/date-service.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport * as React from 'react'\nimport App, { Container } from 'next/app';\nimport Head from 'next/head'\nimport 'normalize.css/normalize.css'\n\n// A custom app to support importing CSS files globally\nclass MyApp extends App {\n\n pu...
typescript
edit
null
null
mit
72cc0ab8c76f26573399c713d8845f0110d6a044
JosephDuffy/josephduffy.co.uk,JosephDuffy/josephduffy.co.uk,JosephDuffy/josephduffy.co.uk
pages/_app.tsx
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write typescript code for the following: Create framework for testing BedComponent" }, { "role": "assistant", "content": "import { ComponentFixture, TestBed, async } from '@angular/core/testing';\nimport { Plant } from './plant';\nimport { PlantListService } from '....
typescript
new_file
null
null
mit
e4088d2517f1d0dd07796c30a25cc646a0eb19ce
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-3-dorfner,UMM-CSci-...
client/src/app/plants/bed.component.spec.ts
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```typescript\n\nimport * as application from 'application';\nimport { getCallback, extractAppURL } from './urlhandler.common';\nexport { handleOpenURL } from './urlhandler.common';\n\nexport function handleIntent(intent: any) {\n let data = intent...
typescript
edit
0
6
mit
935791e575cd4f0ac0ab0026856d79f8eea31bfe
hypery2k/nativescript-urlhandler,hypery2k/nativescript-urlhandler,hypery2k/nativescript-urlhandler,hypery2k/nativescript-urlhandler
src/urlhandler.android.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { translate } from '@waldur/i18n';\nimport { $uibModal } from '@waldur/modal/services';\nimport { ActionContext, ResourceAction } from '@waldur/resource/actions/types';\n\nexport function createNodeAction(ctx: ActionContext): Res...
typescript
edit
0
1
mit
e9e0afeb5bb0702e458efdd8e455539d7ceb8490
opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport
src/rancher/cluster-actions/CreateNodeAction.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport {VoidHook} from \"../tasks/Hooks\";\n\nexport default {\n projectType: \"frontend\",\n port: 5000,\n liveReloadPort: 35729,\n distribution: \"dist\",\n targets: \"targets\",\n bootstrapperStyles: \"\",\n wat...
typescript
edit
0
0
mit
0dbd55f505f8afd0cd7f1256bb7ed5156fbe157d
mtfranchetto/smild,mtfranchetto/smild,mtfranchetto/smild
lib/settings/DefaultSettings.ts
rejected_duplicate
Near-duplicate of sample 115116
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { TestBed } from '@angular/core/testing';\n\nimport { EnvironmentService } from './environment';\nimport { HttpClientTestingModule } from '@angular/common/http/testing';\n\ndescribe('EnvironmentService', () => {\n let service: E...
typescript
edit
0
1
apache-2.0
f6f5997a5770e4c4dbad33b49cda6511bf91a5d9
googleinterns/step251-2020,googleinterns/step251-2020,googleinterns/step251-2020,googleinterns/step251-2020,googleinterns/step251-2020,googleinterns/step251-2020
step-release-vis/src/app/services/environment_test.ts
rejected_duplicate
Near-duplicate of sample 113162
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport {AbstractObject} from \"./_abstract_object\";\n\nexport class MaintenanceAndTransportObject extends AbstractObject {\n\n public getType(): string {\n return \"TOBJ\";\n }\n\n public getArea(): string | undefined {\n if (...
typescript
edit
0
3
mit
293cef59776e0958b1ad57d3f54eb2871589b90a
larshp/abaplint,larshp/abapOpenChecksJS,larshp/abapOpenChecksJS,larshp/abaplint,larshp/abaplint,larshp/abaplint,larshp/abapOpenChecksJS
src/objects/maintenance_and_transport_object.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\n/// <reference types=\"Cypress\" />\ncontext('Languages', () => {\n\n beforeEach(() => {\n cy.umbracoLogin(Cypress.env('username'), Cypress.env('password'));\n });\n\n it('Add language', () => {\n const name = \"Kyrgyz (Kyrgyzs...
typescript
edit
0
1
mit
f0b39ce890e8f31523739a68d317b24df79fdb76
leekelleher/Umbraco-CMS,dawoe/Umbraco-CMS,mattbrailsford/Umbraco-CMS,umbraco/Umbraco-CMS,arknu/Umbraco-CMS,umbraco/Umbraco-CMS,dawoe/Umbraco-CMS,KevinJump/Umbraco-CMS,madsoulswe/Umbraco-CMS,bjarnef/Umbraco-CMS,leekelleher/Umbraco-CMS,marcemarc/Umbraco-CMS,JimBobSquarePants/Umbraco-CMS,robertjf/Umbraco-CMS,abryukhov/Umb...
src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/languages.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\n/// <reference path=\"../References.d.ts\"/>\nimport Dispatcher from '../dispatcher/Dispatcher';\nimport * as ItemTypes from '../types/ItemTypes';\nimport * as ItemActions from '../actions/ItemActions';\n\nexport function init(): Promis...
typescript
edit
0
1
mit
89316cafcc98edca00d500f52fc71e3b4ead665e
zachhuff386/react-boilerplate,zachhuff386/react-boilerplate
app/utils/ItemUtils.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport {Aliases} from \"../Aliases\";\nimport {scan, Token, concatTokens} from \"./Scanner\";\n\nexport function expandAliases(tokens: Token[], aliases: Aliases): Token[] {\n const commandWordToken = tokens[0];\n const argumentTok...
typescript
edit
0
4
mit
ab953e5dec27257b0141b4efda29489fd75f921c
j-allard/black-screen,railsware/upterm,drew-gross/black-screen,black-screen/black-screen,vshatskyi/black-screen,vshatskyi/black-screen,drew-gross/black-screen,drew-gross/black-screen,drew-gross/black-screen,shockone/black-screen,black-screen/black-screen,railsware/upterm,vshatskyi/black-screen,black-screen/black-screen...
src/shell/CommandExpander.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { Component, OnInit } from '@angular/core';\nimport { RouteParams } from '@angular/router-deprecated';\nimport { PolymerElement } from 'vaadin-ng2-polymer/polymer-element';\n\nimport { Hero } from './hero';\nimport { HeroService ...
typescript
edit
0
1
mit
10b75c1a86cc778186e34c0dec4afd7d3885c09a
platosha/angular2-polymer-elements-quickstart,vaibhavnitya/meethi,vaibhavnitya/meethi,platosha/angular2-polymer-elements-quickstart,platosha/angular2-polymer-elements-quickstart,vaibhavnitya/meethi
app/hero-detail.component.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { Video } from './video.model';\nimport { PlayerSide } from './player-side';\n\nexport interface PlayerState {\n side: PlayerSide;\n player: YT.Player;\n playerId: string;\n video: Video;\n isReady: boolean;\n s...
typescript
edit
0
0
mit
a5bf3cfe912213fed94751368f51bb9aa96a971f
radiium/turntable,radiium/turntable,radiium/turntable
src/app/_core/models/player-state.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nexport interface Attachment {\n id?: string\n content_type: string\n data: string\n}\n\nexport interface CouchifyOptions {\n id?: string\n baseDocumentsDir?: string\n attachmentsDir?: string\n babelPlugins?: any[]\n...
typescript
edit
0
0
mit
05cf69c4f982b91cda455d60955d9021a13abee3
wearereasonablepeople/couchify,wearereasonablepeople/couchify
src/interfaces.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { cloneDeep, isFunction, isPlainObject, mergeWith } from \"lodash\";\nimport { Customize, Key } from \"./types\";\n\nconst isArray = Array.isArray;\n\nexport default function joinArrays({\n customizeArray,\n customizeObject,\n ...
typescript
edit
0
14
mit
23d24a47df06ba1efb26d63af7edbc52d36e4d56
survivejs/webpack-merge,survivejs/webpack-merge
src/join-arrays.ts
rejected_complexity
Cyclomatic complexity too high: 14
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { CityFixture } from \"lib/__fixtures__/CityFixture\"\nimport { renderRelayTree } from \"lib/tests/renderRelayTree\"\nimport { graphql } from \"react-relay\"\nimport { GlobalMapContainer } from \"../GlobalMap\"\n\njest.unmock(\"r...
typescript
edit
0
1
mit
dc50bb0b6c4c7b370564920d0fe7942023187a3f
artsy/emission,artsy/emission,artsy/eigen,artsy/eigen,artsy/emission,artsy/eigen,artsy/emission,artsy/eigen,artsy/eigen,artsy/emission,artsy/eigen,artsy/emission,artsy/eigen,artsy/emission
src/lib/Scenes/Map/__tests__/GlobalMap-tests.tsx
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport appRoot from 'app-root-path';\nimport { createLogger, transports, format } from 'winston';\nconst { combine, timestamp, colorize } = format;\n\n\n// instantiate a new Winston Logger with the settings defined above\nconst logger =...
typescript
edit
0
2
mit
e4ef34614fbc21841db14900dc46cba4b3e47c3e
schulcloud/node-notification-service,schulcloud/node-notification-service,schulcloud/node-notification-service
src/helper/logger.ts
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```typescript\nimport { KeyframeTrack } from './KeyframeTrack';\nimport { Bone } from './../objects/Bone';\nimport { MorphTarget } from '../core/Geometry';\nimport { AnimationBlendMode } from '../constants';\n\nexport class AnimationClip {\n\n\tconstr...
typescript
edit
0
1
mit
e20b24a50ccda660e5da09bf1dc99addc11de67b
mrdoob/three.js,kaisalmen/three.js,makc/three.js.fork,aardgoose/three.js,looeee/three.js,mrdoob/three.js,donmccurdy/three.js,donmccurdy/three.js,Liuer/three.js,jpweeks/three.js,aardgoose/three.js,06wj/three.js,jpweeks/three.js,WestLangley/three.js,gero3/three.js,greggman/three.js,WestLangley/three.js,kaisalmen/three.js...
src/animation/AnimationClip.d.ts
accepted
null
true