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 { xLuceneTypeConfig, xLuceneVariables } from '@terascope/types';\nimport geoBoxFn from './geo/box';\nimport geoDistanceFn from './geo/distance';\nimport geoPolygonFn from './geo/polygon';\nimport geoContainsPointFn from './geo/co... | typescript | edit | 0 | 4 | apache-2.0 | ee12b1fa3f7e66ca5e6fe2e804525de8a1725363 | terascope/teraslice,terascope/teraslice,terascope/teraslice,terascope/teraslice | packages/xlucene-parser/src/functions/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport default class BreadcrumbsService {\n constructor() {\n this._handlers = [];\n this._items = [];\n this._activeItem = '';\n }\n\n listen(handler) {\n this._handlers.push(handler);\n return () => {\n this._ha... | typescript | edit | 0 | 1 | mit | d7be8867581c6582e54f911073a65a362b7f4ece | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport | src/navigation/breadcrumbs/breadcrumbs-service.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// @ts-ignore: ignore vscode module import\nimport { extensions, ExtensionContext } from 'vscode';\n// @ts-ignore: ignore Path module import\nimport * as path from 'path';\n// @ts-ignore: ignore child_process module import\nimport { exe... | typescript | edit | 0 | 1 | mit | 65d2d8bb6734c22270de847f6ba6f838879de931 | caleb531/dotfiles,caleb531/dotfiles,caleb531/dotfiles,caleb531/dotfiles | vscode/init.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { RequireSome } from '@proton/shared/lib/interfaces/utils';\nimport { InvitationModel } from '../../../../helpers/calendar/invite';\nimport {\n getAttendeeSummaryText,\n getHasBeenUpdatedText,\n getOrganizerSummaryText,\... | typescript | edit | null | null | mit | acb3b52acf600cd127a068f00b62386134c0ab2f | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | applications/mail/src/app/components/message/extras/calendar/ExtraEventSummary.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { join } from \"path\";\nimport butler from \"../../util/butler\";\nimport { devNull } from \"../../logger\";\nimport Context from \"../../context\";\n\nexport type LaunchType = \"native\" | \"html\" | \"external\" | \"native\" |... | typescript | edit | 0 | 9 | mit | 84255a5d1cb94d38e3ac1ce47ede5e276f8b381c | itchio/itch,itchio/itch,itchio/itchio-app,itchio/itch,itchio/itch,leafo/itchio-app,itchio/itchio-app,leafo/itchio-app,itchio/itch,leafo/itchio-app,itchio/itchio-app,itchio/itch | src/reactors/launch/launch-type-for-action.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport React from \"react\"\nimport { Link, Meta, Title } from \"react-head\"\nimport { getENV } from \"v2/Utils/getENV\"\n\nexport const ConsignMeta: React.FC = () => {\n const title = `WIP Consign Title | Artsy` // FIXME: Need real t... | typescript | edit | null | null | mit | 3270f35ffb5241c2af5dd13bb413bfae2c63bdef | joeyAghion/force,artsy/force,joeyAghion/force,joeyAghion/force,joeyAghion/force,artsy/force-public,artsy/force,artsy/force-public,artsy/force,artsy/force | src/v2/Apps/Consign/Components/ConsignMeta.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport path from 'path';\nimport { getInterpretedFile, serverRequire, Options } from '@storybook/core-common';\n\nexport async function getManagerBuilder(configDir: Options['configDir']) {\n const main = path.resolve(configDir, 'main')... | typescript | edit | 0 | 3 | mit | 8421e7800feff33466426920807893d38b52c77b | storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook | lib/core-server/src/utils/get-manager-builder.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { operation } from '@ragg/fleur'\nimport { remote } from 'electron'\nimport { join } from 'path'\n\nimport * as EditorOps from '../Editor/operations'\nimport { RendererActions } from './actions'\nimport FSPluginLoader from './FSP... | typescript | edit | 0 | 4 | mit | 99597bdce5e5c4ddf5abc330bdd7d2b58fb7aabf | Ragg-/Delir,Ragg-/Delir,Ragg-/Delir,Ragg-/Delir | packages/delir/domain/Renderer/operations.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/**\n * Simple logging system\n */\n\nimport { format } from 'util';\n\nexport function debug(...args: any[]) {\n\treturn _debug(...args);\n}\n\nexport function die(...args: any[]) {\n\terror(...args).then(() => {\n\t\tprocess.exit(1);\... | typescript | edit | 0 | 2 | mit | 0dcd6d314bc4849983e21ae835c967d952dbcb9e | jason0x43/vim-tss | src/lib/log.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as jsdom from \"jsdom\";\n\ndeclare var global: any;\n\nconst exposedProperties = [\"window\", \"navigator\", \"document\"];\n\nconst doc = jsdom.jsdom(\"<!doctype html><html><body></body></html>\");\n\nglobal.document = doc;\n... | typescript | edit | 0 | 2 | mit | 5d6a98827d8676deee126d757b08b3dbeae7526b | Josh-ES/react-here-maps,Josh-ES/react-here-maps | test/setup.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'pm-root',\n template: `\n <div>\n <h1>{{pageTitle}}</h1>\n <pm-products></pm-products>\n </div>\n `\n})\n\nexport class AppComponent {\n pageTit... | typescript | edit | 0 | 0 | mit | 715a3359c7ed33ec17f2bc1ca2a7698cce1315d5 | GugaGongadze/Angular-GettingStarted,GugaGongadze/Angular-GettingStarted,GugaGongadze/Angular-GettingStarted | APM/src/app/app.component.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nconst Disable = false\n\n/**\n * Enables the application to opt-in for preview features based on runtime\n * checks. This is backed by the GITHUB_DESKTOP_PREVIEW_FEATURES environment\n * variable, which is checked for non-development en... | typescript | edit | 0 | 4 | mit | 6678a73ea74d0cea54ad50f4b9e82ecf8535f639 | kactus-io/kactus,desktop/desktop,shiftkey/desktop,kactus-io/kactus,say25/desktop,shiftkey/desktop,shiftkey/desktop,artivilla/desktop,kactus-io/kactus,say25/desktop,artivilla/desktop,desktop/desktop,shiftkey/desktop,artivilla/desktop,say25/desktop,j-f1/forked-desktop,artivilla/desktop,kactus-io/kactus,j-f1/forked-deskto... | app/src/lib/feature-flag.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/*\n * The MIT License (MIT)\n * Copyright (c) 2016 Heat Ledger Ltd.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to dea... | typescript | edit | 0 | 4 | mit | c66d734667d5c5eb911469f70b665c4434f9c92b | Heat-Ledger-Ltd/heat-ui,Heat-Ledger-Ltd/heat-ui,Heat-Ledger-Ltd/heat-ui | app/src/services/EnvService.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// Target\ninterface Print {\n printWeak(): string;\n printStrong(): string;\n}\n\n// Adaptee\nclass Banner {\n private banner: string;\n\n constructor(banner: string) {\n this.banner = banner;\n }\n\n printWithParen(): string ... | typescript | edit | 0 | 1 | mit | 07d3e2e31e70ec533ff2a0e176aebda6484a7b59 | Erichain/design-patterns-in-typescript,Erichain/design-patterns-in-typescript | adapter/adapter-ts.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { VNode, render, update } from \"ivi\";\nimport { triggerNextTick, triggerNextFrame } from \"./scheduler\";\nimport { reset } from \"./reset\";\nimport { VNodeWrapper } from \"./vdom\";\n\nlet _container: HTMLDivElement | null = ... | typescript | edit | 0 | 2 | mit | 178516d06f507a2bf7f2c97af41e1e64fb000ff4 | ivijs/ivi,ivijs/ivi | packages/ivi-test/src/dom.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/**\n * @author Daniel de Oliveira\n */\nexport class ListUtil {\n\n /**\n * Generate a new list with elements which are contained in l but not in r\n */\n public static subtract(l: string[], r: string[]): string[] {\n\n ... | typescript | edit | 0 | 2 | apache-2.0 | 4fe9e9368ad35b205038ccf4836fc4319975dd98 | codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client | app/util/list-util.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from 'react';\n\n\ninterface Props {\n userName: string;\n text: string;\n channelName: string;\n}\n\nexport default class Post extends React.Component < any, any > {\n constructor(props) {\n super(props);\n ... | typescript | edit | null | null | mit | 4a7bf3e5de77731fa2c4d9d362a3fa967138cd94 | tanishi/Slackker,tanishi/Slackker,tanishi/Slackker | app/src/components/Column/Post.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { connect } from 'react-redux'\nimport { Dispatch } from 'redux'\n\nimport { createSetVisibilityFilter } from '../actions/createSetVisibilityFilter'\nimport { Filter } from '../model/Filter'\nimport { Link } from '../components/L... | typescript | edit | 0 | 1 | unlicense | 99c4c75dfc396ca4aae26c16ea977e1765c25a89 | janaagaard75/framework-investigations,janaagaard75/framework-investigations,janaagaard75/framework-investigations,janaagaard75/framework-investigations | react-redux-todos/src/containers/FilterLink.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/// <reference path=\"./types/index.d.ts\" />\n\nimport expect = require('expect.js');\nimport * as assert from 'assert';\nimport * as tsr from '../src/index';\nimport * as util from './util';\n\nglobal.expect = expect;\nglobal.assert =... | typescript | edit | 0 | 0 | mit | 095c26b18ce0038a5893637dd7222b149e5641dd | fabiandev/ts-runtime,fabiandev/ts-runtime,fabiandev/ts-runtime | test/setup.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { connect } from 'react-redux'\nimport { Dispatch } from 'redux'\n\nimport { createSetVisibilityFilter } from '../actions/createSetVisibilityFilter'\nimport { Filter } from '../model/Filter'\nimport { Link } from '../components/L... | typescript | edit | 0 | 1 | unlicense | ca7d4d6c176b7c52ff0c224d3baf804c6e047b6a | janaagaard75/framework-investigations,janaagaard75/framework-investigations,janaagaard75/framework-investigations,janaagaard75/framework-investigations | react-redux-todos/src/containers/FilterLink.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// Type definitions for react-json-pretty 1.3\n// Project: https://github.com/chenckang/react-json-pretty\n// Definitions by: Karol Janyst <https://github.com/LKay>\n// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped\n\n... | typescript | edit | 0 | 0 | mit | f779d76ed73db107c45271ff1ee12f6a62a636bf | aciccarello/DefinitelyTyped,AgentME/DefinitelyTyped,YousefED/DefinitelyTyped,minodisk/DefinitelyTyped,magny/DefinitelyTyped,johan-gorter/DefinitelyTyped,dsebastien/DefinitelyTyped,johan-gorter/DefinitelyTyped,aciccarello/DefinitelyTyped,minodisk/DefinitelyTyped,AgentME/DefinitelyTyped,abbasmhd/DefinitelyTyped,YousefED/... | react-json-pretty/index.d.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport i18n from 'i18next';\nimport * as Expo from 'expo';\nimport { reactI18nextModule } from 'react-i18next';\n\nimport settings from '../../../../settings';\nimport { addResourcesI18n } from '../../utils';\nimport modules from '..';\... | typescript | edit | 0 | 2 | mit | 423483b825a2505384f2c18a251d787eaf6534fd | sysgears/apollo-fullstack-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit | packages/common/modules/i18n/index.native.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport chalk from 'chalk'\n\nexport interface ILogger {\n log(...args: any[]): void\n warn(...args: any[]): void\n error(...args: any[]): void\n}\n\nexport class Logger implements ILogger {\n public title(...args: any[]) {\n cons... | typescript | edit | 0 | 1 | mit | e7296892fed3ac93ea8ffe9f9680c78427563375 | pawelgalazka/microcli,pawelgalazka/microcli | src/logger.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport interface LoggerPropertyOptions {\n getter?: boolean;\n prefix?: string;\n setter?: boolean;\n}\n\nexport function LoggerProperty(loggerOptions?: LoggerPropertyOptions) {\n const getter = (loggerOptions && 'getter' in... | typescript | edit | 0 | 2 | mit | 4f75e0306d28d91c1d2dda36a6dd286862a61be2 | semagarcia/typescript-decorators,semagarcia/typescript-decorators | src/property-decorators/logger.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport {assert} from 'chai';\nimport {$$, waitFor} from '../../sha... | typescript | edit | 0 | 1 | bsd-3-clause | a7c0819fcc14e82b5d43a9a41a946d6ec5ff6627 | ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend | test/interactions/theme_colors/theme_colors_test.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport React = require(\"react\");\nimport { StatBlock } from \"../../common/StatBlock\";\n\nexport class StatBlockEditor extends React.Component<StatBlockEditorProps, StatBlockEditorState> {\n public saveAndClose = () => {\n ... | typescript | edit | null | null | mit | 213369e6d0fbc26e524f3f8e28bd39241ab8054b | cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative | client/StatBlockEditor/StatBlockEditorComponent.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { IArgv as mriArgv } from 'mri'\n\nimport { TypeName } from './util'\n\ntype StringArray = ReadonlyArray<string>\n\nconst files: StringArray = require('./command-list.json')\n\nexport type CommandHandler = (args: mriArgv, argv: S... | typescript | edit | 0 | 1 | mit | 63d48c4f6ddc391fe7c3f972714af01ebb6f41be | shiftkey/desktop,j-f1/forked-desktop,shiftkey/desktop,artivilla/desktop,kactus-io/kactus,j-f1/forked-desktop,kactus-io/kactus,kactus-io/kactus,say25/desktop,artivilla/desktop,artivilla/desktop,say25/desktop,artivilla/desktop,desktop/desktop,shiftkey/desktop,say25/desktop,kactus-io/kactus,say25/desktop,j-f1/forked-deskt... | app/src/cli/load-commands.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n'use strict';\n\nexport var dateTimeFormatServiceName: string = 'dateTimeFormatStrings';\n\nexport interface IDateFormatStrings {\n\tisoFormat: string;\n\tdateTimeFormat: string;\n\tdateFormat: string;\n\ttimeFormat: string;\n}\n\nexpor... | typescript | edit | 0 | 0 | mit | 9c92104cffbb38dc43d60895a36a259c9f2756c8 | SamGraber/TypeScript-Angular-Utilities,RenovoSolutions/TypeScript-Angular-Utilities,RenovoSolutions/TypeScript-Angular-Utilities,SamGraber/TypeScript-Angular-Utilities | source/services/date/dateTimeFormatStrings.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {MstSvt} from \"../../../model/master/Master\";\nimport {MstSkillContainer, MstSvtSkillContainer} from \"../../../model/impl/MstContainer\";\n\nexport interface MstGoal {\n appVer: string;\n svtRawData: Array<MstSvt>;\n ... | typescript | edit | 0 | 0 | mit | 58a9cb2f9485f4958ac755d481f0d7491073e231 | agreatfool/fgo-handbook,agreatfool/fgo-handbook,agreatfool/fgo-handbook,agreatfool/fgo-handbook,agreatfool/fgo-handbook,agreatfool/fgo-handbook | src/mobile/lib/model/MstGoal.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { TimeSeriesPoint } from '../../queries/time-series.query';\r\nimport { DAY, WEEK } from '../../../utils/timeUnits';\r\n\r\n/**\r\n * Group time-series points by the week number of their x-values (date).\r\n * The first day of th... | typescript | edit | 0 | 4 | apache-2.0 | 0b51b9d3a6edf923b328ff1bf0f5ea935d77765b | googleinterns/guide-doge,googleinterns/guide-doge,googleinterns/guide-doge | src/datasets/summarizations/utils/time-series.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { beep } from \"../util\";\nimport { Notification } from \"farmbot/dist/jsonrpc\";\nimport {\n HardwareState,\n RpcBotLog\n} from \"../devices/interfaces\";\nimport { error, success, warning } from \"../ui\";\nimport { t } ... | typescript | edit | 0 | 3 | mit | 487d3f2853918937e26312be4e25a2fc6118e41b | MrChristofferson/farmbot-web-frontend,MrChristofferson/farmbot-web-frontend,FarmBot/farmbot-web-frontend,RickCarlino/farmbot-web-frontend,RickCarlino/farmbot-web-frontend,FarmBot/farmbot-web-frontend | src/devices/incoming_bot_notification.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {Order} from \"../app/lod/Order\";\nimport { Observable } from 'rxjs/Observable';\nimport {Product} from \"../app/lod/Product\";\n\ndescribe('Attributes', function() {\n it( \"should be flagged as created\", function() {\n ... | typescript | edit | 0 | 1 | apache-2.0 | 3f085db5c340251930d9ca89cbc2250c55f493f5 | DeegC/Zeidon-Northwind,DeegC/Zeidon-Northwind,DeegC/Zeidon-Northwind,DeegC/Zeidon-Northwind,DeegC/Zeidon-Northwind,DeegC/Zeidon-Northwind | angular/src/tests/attribute-tests.ts | accepted | null | true |
[
{
"role": "user",
"content": "Write typescript code for the following: Add mocks for some base types"
},
{
"role": "assistant",
"content": "import faker from 'faker';\n\nexport class Faker {\n private static get positiveInteger(): number {\n return faker.random.number({\n min: 0,\n ... | typescript | new_file | 0 | 1 | mit | 2020188fa05ae159619b229eaff9141bcf6d1813 | tamino-martinius/node-next-model | src/__mocks__/next_model.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Actions } from \"./actions\";\nimport { NextUpdate } from \"./nextUpdate\";\nimport { PostRender } from \"./postRender\";\nimport { Ready } from \"./ready\";\nimport { ReceiveUpdate } from \"./receiveUpdate\";\nimport { View } ... | typescript | edit | 0 | 0 | mit | 4823372d8814097600db9fa4152b875fdd72bba7 | foxdonut/meiosis,foxdonut/meiosis,foxdonut/meiosis | lib/config.d.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Injectable } from '@angular/core';\n\ndeclare var document: any;\ndeclare var InstallTrigger: any;\ndeclare var isIE: any;\ndeclare var opr: any;\ndeclare var safari: any;\ndeclare var window: any;\n\n@Injectable()\nexport clas... | typescript | edit | 0 | 4 | mit | 78cd5fc1d6d54de0972f843b04242db89893c680 | coryshaw1/DubPlus-Site,coryshaw1/DubPlus-Site,coryshaw1/DubPlus-Site,DubPlus/DubPlus-Site,DubPlus/DubPlus-Site,DubPlus/DubPlus-Site | src/app/utilities/browser-detection.service.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/// <reference path=\"fourslash.ts\"/>\r\n\r\n////class A {}\r\n////const B = class C {\r\n//// public x;\r\n////};\r\n////function D() {}\r\n////const E = function F() {}\r\n////console.log(function inner() {})\r\n////String(functio... | typescript | edit | 0 | 1 | apache-2.0 | b91d14fd6cc0d4be8611451813ee7ecbea85f713 | erikmcc/TypeScript,minestarks/TypeScript,kitsonk/TypeScript,jwbay/TypeScript,RyanCavanaugh/TypeScript,DLehenbauer/TypeScript,thr0w/Thr0wScript,Eyas/TypeScript,alexeagle/TypeScript,nojvek/TypeScript,TukekeSoft/TypeScript,plantain-00/TypeScript,kpreisser/TypeScript,chuckjaz/TypeScript,SaschaNaz/TypeScript,DLehenbauer/Typ... | tests/cases/fourslash/declarationExpressions.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {Component, ComponentConfig} from './components/component';\nimport {Container} from './components/container';\n\nexport namespace UIUtils {\n export interface TreeTraversalCallback {\n (component: Component<ComponentConfig>,... | typescript | edit | 0 | 3 | mit | 53a3fef29bb62b66cbba2b9b3776f69b25f3b4aa | bitmovin/bitmovin-player-ui,bitmovin/bitmovin-player-ui,bitmovin/bitmovin-player-ui,bitmovin/bitmovin-player-ui | src/ts/uiutils.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Component, Input } from '@angular/core';\nimport { Http, Response } from '@angular/http';\nimport { Project } from '../../model/project';\nimport { Branch } from '../../model/branch';\nimport { Router } from '@angular/router';\... | typescript | edit | 0 | 4 | mit | 487a4c14ea934b20a48bd8d99175a244572662a7 | BibliothecaTeam/Bibliotheca.Client,BibliothecaTeam/Bibliotheca.Client,BibliothecaTeam/Bibliotheca.Client | src/Bibliotheca.Client.Web/app/components/projects/projects.component.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Injectable } from \"@angular/core\";\nimport { CanActivate, Router } from \"@angular/router\";\nimport { ActivatedRouteSnapshot } from \"@angular/router\";\nimport { RouterStateSnapshot } from \"@angular/router\";\nimport log f... | typescript | edit | 0 | 3 | mit | 28b2b777ddbab19066704f386d07f2851e1b94c0 | chipster/chipster-web,chipster/chipster-web,chipster/chipster-web | src/app/core/routing/app-name-guard.service.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.3.0',\n RELEASEVERSION: '0... | typescript | edit | 0 | 0 | mit | 1e21cdbf1e9c3f634af5b15e242727054c0fa9f4 | nie-ine/raeber-website,nie-ine/raeber-website,nie-ine/raeber-website,nie-ine/raeber-website | tools/env/base.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from 'react'\n\nexport interface OccurrenceProps {\n isWriteAccess: boolean,\n width: number,\n height: number,\n top: number,\n left: number,\n}\n\nconst Occurrence = (props: OccurrenceProps) => (\n <div\n st... | typescript | edit | null | null | mit | 36af9bfa506262b0dc934e0b4cb1a071862fc287 | pd4d10/intelli-octo,pd4d10/intelli-octo,pd4d10/intelli-octo | src/components/occurrence.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport PurgeCSS from \"../src/index\";\n\ndescribe(\"performance\", () => {\n it(\"should not suffer from tons of content and css\", function () {\n // TODO Remove this excessive timeout once performance is better.\n jest.setTime... | typescript | edit | 0 | 2 | mit | 2b5eaa764fc226a87b2d302f6803e1f31faf2bc3 | FullHuman/purgecss,FullHuman/purgecss,FullHuman/purgecss,FullHuman/purgecss | packages/purgecss/__tests__/performance.test.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {Container} from '../../collections';\nimport {any_type} from '../../constants';\nimport {emit_declaration_name} from '../../helpers/emit-declaration-name';\nimport {emit_declare} from '../../helpers/emit-declare';\nimport {emit_... | typescript | edit | 0 | 1 | mit | 260c4c00b3f39452739578d685466eb0029a7e43 | ikatyang/dts-element,ikatyang/dts-element | src/elements/declarations/variable-declaration.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.2.0',\n RELEASEVERSION: '0... | typescript | edit | 0 | 0 | mit | e9404b0d0d8c173b39c9fe664745cb910dcb2ad1 | nie-ine/raeber-website,nie-ine/raeber-website,nie-ine/raeber-website,nie-ine/raeber-website | tools/env/base.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as assert from 'power-assert';\nimport * as sinon from 'sinon';\nimport { conditional } from '../src/index';\n\nclass TargetClass {\n}\n\nxdescribe('conditional', () => {\n describe('as a property decorator', () => {\n desc... | typescript | edit | 0 | 1 | mit | 681d6f4a31d6a6ee21b4b46a50aca500323448f1 | tkqubo/conditional-decorator | test/conditional-as-property-decorator.spec.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n///<reference path=\"../.d.ts\"/>\n\nimport path = require(\"path\");\nimport helpers = require(\"./../common/helpers\");\n\nvar knownOpts:any = {\n\t\t\"log\" : String,\n\t\t\"verbose\" : Boolean,\n\t\t\"path\" : String,\n\t\t\"version... | typescript | edit | 0 | 1 | apache-2.0 | 194b444457935a5a9cd65f91f2c897697667f386 | telerik/mobile-cli-lib,telerik/mobile-cli-lib | options.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {assert} from 'chai';\nimport * as mm from '../src';\nimport * as path from 'path';\n\nconst t = assert;\n\nit(\"should reject files that can't be parsed\", () => {\n\n const filePath = path.join(__dirname, 'samples', __filename... | typescript | edit | 0 | 2 | mit | 68595fe7dc4ba095da9deb627437b0b351400794 | Borewit/music-metadata,Borewit/music-metadata | test/test-no-metadata.ts | rejected_duplicate | Near-duplicate of sample 113417 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from 'react'\nimport { Dispatcher } from '../lib/dispatcher'\nimport { ButtonGroup } from '../ui/lib/button-group'\nimport { Button } from '../ui/lib/button'\nimport { Dialog, DialogContent, DialogFooter } from '../ui/... | typescript | edit | null | null | mit | 3ccf5afba6637a4df3237176581b3757c0a7545a | BugTesterTest/desktops,say25/desktop,j-f1/forked-desktop,BugTesterTest/desktops,BugTesterTest/desktops,artivilla/desktop,kactus-io/kactus,gengjiawen/desktop,gengjiawen/desktop,shiftkey/desktop,shiftkey/desktop,hjobrien/desktop,hjobrien/desktop,say25/desktop,shiftkey/desktop,artivilla/desktop,BugTesterTest/desktops,desk... | app/src/ui/confirm-dialog.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as errorHandler from './error_handler';\nimport * as machine from './machine';\n\nvar r = require('koa-route');\nvar bodyParser = require('koa-bodyparser');\nvar koa = require('koa');\nvar app = koa();\n\napp.use(errorHandler.h... | typescript | edit | 0 | 0 | apache-2.0 | 8ea6bd35665dd958768c133dd5d4fc5d3db292ee | lawrence0819/neptune-back | src/app.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 { FormsModule } from '@angular/forms';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { HttpModule } from '@angular/http'... | typescript | edit | 0 | 0 | mit | 83225a48bbc08d8c0df14c066b8a46b8654c9faa | galaxyproject/cloudlaunch-ui,galaxyproject/cloudlaunch-ui,galaxyproject/cloudlaunch-ui | src/app/marketplace/plugins/plugins.module.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'ng-simple-select',\n templateUrl: './simple-select.component.html',\n styleUrls: ['./simple-select.component.css']\n})\nexport class SimpleSelectComponent {\n\n}... | typescript | edit | 0 | 2 | mit | f98a2299d66d972dbc824a24881a6d89f880b378 | FriOne/ng-selectable,FriOne/ng-selectable,FriOne/ng-selectable | src/lib/src/simple-select/component/simple-select.component.ts | accepted | null | 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 | 585c7686abd759d2a24a52aeaec4119b3865dd0c | 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 Typography, { TypographyProps } from \"@material-ui/core/Typography\";\nimport * as React from \"react\";\n\nimport { LocaleConsumer } from \"../Locale\";\n\nexport interface MoneyProp {\n amount: number;\n currency: string;\n}... | typescript | edit | null | null | bsd-3-clause | 86424db6bd38fa5f200434a3c1a13b8ce5f66181 | UITools/saleor,mociepka/saleor,UITools/saleor,mociepka/saleor,maferelo/saleor,mociepka/saleor,maferelo/saleor,UITools/saleor,maferelo/saleor,UITools/saleor,UITools/saleor | saleor/static/dashboard-next/components/Money/Money.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Injectable } from '@angular/core';\nimport { Resolve, ActivatedRouteSnapshot } from '@angular/router';\nimport {SessionData} from \"../../../model/session/session-data\";\nimport SessionResource from \"../../../shared/resources... | typescript | edit | 0 | 1 | mit | b9f651f39805766a5c6415049a4d4a9ff68b0547 | chipster/chipster-web,chipster/chipster-web,chipster/chipster-web | src/app/views/sessions/session/session.resolve.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from \"react\";\nimport {Home} from \"./pages/home/home\";\nimport {Route, BrowserRouter} from \"react-router-dom\";\nimport {Switch} from \"react-router\";\nimport {Kugs} from \"./pages/kugs/Kugs\";\nimport {Articles}... | typescript | edit | null | null | apache-2.0 | d2b184b0b1f6da24f944c04e0b8291119d9c5f68 | KotlinBy/awesome-kotlin,KotlinBy/awesome-kotlin,KotlinBy/awesome-kotlin,KotlinBy/awesome-kotlin | app-frontend/app/src/root.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write typescript code for the following: Implement Antenna Edit page object."
},
{
"role": "assistant",
"content": "/// <reference path=\"../references.ts\" />\n\nclass AntennaEdit {\n 'use strict';\n\n form: protractor.ElementFinder = element(by.xpath(\"//fo... | typescript | new_file | 0 | 2 | mit | c111cf32d216180573393bbed82fc91383b3635e | ryohpops/kspRemoteTechPlanner,ryohpops/kspRemoteTechPlanner,ryohpops/kspRemoteTechPlanner | kspRemoteTechPlannerTest/objects/antennaEdit.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Directive, Input, OnInit, Optional } from '@angular/core';\nimport { DialogRef } from './dialog-ref';\n\n\nlet uniqueId = 0;\n\n\n@Directive({\n selector: '[gdDialogTitle]',\n host: {\n 'class': 'DialogTitle',\n ... | typescript | edit | 0 | 3 | mit | c82c81856bf5038c2f5b348545aa8059ac22e483 | seokju-na/geeks-diary,seokju-na/geeks-diary,seokju-na/geeks-diary | src/browser/ui/dialog/dialog-title.directive.ts | rejected_duplicate | Near-duplicate of sample 112403 | 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 | b08b3d84ba68e26b3c8e5ed310680d57b2bc2e73 | mjbvz/vscode,rishii7/vscode,Zalastax/vscode,hoovercj/vscode,Zalastax/vscode,rishii7/vscode,microsoft/vscode,the-ress/vscode,Zalastax/vscode,hoovercj/vscode,rishii7/vscode,DustinCampbell/vscode,microlv/vscode,mjbvz/vscode,rishii7/vscode,DustinCampbell/vscode,the-ress/vscode,eamodio/vscode,landonepps/vscode,DustinCampbel... | extensions/typescript/src/utils/commandManager.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {Disposable} from 'event-kit'\nimport Dispatcher from '../src/dispatcher'\nimport User from '../src/models/user'\nimport Repository from '../src/models/repository'\n\ntype State = {users: User[], repositories: Repository[]}\n\nex... | typescript | edit | 0 | 1 | mit | 9a4dfbb1a871a3ece32717fe3d33227d4d5d2569 | say25/desktop,BugTesterTest/desktops,BugTesterTest/desktops,BugTesterTest/desktops,artivilla/desktop,gengjiawen/desktop,desktop/desktop,gengjiawen/desktop,desktop/desktop,desktop/desktop,say25/desktop,j-f1/forked-desktop,desktop/desktop,hjobrien/desktop,BugTesterTest/desktops,hjobrien/desktop,j-f1/forked-desktop,artivi... | test/in-memory-dispatcher.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/*\n * Copyright (c) 2015 ARATA Mizuki\n * This software is released under the MIT license.\n * See LICENSE.txt.\n */\n\nmodule UIUtil\n{\n interface RAFWithVendorPrefix extends Window {\n mozRequestAnimationFrame(callback: Fr... | typescript | edit | 0 | 0 | mit | bf0d95270c0b21eaa9a32a821a7c0e0a9a6c8147 | minoki/singularity | ts/UIUtil/requestAnimationFrame.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport React from \"react\";\nimport { observer } from \"mobx-react\";\n\nimport { Limitation, Item, LimitFlag } from \"../../stores/model\";\nimport Select from \"./Select\";\nimport MultiSelect from \"./MultiSelect\";\n\ninterface Lim... | typescript | edit | null | null | mit | 449e62059e9cf6a8391190fdf8103bf044475371 | TheIndifferent/jenkins-scm-koji-plugin,judovana/jenkins-scm-koji-plugin,TheIndifferent/jenkins-scm-koji-plugin,judovana/jenkins-scm-koji-plugin,judovana/jenkins-scm-koji-plugin | src/components/formComponents/LimitationForm.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/// <reference path=\"../node_modules/@types/mocha/index.d.ts\" />\n/// <reference path=\"../node_modules/@types/chai/index.d.ts\" />\n/// <reference path=\"../node_modules/@types/sinon/index.d.ts\" />\n\n/**\n * Module dependencies.\n ... | typescript | edit | 0 | 1 | mit | 5882ff4328bb7ba6a38a89dc3a83bf7e8142f7a4 | robertmain/jukebox,robertmain/jukebox | test/example.mocha.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {SerializePath} from './StructureNodes'\n\nexport class SerializeError extends Error {\n public readonly path: SerializePath\n public helpId?: HELP_URL\n\n constructor(\n message: string,\n parentPath: SerializePath,\n ... | typescript | edit | 0 | 3 | mit | 265f0dce760942fa746a5cc9eb60f56e0fc1cc39 | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | packages/@sanity/structure/src/SerializeError.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/// <reference path=\"./typings/main.d.ts\" />\nimport plugins = require(\"./gulpbrowser.plugins\");\n\n\nlet browserify = function(transforms) {\n\n transforms = transforms || [];\n if (typeof transforms === 'function') {\n ... | typescript | edit | 0 | 3 | mit | 65c70eec98424b7a79f03655d5f7b9a4723191bc | pushrocks/gulp-browser,pushrocks/gulp-browser | ts/gulpbrowser.browserify.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport default class KnownValues {\n _knownValues: any = {};\n _knownValuesMap = new Map();\n\n constructor() {\n Object.assign(this._knownValues, {\n \"String.prototype.slice\": String.prototype.slice,\n \"String.protot... | typescript | edit | 0 | 2 | mit | 3d9804844291b30584d9b7a0791df762fe3d1ae5 | mattzeunert/FromJS,mattzeunert/FromJS,mattzeunert/FromJS,mattzeunert/FromJS | packages/core/src/helperFunctions/KnownValues.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { range } from \"linq-to-typescript\"\n\nconst primeNumbers = range(2, 10000)\n .select((i) => [i, Math.floor(Math.sqrt(i))])\n .where(([i, iSq]) =>\n range(2, iSq).all((j) => i % j !== 0))\n .select(([prime]) => ... | typescript | edit | 0 | 2 | mit | caadf4f3840bf24b3c5c83dc34f570058ef06457 | arogozine/LinqToTypeScript,arogozine/LinqToTypeScript | nodetest/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n#! /usr/bin/env node\n\nimport program from \"commander\"\n\nimport setSharedArgs, { SharedCLI } from \"./utils/sharedDangerfileArgs\"\nimport { runRunner } from \"./ci/runner\"\nimport { LocalGit } from \"../platforms/LocalGit\"\nimpor... | typescript | edit | 0 | 2 | mit | 165dabd09bafcffac50ab33035cc7978feba57d5 | danger/danger-js,danger/danger-js,danger/danger-js,danger/danger-js | source/commands/danger-local.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/**\n * @file CORS middleware\n * @author Dave Ross <<EMAIL>>\n */\n\nimport { Application, Request, Response } from \"polka\"\n\nexport default function corsAllowAll(server: Application) {\n\n\tserver.use(\"/graphql\", function (req: R... | typescript | edit | 0 | 2 | mit | fc3238a5051e093671232b2ea01a348e654d49e4 | daveross/catalogopolis-api,daveross/catalogopolis-api | app/src/cors.ts | rejected_duplicate | Near-duplicate of sample 112518 | 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.16.0',\n RELEASEVERSION: '... | typescript | edit | 0 | 0 | mit | 54a93f288fa75e80c33b5d113db224aa6df5891b | 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\nimport * as _ from 'lodash'\n\nexport default {\n isMigratable: (project: ProjectScheme) => {\n return false\n },\n\n migrate: (project: ProjectScheme) => {\n return project\n }\n}\n\n```\n\nApply this change: ... | typescript | edit | 0 | 1 | mit | 1351967a9949829ecd25c2a9daa7e6d773ee5dc9 | Ragg-/Delir,Ragg-/Delir,Ragg-/Delir,Ragg-/Delir | packages/delir-core/src/helper/ProjectMigrator.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from 'react'\n\nimport { Image } from '../../../models/diff'\n\nexport function renderImage(\n image: Image | undefined,\n props?: {\n style?: {}\n onLoad?: (e: React.SyntheticEvent<HTMLImageElement>) => void\n... | typescript | edit | null | null | mit | 2687111bfccfeef1086578d39698fa22726324a0 | gengjiawen/desktop,hjobrien/desktop,kactus-io/kactus,artivilla/desktop,desktop/desktop,hjobrien/desktop,say25/desktop,artivilla/desktop,j-f1/forked-desktop,say25/desktop,shiftkey/desktop,shiftkey/desktop,say25/desktop,gengjiawen/desktop,kactus-io/kactus,gengjiawen/desktop,artivilla/desktop,shiftkey/desktop,desktop/desk... | app/src/ui/diff/image-diffs/render-image.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// File for testing typescript usage\nimport { Jomini, toArray } from \"..\";\n\n(async function () {\n const jomini = await Jomini.initialize();\n let actual = jomini.parseText(\"a=b\");\n if (actual[\"a\"] != \"b\") {\n throw ne... | typescript | edit | 0 | 2 | mit | 0db0aa32f7ec73317db11ab996765db9619f8633 | nickbabcock/jomini,nickbabcock/jomini,nickbabcock/jomini | tests/usage.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport winston from 'winston';\nimport DeviceModel from '@/models/device';\n\nexport default class DeviceService {\n // region public static methods\n public static async addDevice(platform: string, mail: string, token: string) {\n ... | typescript | edit | 0 | 3 | mit | d5a427f3c0460ab7fd181e1920affb65d014b9f5 | schulcloud/node-notification-service,schulcloud/node-notification-service,schulcloud/node-notification-service | src/services/DeviceService.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {DatetimeFieldDiff} from '../components/datetime'\nimport {UrlFieldDiff} from '../components/url'\nimport {SlugFieldDiff} from '../components/slug'\nimport {DiffComponentResolver} from '../types'\n\nexport const diffResolver: Dif... | typescript | edit | 0 | 5 | mit | abd547b29e9e746e6e33d88aa36a63da4850d067 | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | packages/@sanity/field/src/diff/resolve/diffResolver.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from \"react\";\nimport { render } from \"react-dom\";\nimport { App } from \"./App\";\n\nimport \"../node_modules/normalize.css/normalize.css\";\nimport \"../node_modules/draft-js/dist/Draft.css\";\nimport \"../src/st... | typescript | edit | null | null | mit | 26f099e882d9216bfaf666f22f8c433fb72039b0 | andrerpena/react-mde,andrerpena/react-mde,andrerpena/react-mde | demo/client.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport BookmarkRepository, {BookmarkItem} from \"../BookmarkRepository\";\nimport {HistoryItem} from \"../HistoryRepository\";\nimport PrefetchAndCache from \"./PrefetchAndCache\";\n\nconst COMPLETION_ITEM_LIMIT = 10;\n\nexport default ... | typescript | edit | 0 | 2 | mit | c48c7201adba45af5d72922e0aa5dda455548a84 | ueokande/vim-vixen,ueokande/vim-vixen,ueokande/vim-vixen | src/background/completion/impl/BookmarkRepositoryImpl.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport React from 'react';\nimport { DatabasePublicSetting } from \"../../publicSettings\";\nimport QuestionAnswerIcon from '@material-ui/icons/QuestionAnswer';\nimport PlayCircleOutlineIcon from '@material-ui/icons/PlayCircleOutline';\... | typescript | edit | 0 | 0 | mit | ec19cfaaac32cec93f1b9ead9a6febcf3813a153 | Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2 | packages/lesswrong/lib/collections/posts/constants.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Injectable } from \"@angular/core\";\nimport { Event } from \"./../models/event.model\";\nimport { Http, Response } from \"@angular/http\";\nimport { Observable } from \"rxjs/Observable\";\nimport \"rxjs/add/operator/map\";\n\... | typescript | edit | 0 | 1 | mit | 785e2a017bca4a18e142c511e528cdd713b70e2f | alex-arriaga/angular-conference-sgvirtual-2016,alex-arriaga/angular-conference-sgvirtual-2016,alex-arriaga/angular-conference-sgvirtual-2016 | app/services/events.service.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport axios from 'axios'\n\nconst client = axios.create({\n baseURL: 'https://registry.npmjs.org',\n})\n\n/**\n * Simple wrapper around the NPM API.\n */\nexport const npmClient = {\n getPackageManifest: async (name: string) =>\n ... | typescript | edit | 0 | 2 | mit | d6702e8c84be23f753f4321e40cf76e1b5d6de7f | jeffijoe/typesync,jeffijoe/typesync | src/npm-client.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport db from '../../db/mongodb';\n\nexport default db.get('drive_files') as any; // fuck type definition\n\nexport function validateFileName(name: string): boolean {\n\treturn (\n\t\t(name.trim().length > 0) &&\n\t\t(name.length <= 20... | typescript | edit | 0 | 5 | mit | 2230360e7ea01b97b2a46a545500f7b582c3c768 | Tosuke/misskey,Tosuke/misskey,Tosuke/misskey,syuilo/Misskey,armchair-philosophy/misskey,Tosuke/misskey,armchair-philosophy/misskey,ha-dai/Misskey,armchair-philosophy/misskey,Tosuke/misskey,syuilo/Misskey,armchair-philosophy/misskey,ha-dai/Misskey | src/api/models/drive-file.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Grid, Row, Column, Diagonal } from '../definitions';\n\nexport function getRows(grid: Grid): Row[] {\n const length = Math.sqrt(grid.length);\n const copy = grid.concat([]);\n return getArray(length).map(() => copy.splice(0,... | typescript | edit | 0 | 1 | mit | d2f47826315dbeb9f8fc712f41bb18599e5d5caf | artfuldev/tictactoe-ai,artfuldev/tictactoe-ai | src/utils/index.ts | rejected_duplicate | Near-duplicate of sample 115258 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport interface SortablejsOptions {\n group?: string | {\n name?: string;\n pull?: boolean | 'clone' | Function;\n put?: boolean | string[] | Function;\n revertClone?: boolean;\n };\n sort?: boolean;\n delay?: number;\n... | typescript | edit | 0 | 0 | mit | 19458f9bab3d5e303f074a7bd641ef90491795e6 | SortableJS/angular-sortablejs | src/sortablejs-options.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { tryToParseUnorderedList } from './tryToParseUnorderedList'\nimport { trytoParseOrderedList } from './tryToParseOrderedList'\nimport { tryToParseThematicBreakStreak } from './tryToParseThematicBreakStreak'\nimport { tryToParseBl... | typescript | edit | 0 | 1 | mit | cf508c10d2e682230600f1d97d05c4054b8959e4 | start/up,start/up | src/Parsing/Outline/isLineFancyOutlineConvention.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// Type definitions for gulp-jsonmin 1.1\n// Project: https://github.com/englercj/gulp-jsonmin\n// Definitions by: Romain Faust <https://github.com/romain-faust>\n// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped\n\n///... | typescript | edit | 0 | 0 | mit | 6013bd6f9de17f35884e59eade39fbdc6e766f55 | dsebastien/DefinitelyTyped,dsebastien/DefinitelyTyped,georgemarshall/DefinitelyTyped,borisyankov/DefinitelyTyped,AgentME/DefinitelyTyped,georgemarshall/DefinitelyTyped,georgemarshall/DefinitelyTyped,magny/DefinitelyTyped,mcliment/DefinitelyTyped,AgentME/DefinitelyTyped,magny/DefinitelyTyped,borisyankov/DefinitelyTyped,... | types/gulp-jsonmin/index.d.ts | accepted | null | true |
[
{
"role": "user",
"content": "Write typescript code for the following: Add properties to virtual machine class"
},
{
"role": "assistant",
"content": "\nexport class VirtualMachine {\n\n id: number;\n code: string;\n ipAddress: string;\n dns: string;\n osPlatform: string;\n ram: number;\n ... | typescript | new_file | 0 | 1 | mit | 404b3a03eb1f343db4040f160fefe91d94f79930 | railsstudent/angular2-appcheck,railsstudent/angular2-appcheck,railsstudent/angular2-appcheck | app/factory-virtualmachine/model/virtual-machine.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 | 5 | mit | bf8410fc6cd55c5816bf478e5c31c967fc70ebbf | hoovercj/vscode,eamodio/vscode,joaomoreno/vscode,microsoft/vscode,microsoft/vscode,hoovercj/vscode,the-ress/vscode,eamodio/vscode,joaomoreno/vscode,hoovercj/vscode,hoovercj/vscode,Microsoft/vscode,Krzysztof-Cieslak/vscode,microsoft/vscode,hoovercj/vscode,Microsoft/vscode,the-ress/vscode,joaomoreno/vscode,Krzysztof-Cies... | build/azure-pipelines/publish-types/check-version.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Component } from '@angular/core';\nimport { ActivatedRoute, Params, Router } from '@angular/router';\n\nimport { Coach } from '../../../models/index';\n\nimport { CoachService } from '../../../_services/index';\n\n@Component({\... | typescript | edit | 0 | 2 | mit | bdbcd6081e633de18a68919ee75fa382940043ec | XavierGuichet/bemoove-front,XavierGuichet/bemoove-front,XavierGuichet/bemoove-front | src/app/partner/coach/view/coach-view.component.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport type Cookie = any;\n\nexport interface CookieGetOptions {\n doNotParse?: boolean;\n}\n\nexport interface CookieSetOptions {\n path?: string;\n expires?: Date;\n maxAge?: number;\n domain?: string;\n secure?: boolean;\n htt... | typescript | edit | 0 | 0 | mit | 441474b9118279902eda690ea31b491b7a2a12ed | reactivestack/cookies,reactivestack/cookies,reactivestack/cookies,eXon/react-cookie | packages/universal-cookie/src/types.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport useSWR, { mutate } from 'swr';\nimport { useEffect, useState } from 'react';\nimport { formatApiPath } from '../../../../utils/format-path';\nimport { IStrategy } from '../../../../interfaces/strategy';\nimport handleErrorRespons... | typescript | edit | 0 | 3 | apache-2.0 | f6ce230fb40f6a7d6fa312d49f92d3c79b9ba73f | Unleash/unleash-frontend,Unleash/unleash-frontend,Unleash/unleash-frontend,Unleash/unleash-frontend | src/hooks/api/getters/useStrategies/useStrategies.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { CombatantState } from \"../../common/CombatantState\";\nimport { StatBlock } from \"../../common/StatBlock\";\n\nexport type Action =\n | AddCombatantFromState\n | AddCombatantFromStatBlock\n | RemoveCombatant\n | StartEnco... | typescript | edit | 0 | 0 | mit | 2c0b34f4e740e7d26d26d38298fc2e685d46d286 | cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative | client/Reducers/EncounterActions.tsx | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Component, OnInit } from '@angular/core';\nimport { Router, NavigationStart } from '@angular/router';\n\n@Component({\n selector: 'app-root',\n templateUrl: './app.component.html'\n})\nexport class AppComponent implements OnI... | typescript | edit | 0 | 3 | mit | 964ebdeaf942bf9d0e107f5655aa3df25b696683 | auth0-blog/ng2-dinos,kmaida/ng2-dinos,auth0-blog/ng2-dinos,kmaida/ng2-dinos,auth0-blog/ng2-dinos,kmaida/ng2-dinos | src/app/core/app.component.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport interface WpUser {\n id?: string;\n name?: string;\n url?: string;\n description?: string;\n slug?: string;\n avatar_urls?: {\n 24?: string,\n 48?: string,\n 96?: string\n };\n _links?: any;\n}\n\n```\n\nApply th... | typescript | edit | 0 | 0 | mit | a9e9b061600aae14ac902dc9dad4f2fb58b20503 | MurhafSousli/ng2-wp-api,MurhafSousli/ng2-wp-api | projects/core/src/lib/interfaces/wp-user.interface.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { ICipher } from \"./ICipher\";\n\nimport crypto = require(\"crypto\");\n\nexport class TripleDESCBC implements ICipher {\n private m_3DES: crypto.Cipher;\n\n public getName(): string {\n return \"3des-cbc\";\n }... | typescript | edit | 0 | 1 | mit | 276afa826b7328ae8ebc2fb096aa87963318ae87 | TyrenDe/SSHServer,TyrenDe/SSHServer | SSHServerNodeJS/SSHServerNodeJS/Ciphers/TripleDESCBC.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n\nimport * as React from 'react';\n\nimport MUICheckbox from 'material-ui/Checkbox';\n\nimport { IRevFieldTypeProps } from './types';\n\nexport default function BooleanField(props: IRevFieldTypeProps) {\n\n const onCheck = (event: an... | typescript | edit | null | null | mit | 153c954b5d1013759134d03a688435fe57e5e84b | RevFramework/rev-framework,RevFramework/rev-framework | packages/rev-forms-redux-mui/src/fields/BooleanField.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 * as Dropdown from 'react-bootstrap/lib/Dropdown';\n\nimport { translate } from '@waldur/i18n';\n\nimport { OfferingAction } from './types';\n\ninterface ActionsDropdownProps {\n actions?: Offeri... | typescript | edit | null | null | mit | e1ba7432bc929fed4087b992c7906b380867d314 | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport | src/marketplace/offerings/actions/ActionsDropdown.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/** Adapter to run Node.js bids-validator fullTest with minimal changes from Deno */\nimport { ValidatorOptions } from './setup/options.ts'\nimport { FileTree, BIDSFile } from './files/filetree.ts'\nimport { walkFileTree } from './schem... | typescript | edit | 0 | 2 | mit | 171ef8a0970555e942250036e7c03234c215ff9f | nellh/bids-validator,nellh/bids-validator,nellh/bids-validator | bids-validator/src/fulltest.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from 'react';\nimport {\n Headline,\n Markdown,\n Image,\n Paragraph,\n Avatar,\n Anchor,\n Article,\n} from 'components';\nconst {\n Container,\n AboutSection,\n AboutSectionInner,\n StyledHr,\n AvatarCont... | typescript | edit | null | null | mit | 4fe755eb776835e01eaa279b0ef53294493d715a | scalable-react/scalable-react-typescript-boilerplate,scalable-react/scalable-react-typescript-boilerplate,scalable-react/scalable-react-typescript-boilerplate | src/containers/About/index.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/// <reference path='fourslash.ts'/>\n\n////var x: Array<numb/*a*/;\n////[].map<numb/*b*/;\n////1 < Infini/*c*/;\n\nfor (const marker of [\"a\", \"b\"]) {\n goTo.marker(marker);\n verify.completionListContains(\"number\");\n ve... | typescript | edit | 0 | 0 | apache-2.0 | e74c03aca3e44419c301b526b8b7a0277cc6811b | kpreisser/TypeScript,TukekeSoft/TypeScript,mihailik/TypeScript,DLehenbauer/TypeScript,TukekeSoft/TypeScript,weswigham/TypeScript,minestarks/TypeScript,jwbay/TypeScript,TukekeSoft/TypeScript,minestarks/TypeScript,mihailik/TypeScript,RyanCavanaugh/TypeScript,erikmcc/TypeScript,SaschaNaz/TypeScript,DLehenbauer/TypeScript,... | tests/cases/fourslash/tsxCompletionNonTagLessThan.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nimport * as sanitize from 'sanitize-html';\n\n\n/**\n * A class to sanitize HTML strings.\n *\n * #### Notes\n * This class should ... | typescript | edit | 0 | 1 | bsd-3-clause | d66250f0700a4e641836e25ce286828e032d72ce | charnpreetsingh185/jupyterlab,charnpreetsingh185/jupyterlab,TypeFox/jupyterlab,eskirk/jupyterlab,jupyter/jupyterlab,eskirk/jupyterlab,jupyter/jupyterlab,eskirk/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,TypeFox/jupyterlab,charnpreetsingh185/jupyterlab,jupyter/jupyterlab,charnpreetsingh185/jupyterlab,TypeFox/jupyt... | src/sanitizer/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { messages } from '@cucumber/messages'\nimport { GherkinDocumentList, QueriesWrapper } from '@cucumber/react'\nimport { Query as GherkinQuery } from '@cucumber/gherkin'\nimport { Query as CucumberQuery } from '@cucumber/query'\ni... | typescript | edit | null | null | mit | 459b8ffcff638967c9254b4d958620f1c9f166c0 | cucumber/cucumber,cucumber/cucumber,cucumber/cucumber,cucumber/cucumber,cucumber/cucumber,cucumber/cucumber,cucumber/cucumber,cucumber/cucumber,cucumber/cucumber,cucumber/cucumber,cucumber/cucumber,cucumber/cucumber | html-formatter/javascript/src/main.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.