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 * as React from \"react\";\nimport Markdown = require(\"react-markdown\");\n\nimport InputComponent from \"./InputComponent\";\nimport \"./style/TaskDescription.css\";\n\nexport default class extends InputComponent {\n public ... | typescript | edit | null | null | mit | f2605cb814c11dbf2fa006c890b509e1052e975f | raviqqe/code2d,raviqqe/code2d,raviqqe/code2d,raviqqe/code2d | app/src/component/TaskDescription.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Application } from 'typedoc/dist/lib/application';\nimport { ParameterType } from 'typedoc/dist/lib/utils/options/declaration';\nimport { MarkdownPlugin } from './plugin';\n\nmodule.exports = (PluginHost: Application) => {\n\n ... | typescript | edit | 0 | 2 | mit | dec7761c438336e248b59d3843ce69cd961a33a8 | tgreyuk/typedoc-plugin-markdown,tgreyuk/typedoc-plugin-markdown | src/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/**\n * @public\n */\nexport type Node = {\n\tnodeType: number;\n};\n\n/**\n * @public\n */\nexport type Attr = Node & {\n\tlocalName: string;\n\tname: string;\n\tnamespaceURI: string;\n\tnodeName: string;\n\tprefix: string;\n\tvalue: s... | typescript | edit | 0 | 0 | mit | 8264f3aa18be424ca9f137b9b8398bd6eec169e2 | FontoXML/fontoxpath,FontoXML/fontoxpath,FontoXML/fontoxpath | src/types/Types.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { useEffect } from 'react';\nimport { useRouteMatch } from 'react-router';\nimport { load } from 'proton-shared/lib/api/core/load';\n\nimport useApi from './useApi';\n\nconst useLoad = () => {\n const api = useApi();\n\n /*... | typescript | edit | 0 | 1 | mit | 5f35907f7f985724078564f0f084cb95c655b5e9 | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | packages/components/hooks/useLoad.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/// <reference path=\"jade.d.ts\"/>\n\nimport jade = require('jade');\n\njade.compile(\"b\")();\njade.compileFile(\"foo.jade\", {})();\njade.compileClient(\"a\")({ a: 1 });\njade.compileClientWithDependenciesTracked(\"test\").body();\nj... | typescript | edit | 0 | 0 | mit | 2bcb76339897101fcac845fb6c5b3c9507dbb0c7 | shlomiassaf/DefinitelyTyped,Softpagehomeware/DefinitelyTyped,jimthedev/DefinitelyTyped,jraymakers/DefinitelyTyped,georgemarshall/DefinitelyTyped,schmuli/DefinitelyTyped,chbrown/DefinitelyTyped,Pro/DefinitelyTyped,damianog/DefinitelyTyped,benishouga/DefinitelyTyped,GiedriusGrabauskas/DefinitelyTyped,ryan10132/Definitely... | jade/jade-tests.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from 'react';\nimport { SharedBasic } from './utils';\n\nexport interface CollectionItemProps extends SharedBasic {\n active?: boolean;\n href: string;\n}\n\n/**\n * React Materialize: CollectionItem\n */\ndeclare co... | typescript | edit | 0 | 0 | mit | 3f88134dc331b319cecd4c4ddc2ab5c994563774 | react-materialize/react-materialize,react-materialize/react-materialize,react-materialize/react-materialize | types/components/CollectionItem.d.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { c } from 'ttag';\nimport { AlertModal, Button, Href } from '../../components';\n\ninterface Props {\n message?: string;\n open: boolean;\n onClose: () => void;\n}\n\nconst AbuseModal = ({ message, open, onClose }: Prop... | typescript | edit | null | null | mit | 36ff413878bfed46aad013a62a102df981a7c10b | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | packages/components/containers/login/AbuseModal.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 styled, { StyledFunction } from \"styled-components\"\n\ninterface EmbedProps {\n section: any\n}\n\nconst Embed: React.SFC<EmbedProps> = props => {\n const { url, height, mobile_height } = pro... | typescript | edit | null | null | mit | c6ad36326a792b1c41f531f2b83fa438d2dc98de | artsy/reaction,artsy/reaction-force,xtina-starr/reaction,xtina-starr/reaction,xtina-starr/reaction,craigspaeth/reaction,craigspaeth/reaction,artsy/reaction,artsy/reaction,artsy/reaction-force,craigspaeth/reaction,xtina-starr/reaction | src/components/publishing/embed.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport styled from \"../..\";\n\ndeclare const A: React.ComponentClass;\ndeclare const B: React.StatelessComponent;\ndeclare const C: React.ComponentClass | React.StatelessComponent;\n\nstyled(A); // succeeds\nstyled(B); // succeeds\nst... | typescript | edit | 0 | 0 | mit | cd9dac9f854da13c50885713b94aadaaab4502c0 | css-components/styled-components,styled-components/styled-components,JamieDixon/styled-components,JamieDixon/styled-components,JamieDixon/styled-components,styled-components/styled-components,styled-components/styled-components | typings/tests/component-type-test.tsx | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as child_process from \"child_process\"\n\nimport jsonDatabase from \"../db/json\"\nimport { DATABASE_JSON_FILE } from \"../globals\"\n\nif (process.env.NO_RECURSE) {\n process.exit(0)\n}\n\nconst log = console.log\n\nconst go... | typescript | edit | 0 | 4 | mit | 05e92d2080b5098e7eea0c1e136af75fd565c4d7 | danger/peril,danger/peril,danger/peril,danger/peril,danger/peril | source/scripts/setup-plugins.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport marked from 'marked';\nimport sanitizeHtml from 'sanitize-html';\n\nconst renderer = new marked.Renderer();\n\nrenderer.link = function(_href, _title, _text) {\n\tconst link = marked.Renderer.prototype.link.apply(this, arguments)... | typescript | edit | 0 | 1 | mit | b255e7e03825f043fc06b89f2778a362941d4eb4 | resin-io-modules/resin-components,resin-io-modules/resin-components,resin-io-modules/resin-components | src/extra/utils.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { pick } from '@waldur/core/utils';\nimport * as ProvidersRegistry from '@waldur/providers/registry';\n\nimport { VMwareForm } from './VMwareForm';\n\nconst serializer = pick([\n 'username',\n 'password',\n]);\n\nProvidersRegis... | typescript | edit | 0 | 0 | mit | 262307550979bcdd5b5e78615498497aa4f6c852 | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport | src/vmware/provider.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { join } from 'path';\nimport Config, { Middleware } from './Config';\nimport ConfigLoader from './ConfigLoader';\nimport SecureMiddleware from './middleware/SecureMiddleware';\n\nlet middleware: Middleware | undefined;\nif (proc... | typescript | edit | 0 | 1 | mit | b11d615eb662f32e16e5129eac423d9ff18ea1bb | kou64yama/nobushi-config | src/load.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { NgModule, Component } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RouterModule, Routes, Route } from '@angular/router';\n\nimport { SharedModule } from '../shared/shared.module';\n\nimport {... | typescript | edit | 0 | 0 | apache-2.0 | b2cca406bb679fb21eb956a47eec883bc08b48de | jbrowneuk/jblog,jbrowneuk/jblog,jbrowneuk/jblog,jbrowneuk/jblog | src/app/projects/projects.module.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as vsc from 'vscode'\r\nimport * as glob from 'glob'\r\nimport { IPostfixTemplate } from '../template'\r\nimport { CustomTemplate } from '../templates/customTemplate'\r\n\r\nexport const loadCustomTemplates = () => {\r\n const... | typescript | edit | 0 | 3 | mit | 5a7077facb2fe79f4f06ad0187ebf87f4687462d | ipatalas/vscode-postfix-ts,ipatalas/vscode-postfix-ts | src/utils/templates.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from 'react';\r\nimport { EmptyState } from '@shopify/polaris';\r\n\r\nexport interface Handlers {\r\n onRefresh: () => void;\r\n}\r\n\r\nconst EmptyQueue = ({ onRefresh }: Handlers) => {\r\n return (\r\n <EmptySt... | typescript | edit | null | null | mit | 1b65b3cafbae2c7e908df65dab3b8d8aab949a86 | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | src/components/Queue/EmptyQueue.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';\n\nconst nativeImage = typeof window !== 'undefined'\n ? window.require('electron').nativeImage\n : require('electron').nativeImage;\nconst Jimp = typeof window !== 'undefined' ? window.re... | typescript | edit | 0 | 3 | apache-2.0 | 6d5f134266ff267f2d090691b02953d8e3822f95 | codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client | src/app/core/images/imagestore/image-converter.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Injectable } from '@angular/core';\nimport { Headers, Http, Response } from '@angular/http';\nimport 'rxjs/add/operator/toPromise';\n\nimport { Subject } from '../../sharedClasses/subject'\nimport { Question } from '../../share... | typescript | edit | 0 | 2 | mit | 1c5a0b68f7d0f3ac3272142d5a37dc383834a08d | shavindraSN/examen,shavindraSN/examen,shavindraSN/examen | client/components/paper/paper.service.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/*\n * This file is automatically loaded and run by Karma because ... | typescript | edit | 0 | 1 | bsd-3-clause | 09e65fc25e2ff9a5dac6df1d2b0670027752c942 | ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend | test/unittests/front_end/test_setup/test_setup.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n///<reference path='..\\..\\..\\src\\harness\\fourslash.ts' />\r\n///<reference path='..\\runnerbase.ts' />\r\n\r\nclass FourslashRunner extends RunnerBase\r\n{\r\n public runTests()\r\n {\r\n var runSingleFourslashTest = (... | typescript | edit | 0 | 2 | apache-2.0 | a4edaaeec0f09d6ebf22c5bf60b5cb69be09f700 | mbebenita/shumway.ts,hippich/typescript,fdecampredon/jsx-typescript-old-version,tarruda/typescript,fdecampredon/jsx-typescript-old-version,rbirkby/typescript,popravich/typescript,mbebenita/shumway.ts,tarruda/typescript,guidobouman/typescript,hippich/typescript,vcsjones/typescript,guidobouman/typescript,mbebenita/shumwa... | tests/runners/fourslash/fsrunner.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport styled from 'styled-components';\n\nimport images from '../../../shared/mixins/images';\nimport typography from '../../../shared/mixins/typography';\nimport opacity from '../../../shared/defaults/opacity';\n\nexport const StyledA... | typescript | edit | 0 | 0 | apache-2.0 | 2ae5a4da84806649dec272732ea635bfbbb87e4f | Nersent/Wexond,Nersent/Wexond | src/newtab/components/App/styles.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/*\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https... | typescript | edit | 0 | 0 | apache-2.0 | f315130d67ee02f50dd9ad56e1c4b314e3d85639 | firebase/extensions,firebase/extensions,firebase/extensions,firebase/extensions,firebase/extensions | postponed/firestore-mirror-bigquery/functions/src/firestoreEventHistoryTracker.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 | rejected_duplicate | Near-duplicate of sample 113987 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport axios from 'axios';\nimport { Request, Response } from 'express';\n\ninterface ProxyRequest {\n body: string;\n headers: { [name: string]: string };\n method: string;\n url: string;\n}\n\nexport function proxy(req: Re... | typescript | edit | 0 | 4 | apache-2.0 | 3e6b7cf1a1832e97efa3289653d1db31f92ce743 | projectkudu/WebJobsPortal,projectkudu/AzureFunctions,projectkudu/AzureFunctions,projectkudu/AzureFunctions,projectkudu/AzureFunctions,projectkudu/WebJobsPortal,projectkudu/WebJobsPortal,projectkudu/WebJobsPortal | server/src/actions/proxy.ts | rejected_duplicate | Near-duplicate of sample 114947 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// Copyright 2016 underdolphin(masato sueda)\n// \n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the Li... | typescript | edit | 0 | 0 | apache-2.0 | e33a1cd26c593b58046b73d61bb8abcd9c299289 | underdolphin/SoundRebuild,underdolphin/SoundRebuild,underdolphin/SoundRebuild | src/renderer/script/settings/settings.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport React, { useRef, Ref, forwardRef } from 'react';\nimport { useCombinedRefs, useFocusTrap } from 'react-components';\n\ninterface Props extends React.HTMLAttributes<HTMLDivElement> {\n isOpen?: boolean;\n}\n\nconst PopoverConta... | typescript | edit | null | null | mit | b5fd559ca49854f9a12032d4968b6c642da38a30 | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | applications/calendar/src/app/components/events/PopoverContainer.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write typescript code for the following: Add exception catcher due to unknown crash bug"
},
{
"role": "assistant",
"content": "import Dimensions from \"./dimensions\";\nimport * as fs from \"fs\";\n\nprocess.on('uncaughtException', function(e) {\n fs.appendFile('.... | typescript | new_file | 0 | 1 | mit | f47ce0a04698bc01dae6412befb9aa6eed4e8eba | popstarfreas/Dimensions,popstarfreas/Dimensions,popstarfreas/Dimensions | index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Dom } from \"./dom\";\nimport { Component } from \"./component\";\n\nexport class DomFactory {\n static createElement(dom: Dom): HTMLElement {\n const element = document.createElement(dom.tag);\n\n if (dom.attr... | typescript | edit | 0 | 3 | mit | 071c4cddaa23fad6ea13e2deba121dc2a6e3cbae | Vtek/frameworkless,Vtek/frameworkless,Vtek/frameworkless | src/app/infrastructure/dom.factory.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Injectable } from '@angular/core';\n\n@Injectable()\nexport class ProgressBarService {\n\n protected visible = true;\n\n constructor() { }\n\n setVisible() {\n this.visible = true;\n }\n\n setHidden() {\n this.visibl... | typescript | edit | 0 | 1 | bsd-3-clause | 51caf25c0747f10fc054d320695d716778ee8556 | UoA-eResearch/research-hub,UoA-eResearch/research-hub,UoA-eResearch/research-hub | src/app/app.progress-bar.service.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/**\n * Copyright (c) 2015, Fullstack.io\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Component, EventEmitter... | typescript | edit | 0 | 1 | mit | f0939f15a7c9939095a8a87c5000df6acc63676e | etrivinos/ng-book2-forms,etrivinos/ng-book2-forms,etrivinos/ng-book2-forms | app.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport ko = require(\"knockout\");\nimport services = require('services/services');\nimport authentication = require('./authentication');\nimport * as Folke from '../folke-core/folke';\nimport * as ServiceHelpers from \"../folke-ko-serv... | typescript | edit | 0 | 2 | mit | d4cd5fdeb63310ef7b72fe0c643644caa234e18c | folkelib/folke-identity | identity-login.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { createLogger, format, transports } from \"winston\";\n\nconst alignedWithColorsAndTime = format.combine(\n format.colorize(),\n format.timestamp(),\n format.prettyPrint(),\n format.align(),\n format.printf((info)... | typescript | edit | 0 | 1 | mit | b9af3b398b44e189db5b512f769f5a4644019659 | JacobFischer/Cerveau,siggame/Cerveau,JacobFischer/Cerveau,siggame/Cerveau | src/core/log.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { inject } from '@angular/core/testing';\nimport { TestComponentBuilder } from '@angular/core/testing/test_component_builder';\n\nimport { ActorComponent } from './actor.component';\n\ndescribe('Component: ActorComponent', () => ... | typescript | edit | 0 | 1 | isc | e4f2414a3978ead5f66ae664edd008e2549accea | textbook/known-for-web,textbook/known-for-web,textbook/known-for-web | src/app/actor/actor.component.spec.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { ComponentFixture, TestBed } from '@angular/core/testing';\n\nimport { Observable } from 'rxjs/Rx';\n\nimport { MovieComponent } from './movie.component';\n\ndescribe('Component: Movie', () => {\n let fixture: ComponentFixture<... | typescript | edit | 0 | 1 | isc | d75aa52ad2753b253f63ab9d44f1f9556fedd055 | textbook/known-for-web,textbook/known-for-web,textbook/known-for-web | src/app/movie/movie.component.spec.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// This file is part of cxsd, copyright (c) 2016 BusFaster Ltd.\n// Released under the MIT license, see LICENSE.\n\nimport {Namespace} from './Namespace';\nimport {Type} from './Type';\n\nexport class Member {\n\tconstructor(name: strin... | typescript | edit | 0 | 1 | mit | 4373d35bd184fba0af7069b2f230fa6a092f7803 | charto/cxsd,charto/fast-xml,charto/fast-xml,charto/cxsd | src/schema/Member.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { injectable, inject } from \"inversify\";\nimport { ISlackWebAPI } from \"./ISlackWebAPI\";\nimport { PostMessageRequest, SlackConfig, SlackWebAPIResponse } from \"./Types\";\nimport { IHttpClient } from \"../core/http/IHttpClie... | typescript | edit | 0 | 0 | apache-2.0 | 50860b1b528686d0c3e10cb5e0a44cedbed47c72 | zmoog/dickbott | scripts/slack/SlackWebAPI.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/**\n * Created by adam on 18/12/2016.\n */\nexport const REMOTE_URL = 'http://next.obudget.org/search';\nexport const LOCAL_URL = 'http://localhost:5000/search';\nexport const URL = REMOTE_URL;\n// export const URL = LOCAL_URL;\n\nexp... | typescript | edit | 0 | 0 | mit | db7270a0b0b91624449e50b31cde9261d05938b8 | aviklai/budgetkey-app-search,aviklai/budgetkey-app-search,aviklai/budgetkey-app-search | app/_config/config.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\ndeclare var sinon: Sinon.SinonStatic;\nimport * as moment from \"moment\";\n\ndeclare module \"moment\" {\n export type MomentFormatSpecification = string;\n}\n\nexport = moment;\n\n```\n\nApply this change: Declare sinon as a global... | typescript | edit | 0 | 0 | mit | dd73ad6a96e848e10cd94c2ad39008b783271e70 | RenovoSolutions/TypeScript-Angular-Utilities,RenovoSolutions/TypeScript-Angular-Utilities,SamGraber/TypeScript-Angular-Utilities,SamGraber/TypeScript-Angular-Utilities | typings/globals.d.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport React from 'react'\nimport { requireNativeComponent, Platform } from 'react-native';\nimport NavigationBar from './NavigationBar';\nimport SearchBar from './SearchBar';\n\nclass CoordinatorLayout extends React.Component<any, any>... | typescript | edit | null | null | apache-2.0 | dfbf27e2958dd7770996cc4e75db9162484a0e48 | grahammendick/navigation,grahammendick/navigation,grahammendick/navigation,grahammendick/navigation,grahammendick/navigation,grahammendick/navigation,grahammendick/navigation | NavigationReactNative/src/CoordinatorLayout.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport React from 'react'\nimport styled from 'styled-components'\nimport Dialog from '../material/dialog'\nimport Download from './download'\n\nconst StyledDialog = styled(Dialog)`\n max-width: 480px;\n`\n\ninterface DownloadDialogPro... | typescript | edit | null | null | mit | 5f45aebad3d9143ee6d340394c81a76bee8c3bb5 | ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery | client/download/download-dialog.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Ng2CiAppPage } from './app.po';\n\ndescribe('ng2-ci-app App', function () {\n let page: Ng2CiAppPage;\n\n beforeEach(() => {\n page = new Ng2CiAppPage();\n });\n\n it('should display message saying app works'... | typescript | edit | 0 | 1 | mit | e9d7a91d17ba13dda7b6b42ea8f1ff7fc8beb2ec | Elecash/ng2-ci-app,Elecash/ng2-ci-app,Elecash/ng2-ci-app,Elecash/ng2-ci-app | e2e/app.e2e-spec.ts | rejected_duplicate | Near-duplicate of sample 113702 | true |
[
{
"role": "user",
"content": "Write typescript code for the following: Add static mock of tree data"
},
{
"role": "assistant",
"content": "import {h, render} from 'preact';\n\nconst TREE_DATA = [\n\t{\n\t\tname: 'Services',\n\t\ticon: '#folder',\n\t\tentries: [\n\t\t\t{\n\t\t\t\tkey: 14829493409... | typescript | new_file | 0 | 0 | mit | adde8c9c53a4b90c89a5ab41be64a389e9c5a57e | Avol-V/anykey,Avol-V/anykey,Avol-V/anykey | client.src/index.tsx | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport _ = require(\"lodash\");\n\nexport function memoize(resolver: any) {\n return (target: any, name: string, descriptor: PropertyDescriptor) => {\n descriptor.value = _.memoize(descriptor.value, resolver);\n\n retur... | typescript | edit | 0 | 1 | mit | 8b6345defe0eed52987b70f9672f2e7712fab051 | Young55555/black-screen,j-allard/black-screen,smaty1/black-screen,w9jds/black-screen,cyrixhero/black-screen,drew-gross/black-screen,drew-gross/black-screen,kingland/black-screen,cyrixhero/black-screen,smaty1/black-screen,gastrodia/black-screen,habibmasuro/black-screen,rob3ns/black-screen,jbhannah/black-screen,toxic88/b... | src/Decorators.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport 'reflect-metadata';\nimport test from 'ava';\n\nimport { command, option } from '../dist';\n\n// interface Global {\n// Reflect: any;\n// }\n\nconst g = <any>global;\nconst Reflect = g.Reflect;\n\ntest((t) => {\n debugger;\n ... | typescript | edit | 0 | 1 | mit | 6ce0c0b8332974ff868684c951e2ac1207abde41 | dwieeb/minimist-decorators | test/test.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n///<reference path=\"./interfaces.d.ts\" />\r\n\r\nclass MathDemo implements MathInterface{\r\n public PI : number;\r\n\r\n constructor() {\r\n this.PI = 3.14159265359;\r\n }\r\n\r\n public pow(base: number, exponent: number) {\r... | typescript | edit | 0 | 2 | mit | 0ea4ffec7f3752cefc86b009248a5f7c16cc5725 | ChargerIIC/ts-book,ChargerIIC/ts-book,ChargerIIC/ts-book | source/math_demo.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport const PROJECT_NAME = 'typings'\nexport const CONFIG_FILE = `${PROJECT_NAME}.json`\nexport const TYPINGS_DIR = `${PROJECT_NAME}_typings`\nexport const DTS_MAIN_FILE = `${PROJECT_NAME}.main.d.ts`\nexport const DTS_BROWSER_FILE = `$... | typescript | edit | 0 | 0 | mit | e504a7938cbc56e301b65667247432cd7d5202ab | typings/typings,typings/typings | src/utils/config.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport const fetchImage = async (project: string,\n id: string,\n maxWidth: number,\n maxHeight: number,\n t... | typescript | edit | 0 | 3 | apache-2.0 | 3f0814c692cbed2864365df591c1e9b2bd5c1ddc | dainst/idai-field-web,dainst/idai-field-web,dainst/idai-field-web | ui/src/api/image.ts | rejected_duplicate | Near-duplicate of sample 113752 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {\n Directive,\n ElementRef,\n Inject,\n forwardRef,\n Input,\n Host,\n HostListener\n} from '@angular/core';\n\nimport { AngularDropdownDirective }\n from './angular-dropdown.directive';\n\n@Directive({\n selector: '[ng... | typescript | edit | 0 | 2 | mit | d68f737abf00b490ba463bb87f5ded5ef091b42a | topaxi/angular-dropdown,topaxi/angular-dropdown,topaxi/angular-dropdown | angular-dropdown-control.directive.ts | rejected_duplicate | Near-duplicate of sample 116177 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/**\n * Slack upload logic and utilites\n */\n\n'use strict'\n\nimport * as fs from 'fs'\nimport { exec } from 'child_process'\nimport * as request from 'request-promise'\nimport { SLACK_TOKEN, SLACK_CHANNEL } from './config'\n\n/**\n *... | typescript | edit | 0 | 3 | apache-2.0 | 690d1e89780022ca84b80890eb360afd9562da4a | shantanuraj/slack-android-uploader,shantanuraj/slack-android-uploader | lib/utils.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Injectable, provide } from '@angular/core';\nimport { DomSanitizationService, SecurityContext } from '@angular/platform-browser';\n\n@Injectable()\nexport class NoSanitizationService {\n sanitize(ctx: SecurityContext, value:... | typescript | edit | 0 | 1 | mit | ad76b0d9b3bc9fd17d83b9e1e230a299980252f7 | zoehneto/tumblr-reader,zoehneto/tumblr-reader,zoehneto/tumblr-reader | app/shared/no.sanitization.service.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Observable } from 'rxjs';\nimport { FilterOptions } from './collection';\n\nexport { Database } from './database';\nexport { Collection } from './collection';\nexport { Query } from './query';\n\n/**\n * IDatabase\n * IDatabase... | typescript | edit | 0 | 0 | mit | 3e8ecaadc487a8c1438b40c73cb4e4b2303a3609 | Cinergix/rxdata,Cinergix/rxdata | src/index.ts | rejected_duplicate | Near-duplicate of sample 112548 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { OutlineSyntaxNode } from './OutlineSyntaxNode'\nimport { InlineSyntaxNode } from './InlineSyntaxNode'\nimport { InlineSyntaxNodeContainer } from './InlineSyntaxNodeContainer'\nimport { OutlineSyntaxNodeContainer } from './Outli... | typescript | edit | 0 | 1 | mit | a195bb2c2d1fd924c62d6d3e78d9bae628bc3fd5 | start/up,start/up | src/SyntaxNodes/DescriptionListNode.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { IFilterParser } from '../interfaces/IFilterParser';\n\nexport function parseNodeFiltersFactory(): IFilterParser {\n return (url: string) => {\n const nodeFiltersMatch = url\n .replace(/{.*?\\/.*?\\/.*?}/, '')\n .m... | typescript | edit | 0 | 5 | mit | ae7273d673e3da00c1b07927b05ca225a652bc54 | maoberlehner/node-sass-magic-importer,maoberlehner/node-sass-magic-importer,maoberlehner/node-sass-magic-importer | packages/node-sass-magic-importer/src/functions/parse-node-filters.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {\n ComponentDoc,\n parse,\n PropItem,\n PropItemType,\n Props,\n withCustomConfig,\n withDefaultConfig\n} from './parser';\n\nexport {\n parse,\n withDefaultConfig,\n withCustomConfig,\n ComponentDoc,\n Props,\n Pro... | typescript | edit | 0 | 0 | mit | 9ba350be219852397194600f803e368798c72a1b | pvasek/react-docgen-typescript,styleguidist/react-docgen-typescript | src/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { createStore, compose, applyMiddleware } from 'redux';\r\nimport createSagaMiddleware from 'redux-saga';\r\nimport { autoRehydrate, persistStore } from 'redux-persist';\r\nimport { rootReducer } from './reducers';\r\nimport root... | typescript | edit | 0 | 0 | mit | ab4ade51a9db79776539be79fd31bcac85077057 | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | src/store.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nconst data = require('../data/users.json').users;\nimport { ElementFinder } from 'protractor';\n\nexport class User {\n alias: string;\n description: string;\n username: string;\n password: string;\n\n\n constructor(alias: string, ... | typescript | edit | 0 | 5 | apache-2.0 | 9507092f8f31fe45094eba8cfc34e3e3a35dcae4 | kahboom/ipaas-client,kahboom/ipaas-client,kahboom/ipaas-client,kahboom/ipaas-client | e2e/common/common.ts | rejected_duplicate | Near-duplicate of sample 114597 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport = scrollama;\ndeclare function scrollama(): scrollama.ScrollamaInstance;\n\ndeclare namespace scrollama {\n\n export type DecimalType = 0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1;\n\n export type ScrollamaOptio... | typescript | edit | 0 | 1 | mit | 856aa57f59b7439ff1a5bc15b8e07abdaa90cc7f | russellgoldenberg/scrollama,russellgoldenberg/scrollama | index.d.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/**\n * @author Thomas Kleinke\n */\nexport module AngularUtility {\n\n export async function refresh() {\n\n await new Promise(resolve => setTimeout(async () => resolve(), 1));\n }\n}\n```\n\nApply this change: Increase ti... | typescript | edit | 0 | 1 | apache-2.0 | ded00a0b4b3d5487d1b8b11344a9a4d723d78710 | codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client | app/common/angular-utility.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Component, OnInit } from \"@angular/core\";\n\n@Component({\n selector: \"map-app\",\n templateUrl: \"map.component.html\"\n})\nexport class MapComponent implements OnInit {\n public tweets: Array<Object>;\n\n construct... | typescript | edit | 0 | 1 | mit | 490e4e1b2a27664e6609eaf6715896eb2caffd49 | Strassengezwitscher/Strassengezwitscher,Strassengezwitscher/Strassengezwitscher,Strassengezwitscher/Strassengezwitscher,Strassengezwitscher/Strassengezwitscher,Strassengezwitscher/Strassengezwitscher | frontend/map.component.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport function arrayFrom(attrs: NamedNodeMap): readonly Attr[];\nexport function arrayFrom<N extends Node>(nodeListOf: NodeListOf<N>): readonly N[];\nexport function arrayFrom(nodeListOf: HTMLCollection): readonly Element[];\nexport fu... | typescript | edit | 0 | 3 | mit | 84aaf5f8d3e1e954f3286c36241c4dad81170017 | garysoed/gs-tools,garysoed/gs-tools,garysoed/gs-tools,garysoed/gs-tools | src/collect/structures/array-from.ts | accepted | null | true |
[
{
"role": "user",
"content": "Write typescript code for the following: Add a string-based fallback when Symbol is not available\n\nFixes issue #22"
},
{
"role": "assistant",
"content": "declare var global: any;\n\nlet root: any;\nif (typeof self !== 'undefined') {\n root = self;\n} else if (typ... | typescript | new_file | 0 | 0 | mit | b53b76bd3ab0e5e0c7fe2f4be1bd54ff92eb0860 | TylorS/snabbdom-selector | src/parent-symbol.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/**\n * Indicates if the given string ends with the given suffix\n *\n * @export\n * @param {string} str\n * @param {string} suffix\n * @returns {boolean}\n */\nexport function strEndsWith(str: string, suffix: string): boolean {\n re... | typescript | edit | 0 | 2 | mit | ab0494f592cd5fbd4d960991278190020ab59b5b | jumpinjackie/mapguide-react-layout,jumpinjackie/mapguide-react-layout,jumpinjackie/mapguide-react-layout,jumpinjackie/mapguide-react-layout,jumpinjackie/mapguide-react-layout | src/utils/string.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/**\n * Error codes for tsetse checks.\n *\n * Start with 21222 and increase linearly.\n * The intent is for these codes to be fixed, so that tsetse users can\n * search for them in user forums and other media.\n */\nexport enum ErrorCo... | typescript | edit | 0 | 0 | apache-2.0 | 56a4048571764fea35512d0bdae01a5ab19caed8 | google/tsec,google/tsec | src/third_party/tsetse/error_code.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/**\n * @author Thomas Kleinke\n */\nexport interface Literature {\n\n quotation: string;\n zenonId?: string;\n}\n\n\nexport module Literature {\n\n export function generateLabel(literature: Literature, getTranslation: (key: st... | typescript | edit | 0 | 2 | apache-2.0 | aa6ecde922a6e0fec5f7a28d5911d8bc6dad289f | dainst/idai-components-2,dainst/idai-components-2,dainst/idai-components-2 | src/model/literature.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { FunctionComponent, Fragment } from \"react\"\n\nconst Card: FunctionComponent = ({ children }) => {\n return (\n <Fragment>\n <div className=\"card-container\">{children}</div>\n <style jsx>{`\n div.card-co... | typescript | edit | null | null | mit | c897094a99c24e034a72581fb602df618c784db5 | JosephDuffy/josephduffy.co.uk,JosephDuffy/josephduffy.co.uk,JosephDuffy/josephduffy.co.uk | components/Card.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as fs from \"fs\";\nimport { MultiReporter } from \"./mocha_multi_reporter\";\nimport testRunner = require(\"vscode/lib/testrunner\");\nconst onExit = require(\"signal-exit\"); // tslint:disable-line:no-var-requires\n\n// Ensur... | typescript | edit | 0 | 5 | mit | 5840bf64e92d291cc037830c56edc90a67f1f1a7 | Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code | test/test_runner.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { window } from 'global';\nimport { addons } from '@storybook/addons';\nimport { STORY_CHANGED, STORY_ERRORED, STORY_MISSING } from '@storybook/core-events';\n\nimport ReactGA from 'react-ga';\n\naddons.register('storybook/google... | typescript | edit | 0 | 1 | mit | db7bd4efda0076eec0e27c0b5058063c269ed193 | storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,kadirahq/react-storybook,kadirahq/react-storybook | addons/google-analytics/src/register.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as classNames from 'classnames';\nimport * as React from 'react';\n\nimport { Step } from './Step';\nimport './StepsList.scss';\n\ninterface StepsListProps {\n choices: string[];\n value: string;\n onClick?(step: string): vo... | typescript | edit | null | null | mit | b2210113755270e1de915cf78cb6372026b0d89a | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport | src/marketplace/common/StepsList.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { inject } from 'aurelia-framework';\nimport { Router } from 'aurelia-router';\nimport { HackerNewsApi } from '../../services/api';\n\n@inject(Router, HackerNewsApi)\nexport class Item {\n private readonly router: Router;\n ... | typescript | edit | 0 | 6 | isc | a6f1aca3eef9b3d7402126bf020e965b286c7405 | michaelbull/aurelia-hacker-news,michaelbull/aurelia-hacker-news,MikeBull94/aurelia-hacker-news,MikeBull94/aurelia-hacker-news,michaelbull/aurelia-hacker-news | src/pages/item/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { commands, Uri } from \"vscode\";\nimport { forceWindowsDriveLetterToUppercase } from \"../utils\";\n\nexport function fsPath(uri: Uri | string) {\n\t// tslint:disable-next-line:disallow-fspath\n\treturn forceWindowsDriveLetterT... | typescript | edit | 0 | 2 | mit | b5fb2f105aef9f4887641cc9f55030f549df35de | Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code | src/shared/vscode/utils.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport default class HttpJsonService {\n private basePath: string;\n\n constructor(basePath: string) {\n this.basePath = basePath;\n }\n\n public get(url: string): Promise<any> {\n return this.fetch(\"GET\", url, null);\n }\n... | typescript | edit | 0 | 1 | mit | 665e692ab7ebd0db2969b3cac6ae97dac1306ea4 | DiscoViking/website,DiscoViking/website,DiscoViking/website,DiscoViking/website,DiscoViking/website | app/src/services/http-json-service.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as path from 'path';\n\ndeclare var atom: any;\n\nfunction parseFilepath(s: string): string {\n if (s) {\n // remove newlines\n s = s.replace('\\\\n', '');\n // sanitize with path.parse first\n co... | typescript | edit | 0 | 3 | mit | 5ab28dbbeec853606367a7611acda37e9a078e32 | banacorn/agda-mode,banacorn/agda-mode,banacorn/agda-mode | src/parser/util.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {Injectable} from \"@angular/core\";\n\nconst p = require(\"../../package.json\");\n\n@Injectable()\nexport class ConfigService {\n public cfgFilterLines: boolean = true;\n static overpassUrl = \"https://overpass-api.de/api... | typescript | edit | 0 | 0 | mit | c23c8f0bd134289cdee51b26620e57156f1a3efa | dkocich/osm-pt-ngx-leaflet,dkocich/osm-pt-ngx-leaflet,dkocich/osm-pt-ngx-leaflet | public_src/services/config.service.ts | rejected_duplicate | Near-duplicate of sample 112674 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n///<reference path='user_settings_dialog.ts'/>\n\nvar remote = require('remote');\nvar fs = require('fs');\nvar path = require('path');\nvar settings = require('../browser/user_settings')\nvar MainController = require('./main_controller... | typescript | edit | 0 | 3 | mit | f0e3acbe5165a0f2366df87b3d403249ef1d7c3b | ueokande/adversaria,ueokande/adversaria,ueokande/adversaria | src/renderer/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { c } from 'ttag';\nimport React from 'react';\nimport americanExpressSafekeySvg from 'design-system/assets/img/bank-icons/amex-safekey.svg';\nimport discoverProtectBuySvg from 'design-system/assets/img/bank-icons/discover-protec... | typescript | edit | null | null | mit | 2a76afda7fb7f514a04e35053e98a83a92ac5959 | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | packages/components/containers/payments/Alert3ds.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as Discord from 'discord.js';\nimport { creator, infoCommand, limitCommand, ordersCommand, priceCommand, regionCommand } from '../market-bot';\nimport { logCommand } from '../helpers/command-logger';\n\nexport async function in... | typescript | edit | 0 | 1 | mit | 971df238d14653111589239ef3bd7f01d4508bec | Ionaru/MarketBot | src/commands/info.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nconst StringReplacePlugin = require('string-replace-webpack-plugin');\n\nimport constant from './const';\nimport hoist from './hoist';\nimport minify from './minify';\nimport banner from './banner';\n\nconst env = process.env.NODE_ENV;\... | typescript | edit | 0 | 2 | mit | fe1e01a108369bcaead2959590ad3addb9683988 | Tosuke/misskey,Tosuke/misskey,syuilo/Misskey,syuilo/Misskey,ha-dai/Misskey,Tosuke/misskey,Tosuke/misskey,Tosuke/misskey,ha-dai/Misskey | webpack/plugins/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as path from 'path';\n\nimport { runTests } from 'vscode-test';\n\nasync function main() {\n\ttry {\n\t\t// The paths are relative from the `/out/test` folder.\n\t\tconst extensionDevelopmentPath = path.resolve(__dirname, '../.... | typescript | edit | 0 | 2 | mit | 7942d0e00e6a3b956f99be36aa7b9562785ce969 | darkriszty/MarkdownTablePrettify-VSCodeExt,darkriszty/MarkdownTablePrettify-VSCodeExt | test/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n#!/usr/bin/env node\n\n/**\n * @fileoverview Main CLI that is run via the sonarwhal command. Based on ESLint.\n */\n\n/* eslint no-console:off, no-process-exit:off */\n\n/*\n * -----------------------------------------------------------... | typescript | edit | 0 | 2 | apache-2.0 | e3e1ca02d5db904a645184b389bb8d1186bf2227 | alrra/sonar,alrra/sonar,alrra/sonar,sonarwhal/sonar,sonarwhal/sonar,sonarwhal/sonar | src/bin/sonarwhal.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as debug from 'debug'\n\nexport function log (namespace: string): debug.IDebugger {\n return debug(`machinomy:${namespace}`)\n}\n\n```\n\nApply this change: Replace Logger code with right Logger code."
},
{
"role": "as... | typescript | edit | 0 | 2 | apache-2.0 | 598121371bebf3f3d5f5decacc0f83b0aa27ae9a | machinomy/machinomy,machinomy/machinomy,machinomy/machinomy | packages/logger/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from \"react\";\n\nexport interface ToolbarProps {\n\n}\n\nexport class Toolbar extends React.Component<ToolbarProps> {\n public render() {\n return \"TOOLBAR\";\n } \n}\n```\n\nApply this change: Add wrap... | typescript | edit | null | null | mit | d442eb06da8456d002a746f66dd44a2b47b190d5 | cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative | client/Commands/components/Toolbar.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport AnimeNotifier from \"../AnimeNotifier\"\n\n// Play video\nexport function playVideo(arn: AnimeNotifier, video: HTMLVideoElement) {\n\tvideo.volume = arn.audioPlayer.volume\n\n\tif(video.readyState >= 2) {\n\t\ttogglePlayVideo(vid... | typescript | edit | 0 | 10 | mit | d2dadb41c7958a1b6f5ed7bf6f34af7d73668b06 | animenotifier/notify.moe,animenotifier/notify.moe,animenotifier/notify.moe | scripts/Actions/Video.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport interface LinterConfig {\n name: string;\n configFiles: string[];\n extension: string;\n enableConfig: string;\n packageJSONConfig?: string;\n}\n\nexport const LINTERS: LinterConfig[] = [\n {\n name: 'ESL... | typescript | edit | 0 | 0 | mit | afaf8bc39f13e647fc742ff2146461082cb7ded5 | t-sauer/autolinting-for-javascript | src/linter-configs.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\n\ninterface OverlayProps {\n maxHeightPx?: number;\n handleMouseEvents?: (e: React.MouseEvent<HTMLDivElement>) => void;\n left?: number;\n top?: nu... | typescript | edit | null | null | mit | 875226c910042e2d6b8a2d93b394bf2b38e32da7 | cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative | client/Components/Overlay.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Gerrit } from \"./gerrit\";\nimport { Ref } from \"./ref\";\n\nexport class GerritController {\n\n constructor(private gerrit: Gerrit) {\n }\n\n public checkoutBranch() {\n\n this.gerrit.checkoutBranch(\"master\... | typescript | edit | 0 | 2 | mit | 973d2fe6374494f0f8e3df3e2bae99d8c2649418 | tht13/gerrit-vscode | src/gerrit/controller.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {Component} from \"angular2/core\";\nimport {RouteConfig} from \"angular2/router\";\nimport {NS_ROUTER_DIRECTIVES} from \"nativescript-angular/router\";\n\nimport * as Config from \"./shared/config\";\nimport {LoginPage} from \".... | typescript | edit | 0 | 0 | mit | e39695527caa66be5a2ae7c6587abe062a8e1810 | qtagtech/nativescript_tutorial,anhoev/cms-mobile,dzfweb/sample-groceries,tjvantoll/sample-Groceries,poly-mer/community,Icenium/nativescript-sample-groceries,poly-mer/community,tjvantoll/sample-Groceries,NativeScript/sample-Groceries,qtagtech/nativescript_tutorial,poly-mer/community,qtagtech/nativescript_tutorial,Native... | app/app.component.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/** Sanitize a proposed branch name by replacing illegal characters. */\nexport function sanitizedBranchName(name: string): string {\n return name.replace(/[\\x00-\\x20\\x7F~^:?*\\[\\\\|\"\"<>]|@{|\\.\\.+|^\\.|\\.$|\\.lock$|\\/$/g, '-'... | typescript | edit | 0 | 2 | mit | 127f00f6d9d83c98ea276b4a5f2c0832dca7ccb3 | kactus-io/kactus,hjobrien/desktop,gengjiawen/desktop,artivilla/desktop,hjobrien/desktop,shiftkey/desktop,say25/desktop,desktop/desktop,BugTesterTest/desktops,artivilla/desktop,BugTesterTest/desktops,say25/desktop,j-f1/forked-desktop,kactus-io/kactus,kactus-io/kactus,gengjiawen/desktop,BugTesterTest/desktops,kactus-io/k... | app/src/ui/create-branch/sanitized-branch-name.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport type { TransformOptions } from '@babel/core';\nimport type { Configuration } from 'webpack';\nimport type { StorybookOptions } from '@storybook/core/types';\nimport ReactDocgenTypescriptPlugin from 'react-docgen-typescript-plugin... | typescript | edit | 0 | 2 | mit | 9f282bf8846ab24c14d7ccd598487d562306699a | storybooks/storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/react-storybook | app/react/src/server/framework-preset-react-docgen.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport '../../src/utils/polyfills';\nimport Vue from 'vue';\nimport router from './router';\nimport '../../src/styles/main.scss';\n\nimport ComponentsPlugin from '../../src/components';\nimport DirectivesPlugin from '../../src/directive... | typescript | edit | 0 | 0 | apache-2.0 | 907ff003002e3eb218be1f025d2b807c1ce0d83e | ulaval/modul-components,ulaval/modul-components,ulaval/modul-components | tests/app/main.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {AttributesMapperFactory} from \"./AttributesMapperFactory\";\nimport Record from \"neo4j-driver/types/v1/record\";\nimport {Node, Relationship} from \"neo4j-driver/types/v1/graph-types\";\nimport {isNode, isRelationship} from \"... | typescript | edit | 0 | 6 | mit | 6eeaa7f32aa3fb2040e01a34fd22ce76dab1ef7c | robak86/neography | lib/mappers/AutoMapper.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/**\n * Configuration for Playwright using default from @jupyterlab/galata\n */\n\nimport type { PlaywrightTestConfig } from '@playwright/test';\n\nconst config: PlaywrightTestConfig = {\n testDir: './nbgrader/tests/labextension_ui-tes... | typescript | edit | 0 | 0 | bsd-3-clause | b9652f228a383eb4d869deeee47a66b04589d643 | jupyter/nbgrader,jupyter/nbgrader,jhamrick/nbgrader,jhamrick/nbgrader,jupyter/nbgrader,jupyter/nbgrader,jupyter/nbgrader,jhamrick/nbgrader,jhamrick/nbgrader | playwright.config.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { siteUrlSetting } from './instanceSettings';\n\nexport const rssTermsToUrl = (terms) => {\n const siteUrl = siteUrlSetting.get();\n const terms_as_GET_params = Object.keys(terms).map((k) => encodeURIComponent(k) + '=' + encode... | typescript | edit | 0 | 1 | mit | 021fab9d2d2786a7b17146a92fb5b191fea73ee2 | Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2 | packages/lesswrong/lib/rss_urls.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n#! /usr/bin/env node\n\nimport * as program from \"commander\"\nimport * as debug from \"debug\"\nimport chalk from \"chalk\"\n\nimport { version } from \"../../package.json\"\nimport setSharedArgs, { SharedCLI } from \"./utils/sharedDa... | typescript | edit | 0 | 1 | mit | 6a649521ef2efb496f9a2d52dab0b587b79f6498 | danger/danger-js,danger/danger-js,danger/danger-js,danger/danger-js | source/commands/danger.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {Checkbox, Heading, Stack} from '@chakra-ui/core'\n\nimport message from 'lib/message'\n\nexport default function Variants({activeVariants, allVariants, setVariant}) {\n return (\n <Stack spacing={4}>\n <Heading size='md... | typescript | edit | null | null | mit | 0100bfd848e2f96b3a38c7365a9dc1f78c19bfb7 | conveyal/analysis-ui,conveyal/analysis-ui,conveyal/analysis-ui | lib/components/modification/variants.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';\n\n@Component({\n selector: 'my-app',\n template: '\n\t<h1>{{title}}</h1>\n\t<h2>{{hero.name}} details!</h2>\n\t<div><label>id: </label>{{hero.id}}</div>\n\t<div><label>name: </label>{{hero.n... | typescript | edit | 0 | 0 | mit | 0eff2ef6f44a4043b1b49c6a6f7c1a6cd4c8b13e | atbtm/Angular2-Pull-Repo,atbtm/Angular2-Pull-Repo,atbtm/Angular2-Pull-Repo | app/app.component.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {\n beforeEachProviders,\n inject,\n injectAsync,\n it\n} from '@angular/core/testing';\n\n// Load the implementations that should be tested\nimport { App } from './app.component';\nimport { AppState } from './app.service';\n... | typescript | edit | 0 | 1 | mit | 0e52ee27b6ce70446ff147c9b835907df96217fc | bryant-pham/brograder,bryant-pham/brograder,bryant-pham/brograder,bryant-pham/brograder | src/app/app.spec.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Injectable } from '@angular/core';\nimport { Headers, Http, Response } from '@angular/http';\nimport { Observable } from 'rxjs/Observable';\nimport { Emotion } from './emotion';\n\nimport 'rxjs/Rx'; //for operators\n\n@Injectab... | typescript | edit | 0 | 1 | apache-2.0 | 452a8551bc79705a947c2337383c180a0b833a8a | shioyang/EmotionalReader,shioyang/EmotionalReader,shioyang/EmotionalReader | ERClient/src/app/er.service.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport function Enum<V extends string>(...values: V[]): { [K in V]: K };\nexport function Enum<\n T extends { [_: string]: V },\n V extends string\n>(definition: T): T;\nexport function Enum(...values: any[]): object {\n if (ty... | typescript | edit | 0 | 3 | mit | 362a854d5af5c616007fab2054efd0eaed24fa08 | dphilipson/typescript-string-enums | src/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { DurationTiming } from \"./DurationTiming\";\nimport { StatBlock } from \"./StatBlock\";\n\nexport interface TagState {\n Text: string;\n DurationRemaining: number;\n DurationTiming: DurationTiming;\n DurationCombata... | typescript | edit | 0 | 0 | mit | 2d65e3204e23104517868838dc10d5175a83fee9 | cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative | common/CombatantState.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nrequire('setimmediate');\n\nfunction runVirtually (scheduler, done, currentTime, setTime, timeToRunTo = null) {\n function processEvent () {\n const nextEvent = scheduler.peek();\n\n if (!nextEvent) {\n done();\n return... | typescript | edit | 0 | 10 | mit | 71661ff68328776b0842d53dca128e2f536d370c | feliciousx-open-source/cyclejs,usm4n/cyclejs,feliciousx-open-source/cyclejs,feliciousx-open-source/cyclejs,cyclejs/cyclejs,ntilwalli/cyclejs,ntilwalli/cyclejs,cyclejs/cyclejs,ntilwalli/cyclejs,cyclejs/cyclejs,staltz/cycle,staltz/cycle,ntilwalli/cyclejs,cyclejs/cycle-core,cyclejs/cyclejs,usm4n/cyclejs,cyclejs/cycle-core... | time/src/run-virtually.ts | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.