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\nexport function escapeHtmlContent(content: string): string {\n return htmlEscape(content, /[&<]/g)\n}\n\nexport function escapeHtmlAttrValue(attrValue: string | number): string {\n return htmlEscape(String(attrValue), /[&\"]/g)\n}\n\n... | typescript | edit | 0 | 1 | mit | 66bb31af472b153a2739fa2f68544f879c6d9361 | start/up,start/up | src/Rendering/Html/EscapingHelpers.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Reducer } from 'redux';\nimport * as Cookies from 'js-cookie';\n\nimport { TokenAction, actionTypes } from '../actions/token';\nimport { TokenStateSchema, TokenEmptyState } from '../models/token';\n\nexport const tokenReducer: ... | typescript | edit | 0 | 3 | apache-2.0 | ce44c3316b2dc99db6a128deed1a422a122c392d | polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon | client/src/reducers/token.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nclass Version\n{\n\tstatic publishDate: Date = null;\n\tstatic etc: string = null;\n\n\tstatic get version()\n\t{\n\t\tlet date = Version.publishDate || new Date();\n\n\t\treturn date.getUTCFullYear().toString().substr(2)\n\t\t\t+ (\"0\... | typescript | edit | 0 | 2 | mit | 76731052636bf79c675a8d8f4633ab00e9fba38f | InfBuild/InfBuild,InfBuild/InfBuild,InfBuild/InfBuild | app/Version.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { CoreTable } from \"./CoreTable\"\nimport { ColumnSlug } from \"./CoreTableConstants\"\nimport { OwidColumnDef, OwidTableSlugs } from \"./OwidTableConstants\"\n\nexport function timeColumnSlugFromColumnDef(def: OwidColumnDef) {\... | typescript | edit | 0 | 2 | mit | f143c3b2c12b5676b3d82f1a7c822a6321f72554 | OurWorldInData/owid-grapher,owid/owid-grapher,owid/owid-grapher,OurWorldInData/owid-grapher,OurWorldInData/owid-grapher,OurWorldInData/owid-grapher,owid/owid-grapher,owid/owid-grapher,owid/owid-grapher,OurWorldInData/owid-grapher | coreTable/OwidTableUtil.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { ErrorResponse } from \"./types\";\nimport { GLOBAL_OPTIONS, searchParams } from \"./utils\";\n\nexport const fetchGet = <T>(\n url: string,\n data: { [x: string]: string } = {},\n signal?: AbortSignal\n): Promise<T> => {\n ... | typescript | edit | 0 | 4 | mit | 1ae0d7512cd58558607b1b2b1fd0dfc0938b1841 | OpenCageData/js-geo-what3words,what3words/w3w-node-wrapper,what3words/w3w-node-wrapper | src/fetch.browser.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { AppPage } from './app.po';\nimport { browser, by, element } from 'protractor';\n\ndescribe('eviction-maps App', () => {\n let page: AppPage;\n\n beforeEach(() => {\n page = new AppPage();\n page.navigateTo();\n });\n\n... | typescript | edit | 0 | 1 | mit | dc2989b895eb7a950f923ec499f159ab7bbcfea8 | EvictionLab/eviction-maps,EvictionLab/eviction-maps,EvictionLab/eviction-maps,EvictionLab/eviction-maps | e2e/app.e2e-spec.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/// <reference path='webpack.fix.d.ts' />\n\nimport * as ExtractTextPlugin from 'extract-text-webpack-plugin'\nimport * as path from 'path'\nimport * as webpack from 'webpack'\nimport * as ParallelUglifyPlugin from 'webpack-parallel-ugl... | typescript | edit | 0 | 0 | mit | 4745426e1d16de41f9b9e544938394843c593099 | respace-js/respace,respace-js/respace,evansb/respace,evansb/respace,evansb/respace | build/webpack.config.production.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {Component, Inject} from '@angular/core';\nimport {NgbActiveModal} from '@ng-bootstrap/ng-bootstrap';\nimport {FormBuilder, FormGroup, Validators} from '@angular/forms';\nimport {Store} from '@ngrx/store';\nimport {IAppState} fro... | typescript | edit | 0 | 0 | mit | 8fe158f79e8109a95aa2f65b7356330bb2e5704b | muthukumarsp/e-mail-application,muthukumarsp/e-mail-application,muthukumarsp/e-mail-application | src/app/compose/compose.component.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { TextEditor, Disposable } from \"atom\";\nimport { action } from \"mobx\";\nimport OutputStore from \"./output\";\nimport { log } from \"./../utils\";\nimport type Kernel from \"./../kernel\";\nexport default class WatchStore {\... | typescript | edit | 0 | 3 | mit | cb43ec8685d5e387bdf6fc120c80ab41ca568abc | nteract/hydrogen,nteract/hydrogen | lib/store/watch.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { render, screen } from '@testing-library/react'\n\nimport { Intro } from '.'\n\nconst renderIntro = () => render(<Intro />)\n\ndescribe('Intro', () => {\n test('renders a header', () => {\n renderIntro()\n\n expect(\n ... | typescript | edit | null | null | mit | 61422bbe368a2bcef874358a54baecf6c2b519ec | joelgeorgev/react-checkbox-tree,joelgeorgev/react-checkbox-tree | src/components/Intro/Intro.test.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 { Layout, Card, ResourceList, Stack, Button } from '@shopify/polaris';\r\nimport EmptyQueue from './EmptyQueue';\r\nimport QueueCard from '../../containers/QueueItemCard';\r\n\r\nexport interfac... | typescript | edit | null | null | mit | bbd6425a1bd580b9bf00ecb202a4f6b80e5fd233 | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | src/components/Queue/QueueTable.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { File } from \"file\";\nimport { Compiler } from \"./next-compiler\";\n\nexport class Packer {\n private readonly compiler: Compiler;\n\n constructor() {\n this.compiler = new Compiler();\n }\n\n public async ... | typescript | edit | 0 | 1 | mit | 083f1216837075c369f18650476b2de13e6490d9 | dolanmiu/docx,dolanmiu/docx,dolanmiu/docx | src/export/packer/packer.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport React from 'react';\n\nimport { format } from 'date-fns';\nimport { DayPicker } from 'react-day-picker';\nimport 'react-day-picker/dist/style.css';\n\nexport default function Example() {\n const [selected, setSelected] = React.u... | typescript | edit | null | null | mit | 5764e028b4e56421868a896554f5f1bfaca0fc6c | gpbl/react-day-picker,gpbl/react-day-picker,gpbl/react-day-picker | website/examples/start.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { observable, action } from 'mobx'\nimport {\n DialogData,\n PromptDialogOptions,\n DialogTypes,\n MessageBoxDialogOptions\n} from './interfaces'\n\nlet id = 0\nexport default class DialogStore {\n @observable currentData?: ... | typescript | edit | 0 | 1 | mit | ef92467ec4e1ac98474a1676dfe3020da64b3c80 | Sarah-Seo/Inpad,Sarah-Seo/Inpad | src/main/lib/dialog/DialogStore.tsx | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from \"react\";\nimport { TrackerViewModel } from \"../TrackerViewModel\";\nimport { VerticalResizer } from \"./VerticalResizer\";\nimport { useStoreBackedState } from \"../Utility/useStoreBackedState\";\nimport { Stor... | typescript | edit | null | null | mit | 2c5539ee8ce5bb3f07a5b09cfe9edc48d5439501 | cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative | client/Layout/ThreeColumnLayout.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/** Load fronts and global styles */\nimport './globals'\n\nimport { BLUE, PINK, ThemeProvider, WHITE } from '@slup/theming'\nimport { Container, Content } from './components/container'\nimport { Route, Router } from 'inferno-router'\n\... | typescript | edit | null | null | mit | f5142931c7cf9a248987997c668383dfe3926291 | slupjs/slup,slupjs/slup | packages/Site/src/routes.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Component, createElement } from \"react\";\nimport { RichText, RichTextProps } from \"./components/RichText\";\nimport TextEditorContainer, { RichTextContainerProps } from \"./components/RichTextContainer\";\n\n// tslint:disabl... | typescript | edit | 0 | 3 | apache-2.0 | 9bbdcfd437c2d21bc2645f286941172b781388b1 | Andries-Smit/rich-text,Andries-Smit/rich-text | src/RichText.webmodeler.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { IsNotEmpty, IsOptional, IsString } from '@jovotech/output';\n\nexport class IdentityData {\n @IsString()\n @IsNotEmpty()\n id: string;\n\n @IsOptional()\n @IsString()\n @IsNotEmpty()\n user_ref?: string;\n\n @IsOptional... | typescript | edit | 0 | 0 | apache-2.0 | edb16480a430fae2d2b15f2b0b177f9c37607661 | jovotech/jovo-framework-nodejs,jovotech/jovo-framework-nodejs | output-facebookmessenger/src/models/common/IdentityData.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n\n/// Order by decreasing specificity\nexport enum PipelineType {\n\t\"text-classification\" = \"text-classification\",\n\t\"token-classification\" = \"token-classification\",\n\t\"table-question-answering\" = \"table-question-answering... | typescript | edit | 0 | 0 | apache-2.0 | 0f7c7c3628ff6884c7e5712d6adf6cccba57a425 | huggingface/huggingface_hub | interfaces/Types.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {\n NetworkInterface,\n Request,\n} from '../../src/networkInterface';\n\nimport {\n GraphQLResult,\n parse,\n print\n} from 'graphql';\n\n// Pass in multiple mocked responses, so that you can test flows that end up\n// maki... | typescript | edit | 0 | 3 | mit | 071b230ecd89d88dc21679df52cd3f37f73e3da3 | apollographql/apollo-client,cesarsolorzano/apollo-client,calebmer/apollo-client,apollostack/apollo-client,convoyinc/apollo-client,stevewillard/apollo-client,stevewillard/apollo-client,calebmer/apollo-client,stevewillard/apollo-client,calebmer/apollo-client,cesarsolorzano/apollo-client,apollostack/apollo-client,cesarsol... | test/mocks/mockNetworkInterface.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport interface OptionalRange {\n\n value: string;\n endValue?: string;\n}\n\n\nexport module OptionalRange {\n\n export const VALUE = 'value';\n export const ENDVALUE = 'endValue';\n\n\n export function isValid(optional... | typescript | edit | 0 | 7 | apache-2.0 | 15698413e8be66b7a463008f8714e5ba5a28b86d | dainst/idai-components-2,dainst/idai-components-2,dainst/idai-components-2 | src/model/optional-range.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { expect } from 'chai'\nimport Up from '../../../index'\nimport { DocumentNode } from '../../../SyntaxNodes/DocumentNode'\nimport { CodeBlockNode } from '../../../SyntaxNodes/CodeBlockNode'\n\n\ndescribe('A code block', () => {\n... | typescript | edit | 0 | 1 | mit | c64478ca78852e2de2188aa4922d80f6e032e22a | start/up,start/up | src/Test/Ast/EdgeCases/CodeBlock.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as fs from \"fs\";\nimport * as os from \"os\";\nimport * as path from \"path\";\nimport { ConfigOptions } from \"./config\";\n\nexport class ConfigLoader {\n\n private configFilePath = path.join(os.homedir(), \"ueli.config.... | typescript | edit | 0 | 3 | mit | 9ee3b678e541635bd18419e17e660efa0d0d13d5 | oliverschwendener/electronizr,oliverschwendener/electronizr | src/ts/config-loader.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 | 4f0ac125521573cf69e0bd29af75f6cd68b0d8f6 | microsoft/vscode,eamodio/vscode,eamodio/vscode,eamodio/vscode,eamodio/vscode,eamodio/vscode,microsoft/vscode,eamodio/vscode,eamodio/vscode,eamodio/vscode,microsoft/vscode,microsoft/vscode,eamodio/vscode,eamodio/vscode,eamodio/vscode,microsoft/vscode,eamodio/vscode,eamodio/vscode,microsoft/vscode,microsoft/vscode,micros... | src/vs/workbench/contrib/audioCues/browser/audioCues.contribution.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/// <reference path=\"../typings/tsd.d.ts\"/>\n\nimport chai = require(\"chai\");\nimport mockBrowser = require(\"mock-browser\");\nimport Bacon = require(\"baconjs\");\nimport attach = require(\"../main/bacon-dom\");\n\nvar expect = ch... | typescript | edit | 0 | 1 | apache-2.0 | afbd2ff3d5427d78fdbacfb8ad18a65c8d91a0bc | joelea/bacon-dom,joelea/bacon-dom | src/specs/bacon-dom-spec.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/// <reference path=\"../../definitions/mocha/mocha.d.ts\" />\n/// <reference path=\"../../definitions/chai/chai.d.ts\" />\n/// <reference path=\"../../src/service/twitter.ts\" />\n\nmodule Spec {\n\n chai.should();\n\n describe('... | typescript | edit | 0 | 1 | mit | 17431331a4e2dd377807eef95eb83fe8f3dd70bd | otiai10/prisc,otiai10/prisc,otiai10/prisc | test/service/twitter-spec.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Component, Input, OnInit } from '@angular/core';\nimport { humanizeMeasureName } from '../../utils/formatters';\nimport { Meta } from '../../datasets/metas/types';\nimport { TabbedChartsMeta } from '../../datasets/metas/tabbed-... | typescript | edit | 0 | 4 | apache-2.0 | 82222bf01b04130387e6878260de92ff74b2e911 | googleinterns/guide-doge,googleinterns/guide-doge,googleinterns/guide-doge | src/components/card/card.component.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/*\n * SweetAlert\n * 2014-2017 – Tristan Edwards\n * https://github.com/t4t5/sweetalert\n */\n\nimport init from './modules/init';\n\nimport {\n openModal,\n onAction,\n getState,\n stopLoading,\n} from './modules/actions';\n\nimpo... | typescript | edit | 0 | 2 | mit | 6288ba092c7e3b87e2d41f765a042c4055e20b4b | t4t5/sweetalert,t4t5/sweetalert | src/core.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport enum GitStatus {\r\n CLEAN,\r\n DELETED,\r\n MODIFIED,\r\n STAGED,\r\n STAGED_ADDED,\r\n STAGED_COPIED,\r\n STAGED_DELETED,\r\n STAGED_MODIFIED,\r\n STAGED_RENAMED,\r\n STAGED_TYPE,\r\n STAGED_UNK... | typescript | edit | 0 | 0 | mit | 3ead67bec6bc5890a0732c44253b474d15f40b96 | tht13/gerrit-vscode | src/git/common.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as tsc from 'typescript';\nimport { getTSConfig } from './utils';\n\nexport function transpileIfTypescript(path, contents, config?) {\n if (path && (path.endsWith('.tsx') || path.endsWith('.ts'))) {\n\n let transpiled = tsc... | typescript | edit | 0 | 5 | mit | 6f4fedcd20aa38a6275e5396557d6871cea6753d | kulshekhar/ts-jest,kulshekhar/ts-jest | src/transpile-if-ts.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport fs from 'fs';\nimport path from 'path';\nimport { logger } from '@storybook/node-logger';\n\nfunction resolveTsConfig(tsConfigPath: string): string | undefined {\n if (fs.existsSync(tsConfigPath)) {\n logger.info('=> Found cu... | typescript | edit | 0 | 2 | mit | 3aeae08946a5eaa71c2bf2073fa4eb6a832e81d3 | storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/react-storybook,storybooks/react-storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook | app/angular/src/server/ts_config.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {Injectable} from \"@angular/core\";\nimport {Player} from \"../models/player.model\";\nimport {Headers, Http} from \"@angular/http\";\n\n@Injectable()\nexport class PlayerService{\n player1: Player;\n player2: Player;\n\n ... | typescript | edit | 0 | 1 | mit | 8a6dd20e8f7edd34974f10a7fc8daa4be4766a7b | casperchia/foosmate,casperchia/foosmate,casperchia/foosmate | src/services/player.service.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nconst appPackage: Record<string, string> = require('./package.json')\n\nexport function getProductName() {\n const productName = appPackage.productName\n return process.env.NODE_ENV === 'development'\n ? `${productName}-dev`\n :... | typescript | edit | 0 | 2 | mit | b7b85bd2c5daedbc9c7440b241f6766398f25dc3 | say25/desktop,say25/desktop,shiftkey/desktop,artivilla/desktop,kactus-io/kactus,j-f1/forked-desktop,kactus-io/kactus,shiftkey/desktop,desktop/desktop,say25/desktop,j-f1/forked-desktop,desktop/desktop,kactus-io/kactus,artivilla/desktop,artivilla/desktop,j-f1/forked-desktop,desktop/desktop,kactus-io/kactus,desktop/deskto... | app/package-info.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// app.module.ts\n\n\"use strict\";\n\nimport { module } from \"angular\";\n\nRoutesConfig.$inject = [\"$stateProvider\", \"$urlRouterProvider\"];\n\nfunction RoutesConfig(\n $stateProvider: angular.ui.IStateProvider,\n $urlRouterProv... | typescript | edit | 0 | 1 | mit | 44f45f10b599a05936b5fa4fbf92f55719380697 | var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training | SPAWithAngularJS/module5/angularjs-controllers/src/app.module.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/**\n * Swagchat SDK.\n */\nexport * from './Client';\nexport * from './Realtime';\nexport * from './interface';\nexport * from './User';\nexport * from './Room';\nexport * from './const';\nexport * from './util';\nexport const logColor... | typescript | edit | 0 | 0 | mit | 79e4614912b2a5466f1de10efab2af1ffbc39607 | fairway-corp/swagchat-sdk | src/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n\nexport interface IInputCallbackData {\n dataLabel: string | undefined | null;\n value: any;\n}\n\nexport interface IValidationCallbackData {\n dataLabel: string | undefined | null;\n value?: any;\n required?: boolean;\n... | typescript | edit | 0 | 0 | mit | 1ab035cad87f8b696a35838f4f3d03edccc44448 | moosend/mooskin-ui,moosend/mooskin-ui | components/_utils/types/commonTypes.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nif ( process.platform === 'win32' ) {\n\tlet Application = require( './application' );\n\tApplication.start();\n}\n\nimport { Logger } from './common/logger';\nexport * from './common/logger';\nLogger.hijack();\n\nexport * from './autos... | typescript | edit | 0 | 0 | mit | 4fc5de8cd53ba81e40e0dffdf6348ecda4420990 | gamejolt/client-voodoo,gamejolt/client-voodoo | src/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/* The MIT License (MIT)\n *\n * Copyright (c) 2017 Cyril Schumacher\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to dea... | typescript | edit | 0 | 1 | mit | c236a3d28a309146dc1be46b267d65fe33fedf54 | cyrilschumacher/prometheus-node-usage | src/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Injectable } from '@angular/core';\nimport { Subject, BehaviorSubject, Observable } from 'rxjs';\n\n@Injectable()\nexport class StorageService {\n storageKey: string = 'marvel-reading-stats';\n currentStorage: Subject<any> = ... | typescript | edit | 0 | 2 | mit | d175d81a64356fe7734ed8dd8f2c1b353ce19352 | SBats/marvel-reading-stats-frontend,SBats/marvel-reading-stats-frontend,SBats/marvel-reading-stats-frontend | src/app/shared/storage.service.ts | rejected_duplicate | Near-duplicate of sample 114590 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport class MapField {\n label: string;\n namespace: string;\n name: string;\n uri: string;\n guidelines_uri: string;\n same_as: string;\n definition: string;\n obligation: string;\n range: any;\n required: string;\n repeata... | typescript | edit | 0 | 0 | mit | 3d6c7317755a34131db06cecbb2b950e1af4dbb9 | uhlibraries-digital/brays,uhlibraries-digital/brays,uhlibraries-digital/brays | app/shared/map-field.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/**\n * Example of Module, other modules should extent this class\n */\n\nimport Module from './module';\n\nclass ModuleWindow extends Module {\n protected window: Electron.BrowserWindow;\n\n constructor (window: Electron.BrowserWindo... | typescript | edit | 0 | 1 | mit | 0e1f7ddc9ad9e5a097c74d5d05d15bd75bd9dd9b | KeitIG/museeks,KeitIG/museeks,KeitIG/museeks | src/main/modules/module-window.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {URLSearchParams, Headers, RequestOptions, RequestMethod} from '@angular/http';\n\nexport class RestangularHelper {\n \n static createRequestOptions(options) {\n let requestQueryParams = RestangularHelper.createRequestQueryP... | typescript | edit | 0 | 4 | mit | 781c4563dbf7f5bff7a4fb72d663b867bfb98889 | 2muchcoffeecom/ng2-restangular,2muchcoffeecom/ng2-restangular,2muchcoffeecom/ngx-restangular,2muchcoffeecom/ngx-restangular | src/ng2-restangular-helper.ts | rejected_duplicate | Near-duplicate of sample 113678 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport * as injectTapEventPlugin from \"react-tap-event-plugin\";\nimport MenuBar from \"./components/menu/MenuBar\";\nimport SimpleContent from \"./components... | typescript | edit | null | null | mit | aa84883240b4b99c01639911a606f0f5ddb09f78 | SIT-DigiCre/ShibaurasaiApp,SIT-DigiCre/ShibaurasaiApp,SIT-DigiCre/ShibaurasaiApp | src/main.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Context, Component, stateOf, interfaceOf } from '../../src'\nimport { styleGroup, StyleGroup } from '../../src/utils/style'\nimport { ViewInterface } from '../../src/interfaces/view'\nimport h from 'snabbdom/h'\n\nlet name = 'M... | typescript | edit | 0 | 1 | mit | 2119b535871bb709e0fc68b5a1728e81a61ce60c | FractalBlocks/Fractal,FractalBlocks/Fractal,FractalBlocks/Fractal | examples/compose/app.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport Clean from \"./Clean\";\nimport NodeWatchBuild from \"./NodeWatchBuild\";\nimport Test from \"./Test\";\nimport Typescript from \"./Typescript\";\nimport Build from \"./Build\";\nimport WatchBuild from \"./WatchBuild\";\nimport S... | typescript | edit | 0 | 0 | mit | 810bf529b46c62cf6f16233bc503a5e12e191792 | mtfranchetto/smild,mtfranchetto/smild,mtfranchetto/smild | lib/tasks/Mappings.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Component } from '@angular/core';\n// import { ROUTER_DIRECTIVES } from '@angular/router';\n\n// import { LoginComponent } from './login.component';\n\n@Component({\n\tselector: 'my-app',\n\ttemplate: `\n\t<md-sidenav-layout>\n... | typescript | edit | 0 | 0 | mit | 9f3078f77fd3ab7e0a76c6029ca9adbfebe86f49 | skyvory/recomposition,skyvory/recompose,skyvory/recompose,skyvory/recomposition,skyvory/recomposition,skyvory/recompose | app/app.component.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Core, CorePlatform, CorePlatformConfig } from '@jovotech/platform-core';\n\ndeclare module '@jovotech/framework/dist/types/Extensible' {\n interface ExtensiblePluginConfig {\n WebPlatform?: CorePlatformConfig<'web'>;\n }\n... | typescript | edit | 0 | 0 | apache-2.0 | 82411881240b267bb54fd3f4ea8907509cd43ba0 | jovotech/jovo-framework-nodejs,jovotech/jovo-framework-nodejs | platforms/platform-web/src/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Component } from 'vue';\n\nexport { RenderContext } from '@storybook/core';\n\nexport interface ShowErrorArgs {\n title: string;\n description: string;\n}\n\n// TODO: some vue expert needs to look at this\nexport type StoryFn... | typescript | edit | 0 | 0 | mit | 8900acb2a5a973289c8a93b49dd4c8a9c195252a | storybooks/react-storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook | app/vue/src/client/preview/types.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { access } from 'fs';\nimport { join } from 'path';\nimport { some } from 'async';\n\nimport { build } from './pubsub';\n\nconst nconf = require.main.require('nconf');\nconst baseDir = nconf.get('base_dir');\n\nconst noop = () =>... | typescript | edit | 0 | 8 | mit | d78bd37a9939c900c4afccc9e7a9b81037f103ad | julianlam/nodebb-plugin-emoji,julianlam/nodebb-plugin-emoji,julianlam/nodebb-plugin-emoji | lib/plugins.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from 'react';\nimport RcCollapse from 'rc-collapse';\nimport classNames from 'classnames';\nimport animation from '../_util/openAnimation';\nimport CollapsePanel from './CollapsePanel';\n\nexport interface CollapseProp... | typescript | edit | null | null | mit | c3326a5bffe47df2fdeba8c61959fac065b77960 | zheeeng/ant-design,zheeeng/ant-design,icaife/ant-design,ant-design/ant-design,ant-design/ant-design,zheeeng/ant-design,zheeeng/ant-design,ant-design/ant-design,icaife/ant-design,ant-design/ant-design,elevensky/ant-design,icaife/ant-design,elevensky/ant-design,elevensky/ant-design,icaife/ant-design,elevensky/ant-design | components/collapse/Collapse.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 moment from 'moment'\nimport { Commit } from '../../lib/local-git-operations'\n\ninterface ICommitProps {\n commit: Commit\n}\n\n/** A component which displays a single commit in a commit lis... | typescript | edit | null | null | mit | 9aeb53ef176f93958bafc4db2ecfd29eec3b2dfa | say25/desktop,gengjiawen/desktop,BugTesterTest/desktops,hjobrien/desktop,say25/desktop,hjobrien/desktop,BugTesterTest/desktops,kactus-io/kactus,artivilla/desktop,kactus-io/kactus,BugTesterTest/desktops,j-f1/forked-desktop,say25/desktop,say25/desktop,shiftkey/desktop,gengjiawen/desktop,j-f1/forked-desktop,desktop/deskto... | app/src/ui/history/commit-list-item.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { createTable } from 'src/main/ts/ephox/bridge/components/dialog/Table';\n\nexport const createWordcountDialog = () => {\n createTable({\n type: 'table',\n header: [ 'hello', 'world'],\n cells: [\n ['hej', 'vaerld'... | typescript | edit | 0 | 1 | mit | 70f71865d653dcb2b1986d1e45ba15d0239dc335 | tinymce/tinymce,TeamupCom/tinymce,tinymce/tinymce,tinymce/tinymce,FernCreek/tinymce,TeamupCom/tinymce,FernCreek/tinymce,FernCreek/tinymce | src/demo/ts/dialogs/WordcountDialog.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { observer } from 'mobx-react';\nimport React, { Component, SyntheticEvent } from 'react';\nimport Store from '../../store';\nimport { ButtonType } from '../../../shared/enums';\nimport Textfield from '../../../shared/components/... | typescript | edit | null | null | apache-2.0 | 0be05daee0178256eb796465a7f599a344780d58 | Nersent/Wexond,Nersent/Wexond | src/app/components/BookmarksDialog/index.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/**\n * @file The primary entry for Innerface.\n *\n * @author Justin Toon\n * @license MIT\n */\n\nimport {forEach} from 'lodash-es';\n\nimport { SELECTORS } from './if.const';\nimport * as controllers from './controllers';\n\n/**\n * ... | typescript | edit | 0 | 1 | mit | 84ee65325cc38a3984bbfb29f3083dd7a6e96c62 | overneath42/innerface,overneath42/innerface | src/index.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/1.0.4',\n RELEASEVERSION: '1... | typescript | edit | 0 | 0 | mit | ae59a787c1fc7ac7031f48646c7d444dda37dd6a | 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 113686 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { createStore, Store, StoreOptions } from \"./Store\"\nimport { Resource, ResourceActionOptions, ResourceOptions } from \"./Resource\"\n\nexport class Vapi {\n private resource: Resource\n\n constructor(options: ResourceOptions... | typescript | edit | 0 | 1 | mit | ba52ff503564365822cffdab913619eb65190983 | christianmalek/vuex-rest-api,christianmalek/vuex-rest-api,christianmalek/vuex-rest-api | src/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Write typescript code for the following: Add a proxy response type."
},
{
"role": "assistant",
"content": "import { IncomingMessage } from 'http';\nimport { Buffer } from 'buffer';\n\n\nexport type Map<T> = {[key: string]: T};\n\nexport type HttpVerb = 'GET' | 'POST... | typescript | new_file | 0 | 0 | mit | 3f65aee884dd5a7027e177d0ddeab8021ed0cecf | syrp-nz/ts-lambda-handler,syrp-nz/ts-lambda-handler | src/Types.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport {Component, OnInit} from '@angular/core';\nimport {HsConfig} from '../../config.service';\nimport {HsFeatureTableService} from './feature-table.service';\nimport {Layer} fro... | typescript | edit | 0 | 3 | mit | 78b202363ffdba973967e2fa1576ef9553721a42 | hslayers/hslayers-ng,hslayers/hslayers-ng,hslayers/hslayers-ng,hslayers/hslayers-ng | components/feature-table/feature-table.component.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { BaseData, DefaultBaseData } from \"./BaseData\";\nimport * as fs from \"fs\";\nimport * as path from \"path\";\n\ninterface PictData extends BaseData {\n PNG: Buffer\n}\nconsole.log(path.resolve(\"./\"))\nconst DefaultPictDa... | typescript | edit | 0 | 0 | mit | a33607a09af9058a1d8ab0120e4ae29520334016 | mattsoulanille/NovaJS,mattsoulanille/NovaJS,mattsoulanille/NovaJS | src/PictData.ts | accepted | null | true |
[
{
"role": "user",
"content": "Write typescript code for the following: Throw error when attempting to import package directly."
},
{
"role": "assistant",
"content": "// Copyright (c) Rotorz Limited. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root.\n\... | typescript | new_file | 0 | 0 | mit | c5a2b2c19beedfce79492f96e734e8505b003d61 | webreed/webreed-cli,webreed/webreed-cli | src/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport Reducify from 'Helpers/State/Reducify';\nimport ActionConstants from 'Constants/Actions/Index';\n\nimport { cronPeriods } from 'Constants/Lang/Date';\n\nimport * as objectAssign from 'object-assign';\n\nconst initialState: IState... | typescript | edit | 0 | 1 | mit | ecf0279af0491d889f9d40039b5174116eaea6fc | harksys/HawkEye,harksys/HawkEye,harksys/HawkEye | src/js/Reducers/Settings.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { expect } from 'chai'\nimport Up from '../../../index'\nimport { InlineSpoilerNode } from '../../../SyntaxNodes/InlineSpoilerNode'\n\n\ndescribe(\"The text in an inline spoiler's label\", () => {\n it(\"uses the provided term f... | typescript | edit | 0 | 1 | mit | ed9d904ef4398cf0994ff3de616e698dcbc756b6 | start/up,start/up | src/Test/Html/Config/ToggleSpoiler.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport React, { FunctionComponent } from 'react';\nimport deprecate from 'util-deprecate';\nimport dedent from 'ts-dedent';\nimport { Subheading } from './Subheading';\nimport { DocsStoryProps } from './types';\nimport { Anchor } from '... | typescript | edit | null | null | mit | caf2b6bb8c0c16c6c56c39848a663404d13e08d9 | storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,kadirahq/react-storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook | addons/docs/src/blocks/DocsStory.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport Container from '../components/Container';\nimport Component from '../components/Component';\nimport XYAxes from '../components/XYAxes';\nimport Annotations from '../components/Annotations';\nimport Config from '../../Config';\nim... | typescript | edit | 0 | 3 | apache-2.0 | 506df5821846e8d778db5491146adc92c47eadd4 | proteus-h2020/proteus-charts,proteus-h2020/proteic,proteus-h2020/proteic,proteus-h2020/proteic | src/svg/base/SvgStrategy.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/// <reference path=\"../main.d.ts\"/>\n/// <reference path=\"../../shared.d.ts\"/>\n\nimport * as path from \"path\";\nimport {spawn} from \"child_process\";\nimport {app} from \"electron\";\nimport {Promise} from \"core-js\";\n\nimpor... | typescript | edit | 0 | 3 | mit | 1c480fdad766b30a64bfdb6b4559e12ffd482059 | foxable/app-manager,foxable/app-manager,foxable/app-manager | src/main/system/WindowsAppProvider.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Call, CallAdapter } from \"revival\";\nimport { Observable, Observer } from \"rxjs\";\n\n/**\n * A {@link CallAdapter} implemented by rxjs.\n *\n * @author Vincent Cheung (<EMAIL>)\n */\nexport class RxjsCallAdapter<T> implemen... | typescript | edit | 0 | 2 | mit | 554b2fccd9ff48c206d7274083155cf6a9d023ea | Coolerfall/revival | packages/revival-adapter-rxjs/src/rxjs-call-adapter.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Field } from './field';\nimport { statSync } from 'fs';\nimport { dirname, basename, extname } from 'path';\n\nexport class File{\n id: number;\n path: string;\n name: string;\n mime: string;\n metadata: Field[];\n tiffPr... | typescript | edit | 0 | 3 | mit | 9bbbc925ecff680cc6259d08f737a790decf3e97 | uhlibraries-digital/brays,uhlibraries-digital/brays,uhlibraries-digital/brays | src/app/classes/file.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// demo.ts\n\n\"use strict\";\n\ninterface Opponent {\n alias: string;\n health: number;\n}\n\nclass ComicBookCharacter {\n // by default all class properties have public access\n alias: string;\n health: number;\n strength: numbe... | typescript | edit | 0 | 1 | mit | 4103e382af8447624b51d394f194150fcbb1d475 | var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training | AngularJSWithTS/UseTypesEffectivelyInTS/Classes/demo.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { remote } from 'electron'\nimport { ApplicationTheme } from './application-theme'\nimport { IDisposable, Disposable, Emitter } from 'event-kit'\nimport { supportsDarkMode, isDarkModeEnabled } from './dark-theme'\n\nclass ThemeCh... | typescript | edit | 0 | 2 | mit | 3183e39527e1c9008a2d9abdfe4db7486894c4cf | shiftkey/desktop,shiftkey/desktop,say25/desktop,say25/desktop,shiftkey/desktop,desktop/desktop,desktop/desktop,desktop/desktop,j-f1/forked-desktop,desktop/desktop,artivilla/desktop,j-f1/forked-desktop,say25/desktop,shiftkey/desktop,artivilla/desktop,artivilla/desktop,j-f1/forked-desktop,j-f1/forked-desktop,artivilla/de... | app/src/ui/lib/theme-change-monitor.ts | rejected_duplicate | Near-duplicate of sample 112638 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport chaiHttp = require(\"chai-http\");\nimport * as chai from \"chai\";\nimport {server} from \"../src/app\";\n\nconst expect = chai.expect;\n\nchai.use(chaiHttp);\n\ndescribe(\"/hello/:name endpoint\", () => {\n it(\"should return ... | typescript | edit | 0 | 1 | mit | ed40f7720ea0c48893e965d82191d7cf63f87786 | hlouw/node-hack | test/helloEndpoints.spec.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// import from npm\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: boolean;\n wasRejected: boolean;... | typescript | edit | 0 | 2 | mit | 98aeb14a26496c97850adb0eea28913d08c9a771 | 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/// <reference path=\"../../../node_modules/typescript/lib/lib.webworker.d.ts\" />\n\nimport { arrayStartsWith } from '../util'\n\ninterface ICharCache {\n part: string[]\n full: string[]\n}\n\nexport class CharCache {\n private cach... | typescript | edit | 0 | 3 | mit | c8b8931de6c6a7cea848aca0382a1d8609d51ee4 | Alexendoo/utf,Alexendoo/utf,Alexendoo/utf,Alexendoo/utf | src/ts/worker/caches.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as rp from 'request-promise'\n\nexport namespace Auth0Manager {\n\n export function getEncryptedUserDetailsByID(auth0_id: string): PromiseLike<string> {\n let req_opts = {\n method: 'POST',\n url... | typescript | edit | 0 | 1 | mit | 2f0337113465ba1f85624994904dc850284527f3 | calmcl1/voluble,calmcl1/voluble | src/bin/user-manager/auth0-manager.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { CrudRouter } from './crud.router';\n\nexport class BasicRouter implements CrudRouter {\n\n /**\n * Set status and returns a JSON object containing the error message\n * @param res\n * @param message\n * @param status\n... | typescript | edit | 0 | 1 | mit | 954abe92bbc0125ed0c11d2e5ea11db5fc6e74d2 | DavidLevayer/countable,DavidLevayer/countable,DavidLevayer/countable | server/routes/basic.router.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { ComponentFixture, TestBed } from '@angular/core/testing';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MatButtonModule, MatFormFieldModule, MatInputModule, MatListModule }\n from '@angular/ma... | typescript | edit | 0 | 1 | mit | 411dd3bf40fa53e7588a40ffda5e9f44b20f5b4c | nb48/chart-hero,nb48/chart-hero,nb48/chart-hero | src/app/app.component.spec.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { EnvConfig } from './env-config.interface';\n\nconst BaseConfig: EnvConfig = {\n // Sample API url\n API: 'https://demo.com',\n RELEASEURL: 'https://github.com/nie-ine/raeber-website/releases/tag/0.5.0',\n RELEASEVERSION: '0... | typescript | edit | 0 | 0 | mit | 14d50bcee7f3bdffeb7c76d5a9b3b478799a8535 | nie-ine/raeber-website,nie-ine/raeber-website,nie-ine/raeber-website,nie-ine/raeber-website | tools/env/base.ts | rejected_duplicate | Near-duplicate of sample 113627 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Components, registerComponent } from '../../lib/vulcan-lib';\nimport React from 'react';\nimport { AnalyticsContext } from \"../../lib/analyticsEvents\";\n\nconst Home2 = () => {\n const { RecentDiscussionFeed, HomeLatestPosts... | typescript | edit | null | null | mit | 0c69fbf4a0ccbdf18dfd87ae85e2fe5667c946aa | Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2 | packages/lesswrong/components/common/Home2.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { renderError } from '../../common';\nimport { IAppController } from '../app.controller.interface';\nimport { Config } from '../config';\nimport { Context, HttpResponse } from '../http';\n\nexport async function convertErrorToRes... | typescript | edit | 0 | 4 | mit | cbce666321378908ce8879b1b00e6f61a105ac23 | FoalTS/foal,FoalTS/foal,FoalTS/foal,FoalTS/foal | packages/core/src/core/routes/convert-error-to-response.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/// <reference path=\"../typings/index.d.ts\" />\n\n<% if (modules === 'inject') { -%>\nangular\n .module('app')\n .config(routesConfig);\n<% } else { -%>\nexport default routesConfig;\n<% } -%>\n\ninterface IComponentState extends an... | typescript | edit | null | null | mit | d2b38963703bbca141f04f54db9c6624196cab1a | FountainJS/generator-fountain-angular1,rkori215/generator-angular1-gulp,FountainJS/generator-fountain-angular1,rkori215/generator-angular1-gulp,FountainJS/generator-fountain-angular1,rkori215/generator-angular1-gulp | generators/app/templates/src/routes.ts | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport FcmLog from '@app/core/fcm/model/FcmLog';\nimport FcmLogRepository = require('@app/core/fcm/FcmLogRepository');\n\nexport function addFcmLog(to: string, author: string, message: string, cause: string, response: string): Promise<v... | typescript | edit | 0 | 1 | mit | 183ea27f6f73931d97b44816a3ed87492b6350f4 | wafflestudio/snutt,wafflestudio/snutt | src/core/fcm/FcmLogService.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as vscode from 'vscode';\n\nexport function name(filename: string) {\n\treturn vscode.window.showInputBox({\n\t\tplaceHolder: 'Enter the new path for the duplicate.',\n\t\tvalue: filename + '-copy'\n\t});\n}\n\nexport function ... | typescript | edit | 0 | 2 | mit | 27fbc810442cf3117dafb0447f77977bdaef49cc | mrmlnc/vscode-duplicate | src/utils/prompt.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n\nimport '../polyfills';\nimport * as rev from '../index';\n\n// EXAMPLE:\n// import * as rev from 'rev-models'\n\nlet TITLES = [\n ['Mr', 'Mr.'],\n ['Mrs', 'Mrs.'],\n ['Miss', 'Miss.'],\n ['Dr', 'Dr.']\n];\n\nexport class P... | typescript | edit | 0 | 0 | mit | 3f0bdaf3fc854a91471253d778f83d741800ee81 | RevFramework/rev-framework,RevFramework/rev-framework | src/examples/01_defining_a_model.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { BaseEntity, JSONData } from '../../fsrepo/entity'\n\nexport class Upload extends BaseEntity {\n constructor(\n @BaseEntity.Serialize('id')\n public id: string,\n @BaseEntity.Serialize('filename')\n ... | typescript | edit | 0 | 0 | apache-2.0 | cab069f41456bee3d2739885995cad326ea5c373 | m1cr0man/m1cr0blog,m1cr0man/m1cr0blog,m1cr0man/m1cr0blog | src/modules/uploads/entity.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nconst parser = require(\"./grammar\"); // tslint:disable-line\n\nexport const ignore = new RegExp([\n /^No documentation available/,\n /^Not a valid identifier/,\n /^Not in environment '.*'/,\n].map((rx) => rx.source).join(\"|\"));\n... | typescript | edit | 0 | 2 | apache-2.0 | a34d3f76971aa5025018754e0bde8d1c2dc4dbcd | freebroccolo/vscode-reasonml,freebroccolo/vscode-reasonml | src/shared/parser/ocamldoc/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/* eslint-disable global-require,import/no-dynamic-require */\nimport fs from 'fs';\nimport path from 'path';\nimport { Loader } from './Loader';\nimport { StoryshotsOptions } from '../api/StoryshotsOptions';\n\nconst loaderScriptName =... | typescript | edit | 0 | 2 | mit | 5edf6bbfe6fd23ba83b3a268d179b0f6001098f8 | storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,kadirahq/react-storybook | addons/storyshots/storyshots-core/src/frameworks/frameworkLoader.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { NativeModules } from \"react-native\"\nconst { AREventsModule } = NativeModules\n\nfunction postEvent(info: any) {\n AREventsModule.postEvent(info)\n}\n\nexport default { postEvent }\n\n```\n\nApply this change: Add logging ev... | typescript | edit | 0 | 2 | mit | 1d2673927f0741f7dff01695d12f7be5a305a2e6 | artsy/eigen,artsy/emission,artsy/eigen,artsy/emission,artsy/emission,artsy/eigen,artsy/emission,artsy/emission,artsy/eigen,artsy/emission,artsy/eigen,artsy/eigen,artsy/emission,artsy/eigen | src/lib/NativeModules/Events.tsx | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { transpileIfTypescript } from '../../src';\n\ndescribe('transpileIfTypescript', () => {\n it('should ignore anything non-TS', () => {\n const contents = 'unaltered';\n expect(transpileIfTypescript('some.js', con... | typescript | edit | 0 | 1 | mit | c14f81623dc8959ebace503f62f289fc11b80fce | kulshekhar/ts-jest,kulshekhar/ts-jest | tests/__tests__/transpile-if-ts.spec.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport React, { CSSProperties } from 'react'\n\ninterface ImageProps {\n src: string\n className?: string\n style?: CSSProperties\n alt?: string\n}\n\nconst Image = ({ src, className, style, alt }: ImageProps) => {\n if (src.starts... | typescript | edit | null | null | mit | 3702a15bad2e668958159c61874ad23dc0c91619 | Sarah-Seo/Inpad,Sarah-Seo/Inpad | src/components/atoms/Image.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { expect } from 'chai'\nimport Up from '../../index'\nimport { insideDocumentAndParagraph } from './Helpers'\nimport { PlainTextNode } from '../../SyntaxNodes/PlainTextNode'\nimport { LinkNode } from '../../SyntaxNodes/LinkNode'\... | typescript | edit | 0 | 1 | mit | 5aee05b5ed59fae752387894a328dba21dd32178 | start/up,start/up | src/Test/Ast/SpoilerLink.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport runJest from '../__helpers__/runJest';\n\nxdescribe('TSX Errors', () => {\n it('should show the correct error locations in the typescript files', () => {\n const result = runJest('../button', ['--no-cache', '-u']);\n\n con... | typescript | edit | 0 | 1 | mit | d07d6d4aa84a173aeb1f46417bcd06ae85720526 | kulshekhar/ts-jest,kulshekhar/ts-jest | tests/__tests__/tsx-errors.spec.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// @flow\nimport * as Project from './project/index'\nimport Renderer from './renderer/renderer'\nimport * as Services from './services'\nimport * as Exceptions from './exceptions'\n\nimport ColorRGB from './struct/color-rgb'\nimport Co... | typescript | edit | 0 | 0 | mit | cf55fe0262d18c99986c1a2981a9970d87f5c30e | Ragg-/Delir,Ragg-/Delir,Ragg-/Delir,Ragg-/Delir | src/delir-core/src/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as Relay from \"react-relay\"\nconst sharify = require(\"sharify\")\n\nexport const metaphysicsURL = \"https://metaphysics-production.artsy.net\"\n\nexport function artsyNetworkLayer(user?: any) {\n return new Relay.DefaultNet... | typescript | edit | 0 | 2 | mit | 439d0fc34b49bd89f8bc586940d29f5075336822 | craigspaeth/reaction,xtina-starr/reaction,craigspaeth/reaction,xtina-starr/reaction,xtina-starr/reaction,artsy/reaction-force,artsy/reaction,xtina-starr/reaction,craigspaeth/reaction,artsy/reaction,artsy/reaction-force,artsy/reaction | src/relay/config.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\n\nimport './index.css';\nimport App from './App';\nimport * as serviceWorker from './serviceWorker';\nimport store from './store';\n... | typescript | edit | null | null | mit | 79b3245d7f6d2d1cb8511cc1ce06b34600a44b29 | judovana/jenkins-scm-koji-plugin,TheIndifferent/jenkins-scm-koji-plugin,TheIndifferent/jenkins-scm-koji-plugin,judovana/jenkins-scm-koji-plugin,judovana/jenkins-scm-koji-plugin | src/index.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Serif } from \"@artsy/palette\"\nimport React from \"react\"\nimport { Box } from \"Styleguide/Elements/Box\"\nimport { Image } from \"Styleguide/Elements/Image\"\n\ninterface Props {\n imageUrl: string\n blockWidth: string\n... | typescript | edit | null | null | mit | 63a0c9ea9cfca3f600bff5bf9e227a0507683490 | artsy/reaction-force,artsy/reaction-force,artsy/reaction,artsy/reaction,artsy/reaction,xtina-starr/reaction,xtina-starr/reaction,xtina-starr/reaction,xtina-starr/reaction | src/Styleguide/Pages/Artist/Routes/Shows/ShowBlockItem.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { async, ComponentFixture, TestBed } from '@angular/core/testing';\n\nimport { ErrorComponent } from './error.component';\n\ndescribe('ErrorComponent', () => {\n let component: ErrorComponent;\n let fixture: ComponentFixture<Er... | typescript | edit | 0 | 1 | apache-2.0 | 338b2e6b853e1b6dae0487fe4a15e1f3955134e5 | jbrowneuk/jblog,jbrowneuk/jblog,jbrowneuk/jblog,jbrowneuk/jblog | src/app/error/error.component.spec.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 DocumentDetails from './DocumentDetails';\n\nexport default () => {\n\n const { id } = useParams();\n const [document, setD... | typescript | edit | null | null | apache-2.0 | 8494a3467feba04a12909e538513c769f61b3132 | dainst/idai-field-web,dainst/idai-field-web,dainst/idai-field-web | ui/src/Document.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as bootstrap from './bootstrap';\n\n//\n// PLEASE DO NOT MODIFY / DELETE UNLESS YOU KNOW WHAT YOU ARE DOING\n//\n// This file is providing the test runner to use when running extension tests.\n// By default the test runner in u... | typescript | edit | 0 | 2 | mit | 5158abc945d02ef28a0de60b5dd09322da8aacf1 | neild3r/vscode-php-docblocker | test/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport React, { PropsWithChildren, ReactElement } from 'react'\nimport { Link as HyperLink, LinkProps } from 'react-router-dom'\n\nexport default function Link({\n to,\n children,\n ...rest\n}: PropsWithChildren<LinkProps>): ReactEle... | typescript | edit | null | null | mit | 22b3a5b23304a3069aefc98ee583f4a31836ca5c | daltonmenezes/daltonmenezes.github.io,daltonmenezes/daltonmenezes.github.io,daltonmenezes/daltonmenezes.github.io | src/components/Layout/Link/index.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n\"use strict\";\n\nimport sha3 = require(\"js-sha3\");\n\nimport { arrayify, BytesLike } from \"@ethersproject/bytes\";\n\nexport function keccak256(data: BytesLike): string {\n return '0x' + sha3.keccak_256(arrayify(data));\n}\n\n``... | typescript | edit | 0 | 1 | mit | 5eb393d828328b34567566d3c0d622b4aef1e202 | ethers-io/ethers.js,ethers-io/ethers.js,ethers-io/ethers.js,ethers-io/ethers.js,ethers-io/ethers.js,ethers-io/ethers.js,ethers-io/ethers.js | packages/keccak256/src.ts/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Component, Input, Output, EventEmitter } from '@angular/core'\nimport { ToastrService } from 'ngx-toastr'\nimport { Frontend, SearchOptions } from '../frontends/frontend'\n\n@Component({\n selector: 'search-panel',\n temp... | typescript | edit | 0 | 2 | mit | 35289a54b3873f36826016b1905f0a082ffc1da1 | Eugeny/terminus,Eugeny/terminus,Eugeny/terminus,Eugeny/terminus,Eugeny/terminus,Eugeny/terminus | terminus-terminal/src/components/searchPanel.component.ts | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.