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 Config from '../../Config';\nimport Component from './Component';\n\nclass Spinner extends Component {\n constructor() {\n super();\n }\n\n public render(): void {\n let width: number = this.config.get('ima... | typescript | edit | 0 | 3 | apache-2.0 | 75ea14061485456441ce80ec5c4bd3604ced4e23 | proteus-h2020/proteic,proteus-h2020/proteus-charts,proteus-h2020/proteic,proteus-h2020/proteic | src/svg/components/Spinner.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n///<reference path=\"../../../.d.ts\"/>\n\"use strict\";\n\nimport options = require(\"./../../options\");\nimport helpers = require(\"./../../helpers\");\n\nexport class RunApplicationOnDeviceCommand implements ICommand {\n\n\tconstruc... | typescript | edit | 0 | 2 | apache-2.0 | 59836faeabaa39b69cf7dad0334e72d51a61b3b6 | telerik/mobile-cli-lib,telerik/mobile-cli-lib | commands/device/run-application.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport Vuex from 'vuex'\nimport {shallowMount, createLocalVue} from '@vue/test-utils'\n\nexport const mountMixin = (\n component: object,\n mountOptions: object = {},\n template: string = '<div />'\n) => {\n const localVue = createL... | typescript | edit | 0 | 1 | mit | a278e719ebaa497bb75a8f82c7ddf938b8478a24 | DivanteLtd/vue-storefront,pkarw/vue-storefront,pkarw/vue-storefront,DivanteLtd/vue-storefront,pkarw/vue-storefront,DivanteLtd/vue-storefront,pkarw/vue-storefront,DivanteLtd/vue-storefront | test/unit/utils/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { createCollection } from '../../vulcan-lib';\nimport schema from './schema';\nimport { makeEditable } from '../../editor/make_editable';\nimport { addUniversalFields, getDefaultResolvers, getDefaultMutations } from '../../collec... | typescript | edit | 0 | 2 | mit | bf548c07630f22949808e36142af13d5c77fbd99 | Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope | packages/lesswrong/lib/collections/books/collection.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.\n\nimport expect = require('expect.js');\n\nimport {\n MockServiceManager\n} from 'jupyter-js-services/lib/mockmanager';\n\nimport ... | typescript | edit | 0 | 1 | bsd-3-clause | bdadb1f83da249d86a3d41639355626602bc287e | eskirk/jupyterlab,charnpreetsingh185/jupyterlab,jupyter/jupyterlab,eskirk/jupyterlab,jupyter/jupyterlab,charnpreetsingh185/jupyterlab,jupyter/jupyterlab,eskirk/jupyterlab,eskirk/jupyterlab,charnpreetsingh185/jupyterlab,charnpreetsingh185/jupyterlab,jupyter/jupyterlab,eskirk/jupyterlab,jupyter/jupyterlab,charnpreetsingh... | test/src/filebrowser/model.spec.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport React from \"react\";\n\n/**\n * A hook that fetches JSON data from a URL using a GET request\n *\n * @param url: URL to fetch data from\n */\nexport function useFetch(url: string): any {\n const [data, setData] = React.useState... | typescript | edit | 0 | 4 | apache-2.0 | 1a46e41ccb3b2f164f8ab0ad708f5d7b32a11972 | googleinterns/step250-2020,googleinterns/step250-2020,googleinterns/step250-2020,googleinterns/step250-2020 | coffee-chats/src/main/webapp/src/util/fetch.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport React from 'react'\nimport {\n FilterContainer,\n FilterProps,\n CategoryLabel,\n} from 'v2/components/AdvancedSearch/components/AdvancedSearchFilter'\nimport { FilterOption } from 'v2/components/AdvancedSearch/components/Adva... | typescript | edit | null | null | mit | 5a15e92f268cff9c0a823f4d583c2b2b95f7d091 | aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell | src/v2/components/AdvancedSearch/components/AdvancedSearchFilter/components/FieldsFilter/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'/>\r\n\r\n////interface Collection<T, U> {\r\n////}\r\n////\r\n////interface Combinators {\r\n//// map<T, U>(c: Collection<T,U>, f: (x: T, y: U) => any): Collection<any, any>;\r\n//// map<T, U, V>... | typescript | edit | 0 | 0 | apache-2.0 | 140d6ad27886e84cae643392ea39d801a1020dc4 | fdecampredon/jsx-typescript-old-version,popravich/typescript,popravich/typescript,mbrowne/typescript-dci,hippich/typescript,hippich/typescript,mbebenita/shumway.ts,mbrowne/typescript-dci,popravich/typescript,mbebenita/shumway.ts,hippich/typescript,mbebenita/shumway.ts,fdecampredon/jsx-typescript-old-version,mbrowne/typ... | tests/cases/fourslash/genericCombinators3.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from \"react\";\nimport {FormGroupContext, FormGroupContextTypes} from \"../FormGroup/FormGroupContext\";\nimport {InputContext, InputContextTypes} from \"./InputContext\";\nimport {BaseInput} from \"./BaseInput\";\n\n... | typescript | edit | null | null | mit | 22651f5d3a8c823215e611c8cc6c3bbc68476ce8 | Horat1us/react-context-form,Horat1us/react-context-form | src/Input/NumericInput.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"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 | 0 | mit | e9abb31537a2c0c31410fec665e6e50e65c28faf | eamodio/vscode,Microsoft/vscode,Microsoft/vscode,microsoft/vscode,Krzysztof-Cieslak/vscode,microsoft/vscode,Microsoft/vscode,Microsoft/vscode,microsoft/vscode,Microsoft/vscode,eamodio/vscode,Krzysztof-Cieslak/vscode,eamodio/vscode,Krzysztof-Cieslak/vscode,microsoft/vscode,Microsoft/vscode,eamodio/vscode,Krzysztof-Ciesl... | src/vs/workbench/contrib/notebook/browser/constants.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// Type definitions for task-worklet 0.1\n// Project: https://github.com/GoogleChromeLabs/task-worklet\n// Definitions by: Karol Majewski <https://github.com/karol-majewski>\n// Definitions: https://github.com/DefinitelyTyped/Definitely... | typescript | edit | 0 | 1 | mit | 336e93f3bc77af25c7a81c4ebacd949fdd12af96 | magny/DefinitelyTyped,borisyankov/DefinitelyTyped,mcliment/DefinitelyTyped,borisyankov/DefinitelyTyped,georgemarshall/DefinitelyTyped,georgemarshall/DefinitelyTyped,dsebastien/DefinitelyTyped,markogresak/DefinitelyTyped,georgemarshall/DefinitelyTyped,georgemarshall/DefinitelyTyped,magny/DefinitelyTyped,dsebastien/Defin... | types/task-worklet/index.d.ts | accepted | null | true |
[
{
"role": "user",
"content": "Write typescript code for the following: Add implimentation of MongooseChartDataProvider to prometheus service."
},
{
"role": "assistant",
"content": "import { Observable } from 'rxjs';\nimport { PrometheusApiService } from '../services/prometheus-api/prometheus-api... | typescript | new_file | 0 | 1 | mit | 71652865f6af409a07d3058ce86bb375e9461553 | emc-mongoose/console,emc-mongoose/console,emc-mongoose/console | console/src/app/core/models/prometheus-chart-dao.mode.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.\n */\n\nimport { AuthenticationResult, ClientCredentialRequest, OnBehalfOfRequest } from \"@azure/msal-common\";\nimport { NodeConfigur... | typescript | edit | 0 | 1 | mit | b619a44b5dfcc95db028034dd1f9a05b859f28ba | AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication... | lib/msal-node/src/client/IConfidentialClientApplication.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { GraphQLSchema } from \"graphql\"\n\nexport const consignmentStitchingEnvironment = (\n localSchema: GraphQLSchema,\n convectionSchema: GraphQLSchema & { transforms: any }\n) => ({\n // The SDL used to declare how to stitch a... | typescript | edit | 0 | 1 | mit | 8eee3cab5013253a58ef9cbb183cfbf9d37f7e0d | artsy/metaphysics,artsy/metaphysics,artsy/metaphysics | src/lib/stitching/convection/stitching.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n///<reference path=\"../../../.d.ts\"/>\n\"use strict\";\n\nimport {ApplicationManagerBase} from \"../../application-manager-base\";\nimport Future = require(\"fibers/future\");\n\nexport class IOSSimulatorApplicationManager extends App... | typescript | edit | 0 | 3 | apache-2.0 | aa3482633b2af29642343f2c890a7363366637ff | telerik/mobile-cli-lib,telerik/mobile-cli-lib | mobile/ios/simulator/ios-simulator-application-manager.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/// <reference path='../../typings/express/express.d.ts' />\nimport express = require('express');\nvar app = express();\n\napp.get('/', function (req, res) {\n res.send('Hello World!');\n});\n\napp.use(express.static('public'));\nvar s... | typescript | edit | 0 | 1 | mit | 38fc8a00fe4dfa7d2e47da48fe98633e372753e8 | ku-kueihsi/dummy_react,ku-kueihsi/dummy_react,ku-kueihsi/dummy_react | src/server/app.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport styled from 'styled-components';\n\nimport opacity from '../../../../shared/defaults/opacity';\nimport typography from '../../../../shared/mixins/typography';\nimport images from '../../../../shared/mixins/images';\n\nexport cons... | typescript | edit | 0 | 0 | apache-2.0 | 4ed3b4514d74b7488c7fbf5e5bd2118193f62171 | Nersent/Wexond,Nersent/Wexond | src/newtab/components/WeatherCard/ForecastItem/styles.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { execSync } from \"child_process\";\n\nexport class GitCmdClient {\n\n currentName() {\n return execSync(\"git branch | grep \\\"^\\\\*\\\" | cut -b 3-\", { encoding: \"utf8\" });\n }\n\n revParse(currentName: string) {\n ... | typescript | edit | 0 | 1 | mit | 51094e0542c73d073c1c00329ce48332817c6ff6 | reg-viz/reg-suit,reg-viz/reg-suit,reg-viz/reg-suit,reg-viz/reg-suit | packages/reg-keygen-git-hash-plugin/src/git-cmd-client.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { commands } from 'vscode';\nimport * as subwordNavigation from './commands';\n\nexport function activate() {\n commands.registerTextEditorCommand(\n 'subwordNavigation.cursorSubwordLeft',\n subwordNavigation.cur... | typescript | edit | 0 | 1 | mit | 808f01f528291852ce8ffe2d0b83e0104da3174a | ow--/vscode-subword-navigation | src/extension.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {\n GraphQLObjectType,\n GraphQLInputObjectType,\n GraphQLEnumType,\n GraphQLString,\n} from 'graphql'\nimport { MemberType } from './../models'\n\nconst MutableUserFields = {\n firstName: { type: GraphQLString },\n lastNam... | typescript | edit | 0 | 0 | mit | 1a80c21b3532daec1ec82cf260f4e388afd262ea | studieresan/overlord,studieresan/overlord,studieresan/overlord,studieresan/overlord,studieresan/overlord | src/graphql/GraphQLUser.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/// Extract the name of a function (the `name' property does not appear to be set\n/// in some cases). A variant of this appeared in older Augury code and it appears\n/// to cover the cases where name is not available as a property.\nex... | typescript | edit | 0 | 5 | mit | caa6d0f063d82688144e3f50db0682ec0524aaca | rangle/batarangle,rangle/augury,rangle/batarangle,rangle/augury,rangle/augury,rangle/batarangle,rangle/augury,rangle/batarangle | src/utils/function-name.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// import from npm\nimport * as Map from \"es6-map\";\nimport { assignIn } from \"lodash\";\n\n// declare an interface for the object that is\n// used to describe each link and stored in the\n// map\ninterface LinkState {\n hasLoaded... | typescript | edit | 0 | 3 | mit | d2af2581556b032e2954ea0562cf0e0458bbdd17 | Josh-ES/react-here-maps,Josh-ES/react-here-maps | src/utils/get-link.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/*\nCopyright 2020 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n h... | typescript | edit | 0 | 1 | apache-2.0 | 38bf1680a242ea8d50176791354a58326db54adc | matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk | src/utils/units.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n\nimport {expect} from \"chai\";\nimport {EventClassMap} from \"../../../main/Apha/EventStore/EventClassMap\";\nimport {Event, EventType} from \"../../../main/Apha/Message/Event\";\nimport {UnknownEventException} from \"../../../main/Ap... | typescript | edit | 0 | 1 | mit | 04499b910153a72ff96e1aeaece9b4738e3a65c2 | martyn82/aphajs | src/test/Apha/EventStore/EventClassMap.spec.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 | 0 | mit | 4bfec9c80f2d6b7f4546df0d68b756e555a606c9 | eamodio/vscode,eamodio/vscode,mjbvz/vscode,joaomoreno/vscode,microsoft/vscode,Microsoft/vscode,eamodio/vscode,hoovercj/vscode,eamodio/vscode,joaomoreno/vscode,Krzysztof-Cieslak/vscode,hoovercj/vscode,Microsoft/vscode,microsoft/vscode,the-ress/vscode,the-ress/vscode,Microsoft/vscode,Krzysztof-Cieslak/vscode,joaomoreno/v... | extensions/typescript-language-features/src/utils/languageDescription.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {QiitaItems} from \"./QiitaItems\";\nimport {QiitaPresenter} from \"./QiitaPresenter\";\nimport {QiitaWidgetParam} from \"./interface\";\n\nexport default class QiitaWidget {\n\n private conf: QiitaWidgetParam;\n private presen... | typescript | edit | 0 | 1 | mit | 8b44df04fc7b7245e337780c7d48fbb71e78e69a | hokkey/qiita-widget-js,hokkey/qiita-widget-js,hokkey/qiita-widget-js | lib/QiitaWidget.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n// MODULES\nimport { SharedModule } from '../../shared-module/shared-module.module';\n\n// COMPONENTS\nimport { ListBrowserComponent } from '.... | typescript | edit | 0 | 0 | mit | 66ec22eedeac820177f49e897bf6ddd417eebd0a | Picturepark/Picturepark.SDK.TypeScript,Picturepark/Picturepark.SDK.TypeScript,Picturepark/Picturepark.SDK.TypeScript | src/picturepark-sdk-v1-angular/projects/picturepark-sdk-v1-angular-ui/src/lib/features-module/list-browser/list-browser.module.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { baseGenerator, Generator } from '../baseGenerator';\n\nconst generator: Generator = async (packageManager, npmOptions, options) => {\n baseGenerator(packageManager, npmOptions, options, 'preact');\n};\n\nexport default generat... | typescript | edit | 0 | 1 | mit | 0d26f7ef6b16f4cbe24801b0e3927c62e6e43492 | kadirahq/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook | lib/cli/src/generators/PREACT/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport React, { useState, useEffect } from 'react';\nimport { useParams } from 'react-router-dom';\nimport { search } from './search';\nimport DocumentTeaser from './DocumentTeaser';\nimport { Container } from 'react-bootstrap';\n\nexpo... | typescript | edit | null | null | apache-2.0 | 76dff867caf497ca1463373abf5844d38b2e8406 | dainst/idai-field-web,dainst/idai-field-web,dainst/idai-field-web | ui/src/Project.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport Middleware from \"./types/Middleware\";\nimport Setup from \"./types/Setup\";\nimport Results from \"./types/Results\";\nimport { EventEmitter } from \"events\";\nimport notEmpty from \"./utils/notEmpty\";\n\n/**\n * Returns a fu... | typescript | edit | 0 | 1 | mit | 442da7dd13b365f9017b59ca285e9f0230d61d05 | testingrequired/tf,testingrequired/tf | src/config.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { BrowserModule } from '@angular/platform-browser';\nimport { NgModule } from '@angular/core';\nimport { HttpClientModule } from '@angular/common/http';\nimport { GoogleMapsModule } from '@angular/google-maps';\nimport { MatCardM... | typescript | edit | 0 | 0 | apache-2.0 | f50862e3b043b30b323454529cb6ca9b495d7aa5 | googleinterns/step263-2020,googleinterns/step263-2020,googleinterns/step263-2020,googleinterns/step263-2020 | capstone-project/src/main/angular-webapp/src/app/app.module.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n'use strict';\n\nimport {ChildProcess, spawn} from 'child_process';\nimport {ProjectWorkspace} from './project_workspace';\n\n/**\n * Spawns and returns a Jest process with specific args \n * \n * @param {string[]} args\n * @returns {Ch... | typescript | edit | 0 | 2 | mit | 072e1744332d7c60d529a281a101b82c1fc416d2 | orta/vscode-jest,bookman25/vscode-jest,orta/vscode-jest,bookman25/vscode-jest,bookman25/vscode-jest,orta/vscode-jest | src/lib/jest_process.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport fs = require(\"fs\");\nimport { exec } from \"shelljs\";\n\nfunction cmd(command: string): string {\n const result: any = exec(command);\n return result.stdout.trim().replace(\"\\r\\n\", \"\\n\");\n}\n\nconst currentBranch ... | typescript | edit | 0 | 1 | mit | bfdb047521856ea93a79e7b392f84132255c90a9 | mmkal/slimejs,mmkal/slimejs,mmkal/slimejs,mmkal/slimejs | transpilation/deploy.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/**\n * Created by wiekonek on 13.12.16.\n */\nimport {Http, RequestOptions, URLSearchParams} from \"@angular/http\";\nimport {Observable} from \"rxjs\";\nimport {AppAuthenticationService} from \"../../app-authentication.service\";\nimp... | typescript | edit | 0 | 2 | mit | e0704ef05932c185feebc29199b99f776ef14e1f | JiraGoggles/jiragoggles-frontend,JiraGoggles/jiragoggles-frontend,JiraGoggles/jiragoggles-frontend,JiraGoggles/jiragoggles-frontend | src/app/cardsView/services/base-card.service.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Provider, OpaqueToken } from 'angular2/core';\n\nenum Sign {\n\tpositive = 1,\n\tnegative = -1,\n}\n\nexport interface INumberUtility {\n\tpreciseRound(num: number, decimals: number): number;\n\tintegerDivide(dividend: number,... | typescript | edit | 0 | 3 | mit | bae1a1d3a3a2053753f47d5faea1bda78dbd10ab | RenovoSolutions/TypeScript-Angular-Utilities,RenovoSolutions/TypeScript-Angular-Utilities,SamGraber/TypeScript-Angular-Utilities,SamGraber/TypeScript-Angular-Utilities | source/services/number/number.service.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nconst chordNames = `[A-G][#|b]?`\nconst qualities = `min|m|dim|aug|sus[249]?`\n\nconst degrees = `(#|b|M|maj)?(2|3|4|5|6|7|9|11|13)`\nconst extensions = `[\\\\(]?[add|sub]?${degrees}[\\\\)]?`\nconst slashChordPattern = `\\\\/${chordName... | typescript | edit | 0 | 0 | mit | 7b1580e928d5e1425de52f6f4511adfc0c00582d | gldraphael/chordsheet | src/chord-regex.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/* tslint:disable:no-unused-variable */\nimport { async, ComponentFixture, TestBed } from '@angular/core/testing';\nimport { By } from '@angular/platform-browser';\nimport { DebugElement } from '@angular/core';\n\nimport { DashboardComp... | typescript | edit | 0 | 1 | apache-2.0 | 6a5e3ada5f3e8d21624d8600a2e643d4cc575c91 | emielkwakkel/angular-course,emielkwakkel/angular-2-course,emielkwakkel/angular-2-course,emielkwakkel/angular-course,emielkwakkel/angular-course,emielkwakkel/angular-2-course | src/app/dashboard/dashboard.component.spec.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { StackNode } from '.';\n\nexport class Stack<T> {\n public top: StackNode<T>;\n public size: number = 0;\n\n public push(data: T): void {\n this.top = new StackNode(data, this.top);\n ++this.size;\n }\n... | typescript | edit | 0 | 2 | mit | 9c2bee5ee4415dba9f0f89a9b5cf396c54abfb27 | worsnupd/ts-data-structures | src/stack/stack.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Middleware } from '../index'\nimport { Logger } from '../utils/logger'\nimport { argsParser } from './argsParser'\nimport { commandCaller } from './commandCaller'\nimport { commandFinder } from './commandFinder'\nimport { error... | typescript | edit | 0 | 0 | mit | 491f099cfe63b26bed0d3126eeaaa4f98c1ee8d2 | pawelgalazka/microcli,pawelgalazka/microcli | src/middlewares/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Injectable } from '@angular/core'\nimport { CanActivate } from '@angular/router'\nimport { Store } from '@ngrx/store'\nimport { Observable } from 'rxjs/Observable'\nimport { of } from 'rxjs/observable/of'\nimport { map, take, t... | typescript | edit | 0 | 3 | apache-2.0 | 147fbcc2523f8ef5f606db2ce12eaab8bc943cb7 | RADAR-CNS/RADAR-Dashboard,RADAR-CNS/RADAR-Dashboard,RADAR-CNS/RADAR-Dashboard,RADAR-CNS/RADAR-Dashboard | src/app/auth/services/auth.guard.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {Injectable, Pipe, PipeTransform} from '@angular/core';\nimport {FunctionInfo} from '../models/function-info';\n\n@Pipe({\n name: 'sidebarFilter',\n pure: false\n})\n@Injectable()\nexport class SideBarFilterPipe implements... | typescript | edit | 0 | 6 | apache-2.0 | 6b9a77545668070b927be5505f678ce45cbc072a | agruning/azure-functions-ux,chunye/azure-functions-ux,projectkudu/AzureFunctions,agruning/azure-functions-ux,agruning/azure-functions-ux,projectkudu/WebJobsPortal,projectkudu/AzureFunctions,chunye/azure-functions-ux,projectkudu/WebJobsPortal,chunye/azure-functions-ux,projectkudu/WebJobsPortal,chunye/azure-functions-ux,... | AzureFunctions.Client/app/pipes/sidebar.pipe.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as chai from 'chai'\nconst expect = chai.expect\n\nimport * as React from 'react'\nimport * as ReactDOM from 'react-dom'\nimport * as TestUtils from 'react-addons-test-utils'\n\nimport App from '../src/ui/app'\nimport { Dispatc... | typescript | edit | null | null | mit | 8369a9e45a9c3f454d07334b416d3ec8caf47cca | desktop/desktop,kactus-io/kactus,BugTesterTest/desktops,shiftkey/desktop,desktop/desktop,desktop/desktop,j-f1/forked-desktop,BugTesterTest/desktops,artivilla/desktop,artivilla/desktop,say25/desktop,shiftkey/desktop,artivilla/desktop,gengjiawen/desktop,hjobrien/desktop,j-f1/forked-desktop,desktop/desktop,gengjiawen/desk... | app/test/app-test.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 { Validators, FormBuilder, FormGroup } from '@angular/forms';\n\n\n\n@Component({\n selector: 'page-login',\n templateUrl: 'login.html'\n})\nexport class LoginPage {\n\n loginForm: F... | typescript | edit | 0 | 1 | mit | fdab34aa2d3c9163d7a766242ceddd511797a76a | IMSmobile/app,IMSmobile/app,IMSmobile/app,IMSmobile/app | src/pages/login/login.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/*\n * Copyright (C) 2016 Chi Vinh Le and contributors.\n *\n * This software may be modified and distributed under the terms\n * of the MIT license. See the LICENSE file for details.\n */\nimport { default as defaultJSS } from \"jss\";... | typescript | edit | 0 | 1 | mit | 0ffabea9998a369d2d7c816b1c2abe2f7e6315ea | wikiwi/react-jss-theme,wikiwi/react-jss-theme,wikiwi/react-jss-theme | src/themefactory.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as restify from 'restify';\nimport * as builder from 'botbuilder';\nimport * as os from 'os';\n\nconst connector = new builder.ChatConnector({\n appId: process.env.MICROSOFT_APP_ID,\n appPassword: process.env.MICROSOFT_AP... | typescript | edit | 0 | 1 | mit | ff45079872fe6473b0618443f7e06250506b8aae | radu-matei/kube-bot,radu-matei/kube-bot | bot/app.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/// <reference path=\"fourslash.ts\"/>\r\n\r\n////interface Number {\r\n//// toString(radix?: number): string;\r\n//// toFixed(fractionDigits?: number): string;\r\n//// toExponential(fractionDigits?: number): string;\r\n//// ... | typescript | edit | 0 | 0 | apache-2.0 | e5a8592786d503c84d7439fc1aeb8cbec9e0713c | mbebenita/shumway.ts,hippich/typescript,hippich/typescript,fdecampredon/jsx-typescript-old-version,mbrowne/typescript-dci,hippich/typescript,mbrowne/typescript-dci,popravich/typescript,mbrowne/typescript-dci,mbebenita/shumway.ts,fdecampredon/jsx-typescript-old-version,mbebenita/shumway.ts,fdecampredon/jsx-typescript-ol... | tests/cases/fourslash/completionListInFunctionExpression.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Injectable } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\n\nimport { StorageService } from './storage.service';\nimport { userDataModel } from './models';\n\n@Injectable()\nexport class MRSService {\n de... | typescript | edit | 0 | 1 | mit | a9b09bbacb4cadee3ecc18602822d3c04d59ded9 | SBats/marvel-reading-stats-frontend,SBats/marvel-reading-stats-frontend,SBats/marvel-reading-stats-frontend | src/app/shared/mrs.service.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as fs from 'fs';\nimport * as path from 'path';\n\n/**\n * Recursively creates the directory structure if not exists\n * @param fullPath the path to create in Linux format\n */\nexport function createRecursive(fullPath: string)... | typescript | edit | 0 | 4 | mit | 9afcabefa3605bc8051dfca36696cafa54a3b02f | arijoon/vendaire-discord-bot,arijoon/vendaire-discord-bot | src/helpers/file.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport React from 'react';\nimport { requireNativeComponent, Platform } from 'react-native';\ndeclare var NVBarButton: any;\n\nvar BarButtonIOS = props => <NVBarButton key={props.systemItem} {...props} />;\n\nexport default Platform.OS ... | typescript | edit | null | null | apache-2.0 | a023b90521def7227a577cd80f73d48b1d587a95 | grahammendick/navigation,grahammendick/navigation,grahammendick/navigation,grahammendick/navigation,grahammendick/navigation,grahammendick/navigation,grahammendick/navigation | NavigationReactNative/src/BarButtonIOS.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'\r\nimport { StyleContext, TypeContext } from '../Lines';\r\nimport { classes, addClass } from '../Globals';\r\n\r\nimport \"./Lines.css\"\r\n\r\nexport interface FormControlReadonlyProps extends React.Pro... | typescript | edit | null | null | mit | c14a8f1ed8d86379bf6b978e604de618250f8698 | AlejandroCano/framework,signumsoftware/framework,signumsoftware/framework,avifatal/framework,avifatal/framework,AlejandroCano/framework | Signum.React/Scripts/Lines/FormControlReadonly.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 { Mode } from '../mode.enum';\nimport { PresentationComponent } from '../presentation/presentation.component';\n\n@Component({\n selector: 'slides-mode-overview',\n templateUrl: './mo... | typescript | edit | 0 | 2 | apache-2.0 | 8091da5335d1ae16471db3b21bd1294681c13349 | nycJSorg/angular-presentation,nycJSorg/angular-presentation,nycJSorg/angular-presentation | src/app/presentation/mode-overview/mode-overview.component.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { QueryParams } from \"../../clientUtils/urls/UrlUtils\"\nimport { Url } from \"../../clientUtils/urls/Url\"\nimport { EXPLORERS_ROUTE_FOLDER } from \"../ExplorerConstants\"\n\nexport const decodeURIComponentOrUndefined = (value:... | typescript | edit | 0 | 5 | mit | be9a099658f08419fb45f2ca70b895c66ab2250d | OurWorldInData/owid-grapher,OurWorldInData/owid-grapher,owid/owid-grapher,owid/owid-grapher,owid/owid-grapher,owid/owid-grapher,OurWorldInData/owid-grapher,OurWorldInData/owid-grapher,owid/owid-grapher,OurWorldInData/owid-grapher | explorer/urlMigrations/ExplorerUrlMigrationUtils.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {OTWSBookItForMeRequestRequest} from \"../book-it-for-me-request/otws-book-it-for-me-request-request\";\n\nexport class OTWSBookABusinessForMeRequestRequest extends OTWSBookItForMeRequestRequest implements OTWSAPIRequest {\n\n ... | typescript | edit | 0 | 1 | mit | e1e79c6857d57b3e6b5016c1038558775669b4fd | TimeRocket/TimeRocketTypeScriptBookerSDK,TimeRocket/TimeRocketTypeScriptBookerSDK | src/sdk/apis/business/appointment/book-a-business-for-me-request/otws-book-a-business-for-me-request-request.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport CartItem from '@vue-storefront/core/modules/cart/types/CartItem'\nimport { sha3_224 } from 'js-sha3'\n\nconst getDataToHash = (product: CartItem): any => {\n if (!product.product_option) {\n return null\n }\n\n const { exte... | typescript | edit | 0 | 16 | mit | 9bfd146cd646f137017b2fcaf43d196a25ff196f | DivanteLtd/vue-storefront,pkarw/vue-storefront,pkarw/vue-storefront,DivanteLtd/vue-storefront,pkarw/vue-storefront,DivanteLtd/vue-storefront,pkarw/vue-storefront,DivanteLtd/vue-storefront | core/modules/cart/helpers/productChecksum.ts | rejected_complexity | Cyclomatic complexity too high: 16 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// tslint:disable-next-line no-unused-variable\nimport * as React from 'react'\nimport { render } from 'react-dom'\nimport { Provider } from 'react-redux'\nimport { createStore, Store } from 'redux'\n\nimport { App } from './components/... | typescript | edit | null | null | unlicense | d85ec9c9db4a4c4ac9951c8bced086a986f20d84 | janaagaard75/framework-investigations,janaagaard75/framework-investigations,janaagaard75/framework-investigations,janaagaard75/framework-investigations | react-redux-todos/src/main.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport Breadcrumb from \"./breadcrumb\";\nimport * as common from \"./common\";\nimport Report from \"./report\";\nimport Session from \"./session\";\n\ndeclare class Client {\n public app: object;\n public device: object;\n public c... | typescript | edit | 0 | 1 | mit | 9ca4594b147a126d4393dd8b99d1e698af423a81 | bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js | packages/core/types/client.d.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/* tslint:disable:no-unused-variable */\n\n/*!\n * Home Component Test\n *\n * Copyright(c) Exequiel Ceasar Navarrete <<EMAIL>>\n * Licensed under MIT\n */\n\nimport { Renderer } from '@angular/core';\nimport { TestBed, async, inject } ... | typescript | edit | 0 | 1 | mit | d3c736e9bc547b02220a8639c0411c72886049bf | ecsnavarretemit/sarai-interactive-maps,ecsnavarretemit/sarai-interactive-maps,ecsnavarretemit/sarai-ng2,ecsnavarretemit/sarai-ng2,ecsnavarretemit/sarai-interactive-maps,ecsnavarretemit/sarai-ng2 | src/app/map/home/home.component.spec.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { updateValue } from './updateValue';\r\nimport { UPDATE_DB_SEARCH_TERM } from '../constants';\r\n\r\nexport interface UpdateDatabaseSearchTerm {\r\n readonly type: UPDATE_DB_SEARCH_TERM;\r\n readonly data: string;\r\n}\r\n\r\n... | typescript | edit | 0 | 1 | mit | 7911d8a673919aead9e9933a277772bf2bfd2fc5 | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | src/actions/databaseFilterSettings.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport * from './<%- ngModuleFilename.replace('.ts', '') %>';\n\n// all components that will be codegen'd need to be exported for AOT to work\nexport * from './helloWorld.component';\n```\n\nApply this change: Remove hack now angular bu... | typescript | edit | null | null | mit | 855d872d5160ef3388d69fc1ba41305218f0aca0 | mattlewis92/generator-angular-library,mattlewis92/generator-angular-library,mattlewis92/generator-angular-library | generators/app/templates/src/index.ts | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write typescript code for the following: Use `InjectionToken` instead of `OpaqueToken` to support Angular 5"
},
{
"role": "assistant",
"content": "import { InjectionToken } from '@angular/core';\n\nexport const EAGER_PROVIDER = new InjectionToken<any>('EAGER_PROVIDE... | typescript | new_file | 0 | 0 | mit | 2f45f3125136f245dcab9be961d906b288ade8bb | dscheerens/angular-eager-provider-loader,dscheerens/angular-eager-provider-loader | src/eager-provider.token.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {Filter, IFilter} from \"@tsed/common\";\n\n/**\n * @private\n * @filter\n */\n@Filter()\nexport class MultipartFileFilter implements IFilter {\n transform(expression: string, request: any, response: any) {\n return request[\... | typescript | edit | 0 | 2 | mit | 1a70bc95899a061a12c5ef76d81bd19a9b58c3bf | Romakita/ts-express-decorators,Romakita/ts-express-decorators,Romakita/ts-express-decorators,Romakita/ts-express-decorators | packages/multipartfiles/src/components/MultipartFileFilter.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Action } from \"./Action\";\nimport { ActionType } from \"./ActionType\";\nimport { StrayKittyState } from \"../StrayKittyState\";\nimport { StandingAction } from \"./StandingAction\";\n\nexport class FallingAction implements A... | typescript | edit | 0 | 3 | mit | 69bf3bf740c1cb4e6b7ef38378b53802128bf356 | xianbaum/StrayKitty,xianbaum/StrayKitty,xianbaum/StrayKitty | src/actions/FallingAction.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport isScrollContainer from './isScrollContainer'\n\nconst SCROLL_INTO_VIEW_TOP_PADDING = -15\n\nconst scrollIntoView = field => {\n const element = field.element\n\n let parentElementWithScroll = element.parentElement\n\n while (!... | typescript | edit | 0 | 3 | mit | b290ab519c17ee63e1bf537b0a4e25fa3edd86c0 | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | packages/@sanity/base/src/change-indicators/helpers/scrollIntoView.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as _ from \"lodash\";\n\nimport {\n DataTable,\n DataRow\n} from \"./table-models\";\n\nimport {\n TestCasesTable,\n TestCase,\n Step,\n CallExpression\n} from \"./models\";\n\nimport {\n parseIdentifier,\n parseValueEx... | typescript | edit | 0 | 4 | mit | c0d05b130cb4427c9d215b1380a68a152f2e8913 | tomi/vscode-rf-language-server,tomi/vscode-rf-language-server | server/src/parser/test-cases-table-parser.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from 'react'\nimport {Component, Children} from 'react'\nimport * as PropTypes from 'prop-types'\nimport * as classnames from 'classnames'\n\ninterface PaneProps {\n resizable?: boolean,\n allowFocus?: boolean,\n... | typescript | edit | null | null | mit | efdb1523309cf8af90be38b5faf7a62359366734 | Ragg-/Delir,Ragg-/Delir,Ragg-/Delir,Ragg-/Delir | src/frontend/views/components/pane.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport const shell = {\n moveItemToTrash: jest.fn(),\n}\n\nexport const remote = {\n app: {\n on: jest.fn(),\n },\n getCurrentWebContents: jest.fn().mockImplementation(() => ({\n on: jest.fn().mockImplementation(() => true),\n... | typescript | edit | 0 | 1 | mit | f7e70ed9ae092acca81e1606278f885fa632c377 | desktop/desktop,desktop/desktop,j-f1/forked-desktop,desktop/desktop,j-f1/forked-desktop,j-f1/forked-desktop,shiftkey/desktop,desktop/desktop,j-f1/forked-desktop,shiftkey/desktop,shiftkey/desktop,shiftkey/desktop | app/test/__mocks__/electron.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as preact from 'preact';\nimport { document } from 'global';\nimport dedent from 'ts-dedent';\nimport { RenderContext, StoryFnPreactReturnType } from './types';\n\nconst rootElement = document ? document.getElementById('root') ... | typescript | edit | 0 | 3 | mit | 57effc26d3616c5c2562d92f4713786b1e3dc760 | storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook | app/preact/src/client/preview/render.tsx | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Component, AfterViewInit } from '@angular/core';\nimport { LoginService } from './login.service';\n\n@Component({\n selector: 'login',\n templateUrl: 'client/components/login/login.component.html',\n styleUrls: ['clien... | typescript | edit | 0 | 1 | mit | 7c3b9587ef17bef39086d932f484587d15860dde | shavindraSN/examen,shavindraSN/examen,shavindraSN/examen | client/components/login/login.component.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {WorldState} from '../../models/WorldState';\nimport {IAction, ActionHelper} from '../../models/Action';\nimport {Utils} from '../../helpers/Utils';\nimport {RuleEngine, IRule... | typescript | edit | 0 | 5 | mit | 102f7bc8a2d82ace575e1eeb5a37809fc5ea95bd | TNOCS/csWeb-rules,TNOCS/csWeb-rules | src/engine/actions/sendImbMessage.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Issue } from '../types/issues.ts'\nimport { FileTree } from '../files/filetree.ts'\nimport { walkFileTree } from '../schema/walk.ts'\nimport { loadSchema } from '../setup/loadSchema.ts'\nimport { applyRules } from '../schema/ap... | typescript | edit | 0 | 4 | mit | 83178a6e8891a4903bed06179262d9296075f4ea | nellh/bids-validator,nellh/bids-validator,nellh/bids-validator | bids-validator/src/validators/bids.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Injectable } from '@angular/core';\nimport {\n HttpRequest,\n HttpHandler,\n HttpEvent,\n HttpInterceptor\n} from '@angular/common/http';\nimport { AuthService } from './auth.service';\nimport { Observable, throwError } fro... | typescript | edit | 0 | 1 | mit | d8801c4aac0cebc9992a00063717af502a3b6a0a | auth0-samples/auth0-angular-samples,auth0-samples/auth0-angular-samples,auth0-samples/auth0-angular-samples,auth0-samples/auth0-angular-samples | 02-Calling-an-API/src/app/auth/interceptor.service.ts | accepted | null | true |
[
{
"role": "user",
"content": "Write typescript code for the following: Fix test suite failures in Node.js"
},
{
"role": "assistant",
"content": "/// <amd-dependency path=\"intern/dojo/has!host-browser?./html\" />\nimport parser = require('./html/peg/html'); parser;\n"
}
] | typescript | new_file | 0 | 0 | bsd-3-clause | ac2c6a0f6744ccc78b95ca86db6dc463af9fc9c5 | QuinntyneBrown/mayhem,QuinntyneBrown/mayhem,jessevdk/mayhem,SitePen/mayhem,SitePen/mayhem,SitePen/mayhem,QuinntyneBrown/mayhem,QuinntyneBrown/mayhem,jkieboom/mayhem,jessevdk/mayhem,jkieboom/mayhem,jessevdk/mayhem,SitePen/mayhem,jessevdk/mayhem,jkieboom/mayhem,jkieboom/mayhem | tests/unit/templating/all.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Chart } from '../../components/charts/Chart';\nimport * as React from 'react';\nimport * as c3 from 'c3';\nimport { Link } from 'react-router';\nimport { connect } from 'react-redux';\nimport { IApplicationState } from '../../... | typescript | edit | null | null | apache-2.0 | 4c2c4efa519b831e9d8bffd730001d91f3636e88 | projecteon/thecollection,projecteon/thecollection,projecteon/thecollection,projecteon/thecollection | TheCollection.Web/ClientApp/views/tea/Dashboard.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 { ButtonGroup } from '../lib/button-group'\nimport { Button } from '../lib/button'\nimport { Ref } from '../lib/ref'\nimport { Octicon, OcticonSymbol } from '../octicons'\nimport { Branch } from '.... | typescript | edit | null | null | mit | 08489801b7ea280295c799d67a4a967a0c4a415f | desktop/desktop,kactus-io/kactus,artivilla/desktop,kactus-io/kactus,shiftkey/desktop,kactus-io/kactus,shiftkey/desktop,j-f1/forked-desktop,desktop/desktop,j-f1/forked-desktop,artivilla/desktop,say25/desktop,desktop/desktop,j-f1/forked-desktop,j-f1/forked-desktop,kactus-io/kactus,desktop/desktop,artivilla/desktop,shiftk... | app/src/ui/notification/new-commits-banner.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { CustomElementConstructor } from './types';\r\nimport { name } from './name.js';\r\n\r\nexport function define(Ctor: CustomElementConstructor): CustomElementConstructor {\r\n customElements.define(Ctor.is || name(), Ctor);\r\n ... | typescript | edit | 0 | 2 | mit | bece36886c36c99e6704b58dac39ee8cabbc2d8d | skatejs/skatejs,skatejs/skatejs,skatejs/skatejs | packages/skatejs/src/define.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from 'react';\n\nexport interface IProps {\n name: string;\n enthusiasmLevel?: number;\n}\n\nfunction Hello({ name, enthusiasmLevel = 1 }: IProps) {\n if (enthusiasmLevel <= 0) {\n throw new Error('You ... | typescript | edit | null | null | apache-2.0 | 5687c45abb924cfa88888c545de2e8b94bfccaa2 | ettiennegous/online-eitris,ettiennegous/online-eitris | src/components/Hello.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {Component, OnInit, EventEmitter} from 'angular2/core';\nimport {FunctionBinding} from '../models/function-config';\nimport {Binding, BindingOption} from '../models/designer-schema';\n\n\n@Component({\n selector: 'binding-desi... | typescript | edit | 0 | 6 | apache-2.0 | dcc1eaec8bf4006b4d7305af1fa603f87c8bdc9e | agruning/azure-functions-ux,agruning/azure-functions-ux,projectkudu/WebJobsPortal,projectkudu/AzureFunctions,projectkudu/WebJobsPortal,projectkudu/AzureFunctions,chunye/azure-functions-ux,projectkudu/AzureFunctions,agruning/azure-functions-ux,chunye/azure-functions-ux,agruning/azure-functions-ux,agruning/azure-function... | AzureFunctions.Client/app/components/binding-designer.component.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\tdesignUnit,\n\ttypeRampBaseFontSize,\n\ttypeRampBaseLineHeight,\n} from '../design-tokens';\n\nexport const PanelViewStyles =... | typescript | edit | 0 | 0 | mit | 77a6a0ecb1c89c5e9be1cb244caf59cc572f120f | 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\n/* tslint:disable */\r\n'use strict';\r\n\r\n// THis code is from @nteract/transforms-full except without the Vega transforms\r\n// https://github.com/nteract/nteract/blob/master/packages/transforms-full/src/index.js\r\n// Vega transfor... | typescript | edit | 0 | 0 | mit | 7b9b13e4a68bbe9b4f0e6707d976f0c318c28f0e | DonJayamanne/pythonVSCode,DonJayamanne/pythonVSCode,DonJayamanne/pythonVSCode,DonJayamanne/pythonVSCode,DonJayamanne/pythonVSCode | src/client/datascience/history-react/transforms.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {Observable} from \"rxjs\";\n\nexport interface SyncState {\n\n url: string;\n\n cancel(): void;\n\n onError: Observable<any>;\n\n onChange: Observable<any>;\n\n}\n```\n\nApply this change: Adjust to code style rules"... | typescript | edit | 0 | 0 | apache-2.0 | ae7d43714048ea44aac82c8f0e6839e859d15ea8 | codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client | app/core/datastore/core/sync-state.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as vscode from 'vscode';\nimport ParseEngineRegistry from './parse-engines/parse-engine-registry';\n\nclass Fetcher {\n static async findAllParseableDocuments(): Promise<vscode.Uri[]> {\n const languages = ParseEngine... | typescript | edit | 0 | 1 | mit | a5f366f357bcc424852f2c6ee209720cc70bdc5a | zignd/HTML-CSS-Class-Completion | src/fetcher.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Application } from 'express';\nimport { createServer } from '../src/server';\nimport * as request from 'supertest';\n\ndescribe('routes', () => {\n let app: Application;\n\n before('create app', function() {\n app ... | typescript | edit | 0 | 1 | mit | 3002e1ffcde95835b0267a95b1913ebc9aabe348 | thatJavaNerd/novaXfer,thatJavaNerd/novaXfer,thatJavaNerd/novaXfer | test/routes.test.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// Copyright (c) Martin Costello, 2017. All rights reserved.\n// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.\n\ndeclare var SwaggerUIBundle: any;\ndeclare var SwaggerUISt... | typescript | edit | 0 | 2 | apache-2.0 | 8e05337812835ce390e4480eb2079e8bdbc0202c | martincostello/alexa-london-travel-site,martincostello/alexa-london-travel-site,martincostello/alexa-london-travel-site,martincostello/alexa-london-travel-site | src/LondonTravel.Site/assets/scripts/ts/Swagger.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nconst padImpl = require('pad')\n\n/**\n * \n */\nexpor t const clamp = (val: number, min: number, max: number): number =>\n Math.min(max, Math.max(min, val))\n\n/**\n * \n */\nexport const pad = (val: string, count: number): string =... | typescript | edit | 0 | 1 | mit | 0b0965f0eb2844a9b1f82c6f06798c18ef85ac5c | mattbierner/vscode-color-info,mattbierner/vscode-color-info | src/displays/display_helper.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/// <reference path=\"../../../definitions/chrome/chrome.d.ts\" />\n/// <reference path=\"../../model/config/config.ts\" />\n/// <reference path=\"../controller.ts\" />\n\nmodule Prisc {\n export class MessageDownloadImageController ... | typescript | edit | 0 | 2 | mit | ea03f8f85f48493fb6658bcde1536851e1823ab3 | otiai10/prisc,otiai10/prisc,otiai10/prisc | src/controller/message/download-image-controller.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n\nimport * as chai from 'chai';\n\nimport { HTMLManager } from '../../lib/';\nimport { OutputModel, OutputView } from '../../lib/output';\n\ndescribe('output', () => {\n\n let model;\n let view;\n let manager;\n\n beforeEach... | typescript | edit | 0 | 1 | bsd-3-clause | ba61cacd022a3a672f33623715470bb4381d9de1 | ipython/ipywidgets,SylvainCorlay/ipywidgets,jupyter-widgets/ipywidgets,SylvainCorlay/ipywidgets,ipython/ipywidgets,ipython/ipywidgets,jupyter-widgets/ipywidgets,ipython/ipywidgets,ipython/ipywidgets,jupyter-widgets/ipywidgets,jupyter-widgets/ipywidgets,SylvainCorlay/ipywidgets,SylvainCorlay/ipywidgets | jupyter-widgets-htmlmanager/test/src/output_test.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n\ndeclare class SQLStatement {\n\n private strings: string[]\n\n /** The SQL Statement for node-postgres */\n text: string\n\n /** The SQL Statement for mysql */\n sql: string\n\n /** The values to be inserted for the placeholders... | typescript | edit | 0 | 1 | mit | 4f2ca1733ae9097f623d151dd0788679e14afd82 | detroit-labs/typed-things | sql-template-strings/sql-template-strings.d.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as path from 'path';\n\ntype Dictionary<T> = {[key: string]: T};\ntype FileContentDict = Dictionary<string>;\ntype DirectoryListing = Dictionary<string[]>;\n\nconst fs: any = jest.genMockFromModule('fs');\n\nlet mockFiles: Dire... | typescript | edit | 0 | 3 | mit | d8d77bc9ebb59bdb1d692a9fb2b41f9b804b1db0 | dkundel/node-env-run | __mocks__/fs.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport React from 'react';\nimport { hot } from 'react-hot-loader';\nimport { MemoryRouter, Route, Redirect, Switch } from 'react-router-dom';\nimport { Provider } from 'react-redux';\nimport { ThemeProvider } from './styles/styled-comp... | typescript | edit | null | null | mit | 3bb95e90f54b9a34145e6d2df7caf9ba806ec025 | Heeryong-Kang/jamak,Heeryong-Kang/jamak,drakang4/jamak,drakang4/jamak,drakang4/jamak | src/renderer/App.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nconst accountTableQuery: string =\n 'CREATE TABLE IF NOT EXISTS Account(' +\n 'id INTEGER PRIMARY KEY,' +\n 'name TEXT NOT NULL UNIQUE);';\n\nconst categoryTableQuery: string =\n 'CREATE TABLE IF NOT EXISTS Category(' +\n 'id INTEG... | typescript | edit | 0 | 0 | mit | bac7ad87f1697d8406cfa0504e4231e01ee232e1 | DavidLevayer/countable,DavidLevayer/countable,DavidLevayer/countable | server/services/database/population-queries.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport enum State {\n Loading = \"Loading...\",\n Ready = \"Ready\",\n EmptyFile = \"File is empty\",\n Fail = \"Loading failed\",\n TooLarge = \"File is too large\",\n}\n\nexport class LoadState {\n public state: State;\n privat... | typescript | edit | 0 | 2 | mit | 98270445b082c1cb038fb290f44ec32f4c0bddfe | chipster/chipster-web,chipster/chipster-web,chipster/chipster-web | src/app/model/loadstate.ts | accepted | null | true |
[
{
"role": "user",
"content": "Write typescript code for the following: Make simple command line interface"
},
{
"role": "assistant",
"content": "#!/usr/bin/env node\nimport * as program from \"commander\";\n\nprogram\n .arguments('message')\n .action(message => {\n console.log('Results: ', ... | typescript | new_file | 0 | 1 | mit | a54e09991f51e720f350f766583a23e2d6e9302d | martinhartt/messagelint,martinhartt/messagelint,martinhartt/messagelint | src/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Injectable } from '@angular/core';\n\n@Injectable()\nexport class CurrentAccountService {\n set(token: string) {\n localStorage.setItem('jwt', token);\n }\n}\n\n```\n\nApply this change: Add get and clear methods"
},
{... | typescript | edit | 0 | 0 | mit | 73aae94c7f97ec019d56e96afb3afaa2ac15a9f9 | fvilers/angular2-training,fvilers/angular2-training,fvilers/angular2-training | client/app/accounts/services/current-account.service.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from \"react\"\nimport styled from \"styled-components\"\nimport Icon from \"./icons\"\n\nconst Header = styled.header`\n margin: 20px;\n font-size: 26px;\n line-height: 1.3;\n text-align: center;\n`\n\nexport defa... | typescript | edit | null | null | mit | b3afad9b86b264e6ee0f21ea5619bb6da4ed8e5e | xtina-starr/reaction,xtina-starr/reaction,xtina-starr/reaction,craigspaeth/reaction,artsy/reaction-force,artsy/reaction,craigspaeth/reaction,artsy/reaction,xtina-starr/reaction,artsy/reaction,craigspaeth/reaction,artsy/reaction-force | src/components/login_header.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {Finalizable} from '../registry';\n\nexport interface FlagsService extends Finalizable {\n isEnabled(experimentId: string): boolean;\n ... | typescript | edit | 0 | 0 | apache-2.0 | c15f7a69a0779399398ea776f10511f955a2e392 | GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit | polygerrit-ui/app/services/flags/flags.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Component, Input } from '@angular/core';\n\n@Component({\n moduleId: module.id,\n selector: 'event-thumbnail',\n templateUrl: 'event-thumbnail.component.html',\n styleUrls: ['event-thumbnail.component.css']\n})\nexport clas... | typescript | edit | 0 | 5 | mit | 49c239a50caf43d7e19864cbefc6a267d825ea8a | robertoachar/ng2-fundamentals,robertoachar/ng2-fundamentals,robertoachar/ng2-fundamentals | app/events/event-thumbnail.component.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Component } from '@angular/core';\nimport { Router } from '@angular/router'\n\n@Component({\n\tselector: 'app-footer',\n\ttemplateUrl: './footer.component.html',\n\tstyleUrls: ['./footer.component.sass']\n})\nexport class Foote... | typescript | edit | 0 | 3 | apache-2.0 | bab9e0d57e0ba48bdedfe3315d1d7e3f30c55a0b | SamuelM333/snippet-sniper-frontend,SamuelM333/snippet-sniper-frontend,SamuelM333/snippet-sniper-frontend | src/app/shared/footer/footer.component.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// Type definitions for jest-each 0.3\n// Project: https://github.com/mattphillips/jest-each\n// Definitions by: Michael Utz <https://github.com/theutz>\n// Definitions: <https://github.com/DefinitelyTyped/DefinitelyTyped>\n// TypeScrip... | typescript | edit | 0 | 1 | mit | e4436a6e8c96b7cb5b6c8b34aa19dca6c21f2036 | magny/DefinitelyTyped,dsebastien/DefinitelyTyped,AgentME/DefinitelyTyped,markogresak/DefinitelyTyped,borisyankov/DefinitelyTyped,AgentME/DefinitelyTyped,magny/DefinitelyTyped,dsebastien/DefinitelyTyped,AgentME/DefinitelyTyped,georgemarshall/DefinitelyTyped,AgentME/DefinitelyTyped,georgemarshall/DefinitelyTyped,mcliment... | types/jest-each/index.d.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from 'react'\nimport { AutomatedPOS as Component } from '~/components/AutomatedPOS'\n\nconst txt = (\n 'The book theorized that sufficiently intense competition for suburban houses in ' +\n 'good school districts mea... | typescript | edit | null | null | mit | 124810bd7686d4561c8fa1543fa296ca885eebf2 | devonzuegel/aldine,devonzuegel/aldine,devonzuegel/aldine,devonzuegel/aldine | src/app/modules/AutomatedPOS/index.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 { OpenLayerIDAHOSourceProvider } from './open-layers-IDAHO-source-provider';\n\nexport const OpenLayerIDAHO2SourceProviderSourceType = 'IDAHO2';\n\n@Injectable()\nexport class OpenLaye... | typescript | edit | 0 | 0 | mit | 13822e6ff92208c35a84ab9ddf1335319cd10a85 | AnSyn/ansyn,AnSyn/ansyn,AnSyn/ansyn,AnSyn/ansyn | src/app/app/app-providers/map-source-providers/open-layers-IDAHO2-source-provider.ts | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.