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\n///<reference path=\".d.ts\"/>\n\nimport path = require(\"path\");\nimport util = require(\"util\");\n\nexport class StaticConfig implements IStaticConfig {\n\tpublic PROJECT_FILE_NAME = \".tnsproject\";\n\tpublic CLIENT_NAME = \"native... | typescript | edit | 0 | 1 | apache-2.0 | 3ce1a8ca28fc6fd255b5a7155f6e0c529c4c91e5 | NativeScript/nativescript-cli,tsvetie/nativescript-cli,NathanaelA/nativescript-cli,tsvetie/nativescript-cli,tsvetie/nativescript-cli,NativeScript/nativescript-cli,jbristowe/nativescript-cli,NathanaelA/nativescript-cli,tsvetie/nativescript-cli,NathanaelA/nativescript-cli,NativeScript/nativescript-cli,e2l3n/nativescript-... | lib/config.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { addGraphQLMutation, addGraphQLResolvers } from './vulcan-lib';\nimport Users from '../lib/collections/users/collection';\nimport { updateMutator } from './vulcan-lib/mutators';\nimport * as _ from 'underscore';\n\naddGraphQLMut... | typescript | edit | 0 | 2 | mit | c0362b7a8f67d8d1153ec27e84a2f1b6aef43344 | Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2 | packages/lesswrong/server/bookmarkMutation.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {Component} from 'angular2/core';\nimport {SvgIconComponent} from './svg-icon.component';\n\n@Component({\n\tselector: 'demo-app',\n\tdirectives: [ SvgIconComponent ],\n\ttemplate: `\n\t\t<div style=\"width:100px;\">\n\t\t\t<div ... | typescript | edit | 0 | 0 | mit | 212ed488a1c0c156d41882e31ef7766e974a45bc | czeckd/angular-svg-icon,czeckd/angular2-svg-icon,czeckd/angular2-svg-icon,czeckd/angular-svg-icon,czeckd/angular-svg-icon,czeckd/angular2-svg-icon | app/demo-app.component.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {Injectable} from 'angular2/angular2';\n\nlet languages = require('app/lib/languages');\n\n@Injectable()\nexport class Settings {\n private language: {key: string, value: string};\n private availableLanguages: Array<{key: strin... | typescript | edit | 0 | 2 | mit | dd2cdba95e842fe044eac1356f0b0d0916cc621a | dotcs/cueonthespot-web,dotcs/cueonthespot-web,dotcs/cueonthespot-web | src/app/services/settings.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport {\n TransitionEvent,\n TimelineType,\n IAbstractTransitionControllerOptions,\n ICreateTimelineOptions,\n} from 'transition-controller';\n\n// Export util classes\nexport { default as FlowManager } from './lib/util/FlowManager... | typescript | edit | 0 | 0 | mit | 9074c44233aa4fa506f855a4367d38baadecc644 | larsvanbraam/vue-transition-component,larsvanbraam/vue-transition-component,larsvanbraam/vue-transition-component | src/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { types, unprotect } from \"../src\"\nimport { test } from \"ava\"\n\ntest(\"should support enums\", t => {\n const TrafficLight = types.model({\n color: types.enumeration(\"Color\", [\"Red\", \"Orange\", \"Green\"])\n ... | typescript | edit | 0 | 2 | mit | 48954be484e41a6720fe4bdf139da4d3d292fd21 | mobxjs/mobx-state-tree,mweststrate/mobx-state-tree,mobxjs/mobx-state-tree,mweststrate/mobx-state-tree,mobxjs/mobx-state-tree,mobxjs/mobx-state-tree | test/enum.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {Inject, Injectable, PlatformContext, PlatformHandler} from \"@tsed/common\";\nimport {Logger} from \"@tsed/logger\";\nimport {AsyncLocalStorage} from \"async_hooks\";\n\n@Injectable()\nexport class PlatformAsyncHookContext {\n ... | typescript | edit | 0 | 2 | mit | 2e609094a51937b588a16b8b131e214f28abf85e | Romakita/ts-express-decorators,Romakita/ts-express-decorators,Romakita/ts-express-decorators,Romakita/ts-express-decorators | packages/async-hook-context/src/services/PlatformAsyncHookContext.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Injectable } from '@angular/core';\nimport { Http, Response, RequestOptions, Headers } from '@angular/http';\nimport { Observable } from 'rxjs/Observable';\nimport 'rxjs/add/operator/map';\nimport 'rxjs/add/operator/toPromise';... | typescript | edit | 0 | 2 | mit | 5a50e547ad465c0f340cb029a5e4ed0ddb9594fb | Bronkoknorb/hm-aquarium,Bronkoknorb/hm-aquarium,Bronkoknorb/hm-aquarium,Bronkoknorb/hm-aquarium | aquarium-web/src/app/api.service.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// Type definitions for htmlbars-inline-precompile 1.0\n// Project: ember-cli-htmlbars-inline-precompile\n// Definitions by: Chris Krycho <https://github.com/chriskrycho>\n// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyp... | typescript | edit | 0 | 1 | mit | b102312ac99faed18dde95f5b5cca898625398d4 | benishouga/DefinitelyTyped,ashwinr/DefinitelyTyped,georgemarshall/DefinitelyTyped,rolandzwaga/DefinitelyTyped,AgentME/DefinitelyTyped,zuzusik/DefinitelyTyped,nycdotnet/DefinitelyTyped,dsebastien/DefinitelyTyped,AbraaoAlves/DefinitelyTyped,arusakov/DefinitelyTyped,rolandzwaga/DefinitelyTyped,aciccarello/DefinitelyTyped,... | types/htmlbars-inline-precompile/index.d.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Component, Input, Output, EventEmitter, OnChanges } from '@angular/core';\nimport { Element } from './element';\n\n@Component({\n moduleId: module.id,\n selector: 'pt-element',\n templateUrl: 'element.component.html',\n ... | typescript | edit | 0 | 2 | mit | c7f210ff7023d17b788b4fc408878544c94bc99e | joyceky/interactive-periodic-table,joyceky/interactive-periodic-table,joyceky/interactive-periodic-table | app/elements/element.component.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport command = require(\"./lib/command\");\nimport common = require(\"./lib/common\");\nimport errHandler = require(\"./lib/errorhandler\");\nimport loader = require(\"./lib/loader\");\nimport path = require(\"path\");\n\nfunction pat... | typescript | edit | 0 | 5 | mit | 0af86d7309ebc2914564829c8beb02112d0acc0e | Microsoft/tfs-cli,grawcho/tfs-cli,grawcho/tfs-cli,Microsoft/tfs-cli,grawcho/tfs-cli | app/app.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/// <reference path=\"../core/model\" />\n\nnamespace YJMCNT {\n\n export interface CountersSchema {\n id: string,\n value: number,\n defaltValue: number,\n }\n\n /**\n * Counter\n */\n export cl... | typescript | edit | 0 | 2 | mit | 1e46a53375e13b73042a5a7796f4204f40858a17 | yajamon/chrome-ext-counter,yajamon/chrome-ext-counter,yajamon/chrome-ext-counter | src/ts/model/countersStore.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { useEffect } from 'react';\nimport { useSessionQueryName } from '../stores/editor-store';\n\n/**\n * This component isolates the work of updating the document title on query name changes.\n * This is a component to prevent the m... | typescript | edit | 0 | 3 | mit | e3296fbb4c729f61f1a1394ea839412b83cd7269 | rickbergfalk/sqlpad,rickbergfalk/sqlpad,rickbergfalk/sqlpad | client/src/queryEditor/DocumentTitle.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/// <reference path=\"./connect-flash.d.ts\" />\n\nimport express = require('express');\nimport flash = require('connect-flash');\n\nvar app = express();\n\napp.use(flash());\napp.use(flash({\n unsafe: false\n}));\n\napp.use(function... | typescript | edit | 0 | 1 | mit | 88a59afc31807fac8a09f8edf89b31b22161ab96 | dpsthree/DefinitelyTyped,AGBrown/DefinitelyTyped-ABContrib,GregOnNet/DefinitelyTyped,ajtowf/DefinitelyTyped,Karabur/DefinitelyTyped,forumone/DefinitelyTyped,Deathspike/DefinitelyTyped,billccn/DefinitelyTyped,donnut/DefinitelyTyped,scriby/DefinitelyTyped,gregoryagu/DefinitelyTyped,brainded/DefinitelyTyped,abmohan/Defini... | connect-flash/connect-flash-tests.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport \"reflect-metadata\";\nimport {createTestingConnections, closeTestingConnections, reloadTestingDatabases} from \"../../../utils/test-utils\";\nimport {Connection} from \"../../../../src/connection/Connection\";\n\ndescribe(\"migr... | typescript | edit | 0 | 1 | mit | 468522f07b6b465fb54c4d718f7892e1c6988875 | typeorm/typeorm,typeorm/typeorm,typeorm/typeorm,gintsgints/typeorm,gintsgints/typeorm | test/functional/migrations/show-command/command.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport mergeUint8Arrays from '@proton/utils/mergeUint8Arrays';\n\nconst IV_LENGTH = 16;\nconst ALGORITHM = 'AES-GCM';\n\nexport const getKey = (key: Uint8Array, keyUsage: KeyUsage[] = ['decrypt', 'encrypt']) => {\n return window.cryp... | typescript | edit | 0 | 1 | mit | c05248057e9cbdc48382ecb58ec38e600d178673 | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | packages/shared/lib/authentication/cryptoHelper.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n\nimport express = require('express');\nimport path = require('path');\nimport fs = require('fs');\nimport edge = require('edge');\n\n\nconst app = require('../application');\n\n\n\nconst createClientEdge = edge.func(function () {/*\n\t... | typescript | edit | 0 | 2 | mit | 75b5819d73266e9efbc1d18e2368062900679b66 | RobertoMSousa/node-api-edge,RobertoMSousa/node-api-edge | server/src/client/client-controller.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { expect } from \"chai\";\nimport sinon from \"sinon\";\nimport { ScopeSet } from \"../src/ScopeSet\";\n\ndescribe(\"ScopeSet.ts Unit Tests\", () => {\n\n it(\"tests trimAndConvertArrayToLowerCase\", () => {\n const sco... | typescript | edit | 0 | 1 | mit | 17fdb693a1eae0058f56eb5116dade5eca3d4b44 | AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication... | lib/msal-core/test/ScopeSet.spec.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { expect } from 'chai';\nimport { unitAfterHelper, unitBeforeHelper } from '../helpers/unit';\n\ndescribe('logger', function() {\n before(unitBeforeHelper);\n after(unitAfterHelper);\n\n it('should have a test which runs', fun... | typescript | edit | 0 | 1 | mit | eae74da28d31bbbceca2e3dfcdfd8c9788bf6683 | martindale/bitcore,bitpay/bitcore,martindale/bitcore,bitpay/bitcore,bitpay/bitcore,bitpay/bitcore,martindale/bitcore,martindale/bitcore | packages/bitcore-node/test/unit/logger.spec.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Immutable } from 'immer';\nimport games, { GameState } from './game';\nimport gameModels, { GameModelState } from './gameModel';\nimport global, { GlobalState } from './globalState';\nimport pages, { PageState } from './pageSta... | typescript | edit | 0 | 0 | mit | 5a5c3ab58977e0945004dbc7c148a346da4423f8 | Heigvd/Wegas,Heigvd/Wegas,Heigvd/Wegas,Heigvd/Wegas,Heigvd/Wegas | wegas-app/src/main/webapp/2/src/data/Reducer/reducers.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from 'react';\n\nimport { Table, TableBody, TableRow, TableRowColumn } from 'material-ui';\n\nimport { formatDateFull } from '../dates';\nimport { Reading } from '../model';\n\nexport interface ViewProps {\n data: R... | typescript | edit | null | null | mit | ce79e2875ddc6a21adcab7f1df3e132d7c56be0e | mthmulders/hyperion-web,mthmulders/hyperion-web,mthmulders/hyperion-web | app/scripts/history/view.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 build from './build';\nimport * as parseArgs from 'minimist';\n\nfor (let arg of parseArgs(process.argv.slice(2))._) {\n console.log(build(fs.readFileSync(arg, {encoding:'utf8'})));\n}\n\n```\n\nApply ... | typescript | edit | 0 | 0 | mit | 3245edf9ea36f36d6573c6f35dbb0fa3686c235e | mhansen/hledger-vscode | tests/main.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type * as Common from '../../../core/common/common.js';\nim... | typescript | edit | 0 | 1 | bsd-3-clause | 4a8d4677319d3e65a2bf4435d7e15790faed5548 | ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend | front_end/ui/components/helpers/component-server-setup.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport React from 'react';\nimport { Flex } from '../../components/Flex';\nimport Alert from '../../components/Alert';\n\ninterface ErrorBoundaryState {\n\terror: any;\n}\n\ninterface ErrorBoundaryProps {\n\tgetErrorDisplay?: (error: an... | typescript | edit | null | null | mit | 66c9f729592c011ef59d1529a73470cabf36c4a4 | resin-io-modules/resin-components,resin-io-modules/resin-components,resin-io-modules/resin-components | src/internal/ErrorBoundary/index.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Dexie } from 'src/search/types'\n\nexport interface Migrations {\n [storageKey: string]: (db: Dexie) => Promise<void>\n}\n\nexport const migrations: Migrations = {\n /**\n * If lastEdited is undefined, then set it to ... | typescript | edit | 0 | 3 | mit | 5cc1c7d5121c05ae464f585eadf59212743683d2 | WorldBrain/WebMemex,WorldBrain/WebMemex | src/background-script/quick-and-dirty-migrations.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { HttpHeaders } from '@angular/common/http';\n\ninterface ItemsResponse {\n name: string;\n string: string;\n}\n\n@Injectable()\ne... | typescript | edit | 0 | 1 | mit | b1ff1b71e5358cef21162f89f5ab3e6b25b4f574 | KeJSaR/artezian-info-web,KeJSaR/artezian-info-web,KeJSaR/artezian-info-web,KeJSaR/artezian-info-web | src/app/data.service.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// Copyright (c) Rotorz Limited. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root.\n\n\nimport glob = require(\"glob\");\nimport {Observable} from \"rxjs\";\n\nimport {Environment} from \"../... | typescript | edit | 0 | 1 | mit | 6100fc175410ba512d81e05c3b9993148bf94b1f | webreed/webreed-core,webreed/webreed-core | src/behaviors/getSourceContentRelativePaths.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nvar _ = require(\"lodash\");\n\nvar CreateClass = function(initFunction, memberMap) {\n _.forOwn(memberMap, function(value, key) {\n initFunction.prototype[key] = value;\n });\n return initFunction;\n}\n\nvar CreateSubClass = func... | typescript | edit | 0 | 3 | mit | 0ddbd18710a9228ba3a87a3525166c7bd62a948b | severn-everett/node_university | lib/util/class_creator.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as XrmMock from \"../xrm-mock/index\";\nimport Attribute from \"./attribute\";\nimport Context from \"./context\";\nimport Control from \"./control\";\nimport Form from \"./form\";\nimport Ui from \"./ui\";\nimport WebApi from ... | typescript | edit | 0 | 2 | mit | c1a8f5411121ef21039c4fbede7e624b06a560f0 | camelCaseDave/xrm-mock,camelCaseDave/xrm-mock | src/xrm-mock-generator/xrm-mock-generator.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { FC, createElement as h } from 'react';\nimport { boolean, select, withKnobs } from \"@storybook/addon-knobs\";\nimport { BrowserRouter as Router } from 'react-router-dom';\n\nconst Root: FC<any> = props => (\n <div id=\"story-... | typescript | edit | null | null | mit | 1c8cbd7b4a55b191122ad28409c346b9357688bc | eliothill/home-office-digital-patterns,eliothill/home-office-digital-patterns,eliothill/home-office-digital-patterns | .storybook/decorators.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport {describe, it} from 'mocha';\n\nimport {getBrowserAndPages}... | typescript | edit | 0 | 1 | bsd-3-clause | c7172a2a6808e65cf26fb67f63f88523f03be901 | ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend | test/e2e/animations/animations_test.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Injectable } from 'angular2/core';\nimport { Http, Response } from 'angular2/http';\n\n//Grab everything with import 'rxjs/Rx';\nimport {Observable} from 'rxjs/Observable';\nimport 'rxjs/add/operator/map'; \nimport 'rxjs/add/op... | typescript | edit | 0 | 2 | mit | 6b27b37569645bcdf5ff2346ca92bea103ba6a8d | m-williams/Angular2-JumpStart,m-williams/Angular2-JumpStart,DanWahlin/Angular-JumpStart,born2net/ng2-minimal,DanWahlin/Angular2-JumpStart,DanWahlin/Angular2-JumpStart,m-williams/Angular2-JumpStart,DanWahlin/Angular2-JumpStart,DanWahlin/Angular-JumpStart,born2net/ng2-minimal,DanWahlin/Angular-JumpStart,born2net/ng2-mini... | src/app/shared/services/data.service.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as filenamify from 'filenamify';\n\nfilenamify('<foo/bar>');\n// => 'foo!bar'\n\nfilenamify('foo:\"bar\"', {replacement: '🐴'});\n// => 'foo🐴bar'\n\nfilenamify.path('/some/!path');\n// => '/some/path'\n\n```\n\nApply this chan... | typescript | edit | 0 | 0 | mit | d7ddf2018c7f1e1f43f1d65ea89368a6a852aa2f | georgemarshall/DefinitelyTyped,mcliment/DefinitelyTyped,zuzusik/DefinitelyTyped,AgentME/DefinitelyTyped,rolandzwaga/DefinitelyTyped,AgentME/DefinitelyTyped,borisyankov/DefinitelyTyped,one-pieces/DefinitelyTyped,jimthedev/DefinitelyTyped,magny/DefinitelyTyped,aciccarello/DefinitelyTyped,chrootsu/DefinitelyTyped,AbraaoAl... | types/filenamify/filenamify-tests.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport gql from 'graphql-tag'\n\nimport identifiableCellFragment from 'v2/components/Cell/components/Identifiable/fragments/identifiableCell'\n\nexport const channelFollowersQuery = gql`\n query ChannelFollowers($id: ID!, $page: Int, $... | typescript | edit | 0 | 0 | mit | a9ce6c5f7e7e916e6197927b8bb0b881c2a610e8 | aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell | src/v2/components/ChannelFollowers/queries/channelFollowers.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport mongoose from \"mongoose\";\nimport {isProd} from \"../server/util\"\nimport { IUser, User, LoginType } from \"../server/models/User\"\nimport bcrypt from \"bcryptjs\"\n\nexport async function clearDatabase() {\n if (isProd()) {... | typescript | edit | 0 | 3 | mit | 72c6db1c08777bafe028b78e9a00cd5370fc6486 | Majavapaja/Mursushakki,Majavapaja/Mursushakki,Majavapaja/Mursushakki,Majavapaja/Mursushakki,Majavapaja/Mursushakki,Majavapaja/Mursushakki | test/browser/MongoUtil.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { registerFragment } from '../../vulcan-lib';\n\nregisterFragment(`\n fragment TagBasicInfo on Tag {\n _id\n name\n slug\n oldSlugs\n core\n postCount\n deleted\n adminOnly\n defaultOrder\n suggeste... | typescript | edit | 0 | 0 | mit | 1a06e3df8f2375a6d274613d896f8f6ad29b4570 | Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2 | packages/lesswrong/lib/collections/tags/fragments.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { PathInfo } from './interfaces';\n\nconst PATH_INFOS: PathInfo[] = [\n {\n path: /^\\/$/,\n label: 'Home'\n },\n {\n path: /^\\/create-machine$/,\n label: 'Create Machine'\n },\n {\n path: /^\\/machines$/,\n ... | typescript | edit | 0 | 1 | apache-2.0 | 23e8d93c0ea28d5d8913c860c7a9293404b2ea01 | lawrence0819/neptune-front,lawrence0819/neptune-front | src/constants/path-info.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport xs from 'xstream';\n\nexport interface Actions {\n currencyChangeAction$: xs<string>;\n}\n\nexport default function intent(domSource): Actions {\n const currencyChangeAction$: xs<string> = domSource\n .select('.currency-sele... | typescript | edit | 0 | 1 | mit | 5e77c43f29c3d90055297610099028e73ede11fc | olpeh/meeting-price-calculator,olpeh/meeting-price-calculator,olpeh/meeting-price-calculator,olpeh/meeting-price-calculator | src/components/controls/intent.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Injectable } from '@angular/core'\nimport { Http, Response } from '@angular/http';\nimport { Observable } from 'rxjs/Rx';\n\nimport { NativeStorage } from 'ionic-native';\n\n@Injectable()\nexport class TimeService {\n privat... | typescript | edit | 0 | 1 | apache-2.0 | 6085a4094a945e845f540605e21a9ac894be22bd | sth-larp/deus-mobile,sth-larp/deus-mobile,sth-larp/deus-mobile,sth-larp/deus-mobile,sth-larp/deus-mobile | src/time/time.service.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nmodule Manifesto {\n export class ManifestResource extends JSONLDResource implements IManifestResource {\n options: IManifestoOptions;\n\n constructor(jsonld: any, options: IManifestoOptions) {\n super(jsonld... | typescript | edit | 0 | 3 | mit | 5ca1c5dd0f963e447ec0c0b591adb4394b793e12 | viewdir/manifesto,viewdir/manifesto | src/ManifestResource.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// Type definitions for koa-static v2.x\n// Project: https://github.com/koajs/static\n// Definitions by: Jerry Chin <https://github.com/hellopao/>\n// Definitions: https://github.com/hellopao/DefinitelyTyped\n\n/* =================== US... | typescript | edit | 0 | 1 | mit | d765fdbf2517c151c69b9cb5afd86eff149cbce6 | aciccarello/DefinitelyTyped,nainslie/DefinitelyTyped,slavomirvojacek/adbrain-typescript-definitions,yuit/DefinitelyTyped,arma-gast/DefinitelyTyped,psnider/DefinitelyTyped,mcrawshaw/DefinitelyTyped,schmuli/DefinitelyTyped,xStrom/DefinitelyTyped,progre/DefinitelyTyped,georgemarshall/DefinitelyTyped,abbasmhd/DefinitelyTyp... | koa-static/koa-static.d.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as path from 'path';\nimport * as fs from 'fs';\nimport * as chardet from 'chardet';\nimport * as iconv from 'iconv-lite';\n\nconst isFile = (path: string) => fs.lstatSync(path).isFile();\n\nexport const parse = (filePath: stri... | typescript | edit | 0 | 6 | mit | a3a9c9ece22ed9acdd5457d4858cdce864c91e6f | KeitIG/museeks,KeitIG/museeks,KeitIG/museeks | src/ui/utils/utils-m3u.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { ComponentFixture } from '@angular/core/testing';\nimport { By } from '@angular/platform-browser';\n\nexport function selectElement<T> (fixture: ComponentFixture<T>, locator: string) {\n return fixture.debugElement.query(By.css... | typescript | edit | 0 | 0 | bsd-3-clause | baf18cce6552a3baf773efdb12697fc3f82c1881 | cumulous/web,cumulous/web,cumulous/web,cumulous/web | src/testing/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { watch, task } from 'gulp';\nimport { join } from 'path';\n\nimport { SRC, DIST, DEMO_DIST } from './constants';\nimport compileTs from './tasks/compileTs';\nimport clean from './tasks/clean';\n\nconst runSequence = require('run... | typescript | edit | 0 | 1 | mit | d37a6a7fffe24727fd5f8a3184aaff9c35ba304c | crisbeto/angular-svg-round-progressbar,crisbeto/angular-svg-round-progressbar | gulp/module.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport React from \"react\"\nimport { observer } from \"mobx-react\"\nimport { action } from \"mobx\"\n\nexport interface RadioOption {\n label: string\n checked: boolean\n onChange: (checked: boolean) => void\n}\n\n@observer\n... | typescript | edit | null | null | mit | fd2324be6a55dc5a72e800b5807d30e0051a2b0b | owid/owid-grapher,OurWorldInData/owid-grapher,owid/owid-grapher,owid/owid-grapher,OurWorldInData/owid-grapher,OurWorldInData/owid-grapher,owid/owid-grapher,owid/owid-grapher,OurWorldInData/owid-grapher,OurWorldInData/owid-grapher | charts/covidDataExplorer/CovidRadioControl.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { RehydrateBuilder } from '@glimmer/runtime';\nimport { SimpleNode } from '@simple-dom/interface';\nimport { Environment, Cursor, ElementBuilder } from '@glimmer/interfaces';\n\nexport class DebugRehydrationBuilder extends Rehydr... | typescript | edit | 0 | 5 | mit | c5c7e9e8a1e35cf2d692f3cb30b7f6e45d5a5e15 | glimmerjs/glimmer-vm,tildeio/glimmer,tildeio/glimmer,glimmerjs/glimmer-vm,glimmerjs/glimmer-vm,tildeio/glimmer | packages/@glimmer/integration-tests/lib/modes/rehydration/builder.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport default class IndicatorPresenter {\n indicate(enabled: boolean): Promise<void> {\n let path = enabled\n ? 'resources/enabled_32x32.png'\n : 'resources/disabled_32x32.png';\n return browser.browserAction.setIcon({... | typescript | edit | 0 | 3 | mit | f60961947fc9471024081c3c76f940b864336e5f | ueokande/vim-vixen,ueokande/vim-vixen,ueokande/vim-vixen | src/background/presenters/IndicatorPresenter.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Reducer } from 'redux';\nimport { ActionType, getType } from 'typesafe-actions';\nimport * as actions from './basic-actions';\n\nexport interface FarmingState {\n // The actively farming store, if any\n readonly storeId?: str... | typescript | edit | 0 | 5 | mit | 90a127d528bd09466de676126ca088cf0646b821 | delphiactual/DIM,DestinyItemManager/DIM,delphiactual/DIM,delphiactual/DIM,delphiactual/DIM,DestinyItemManager/DIM,DestinyItemManager/DIM,DestinyItemManager/DIM | src/app/farming/reducer.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// tslint:disable:interface-name\n// tslint:disable:no-empty-interface\n\ninterface IWebpackRequire { context: any; }\ninterface NodeRequire extends IWebpackRequire {}\ndeclare var require: NodeRequire;\n\nconst srcContext = require.c... | typescript | edit | 0 | 0 | mit | 0b9f9362b94b52130e9a9f09971c4516fe503beb | jp7677/hellocoreclr,jp7677/hellocoreclr,jp7677/hellocoreclr,jp7677/hellocoreclr | ui/test/tests-index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {UserSchema, IUserModel} from \"../../src/server/data/User\";\nimport {GameSchema, IGameModel} from \"../../src/server/data/GameModel\";\nimport mongoose from \"mongoose\";\nimport assert from \"assert\";\n\nconst connectionStrin... | typescript | edit | 0 | 1 | mit | 4876c6722a3d4167f0e4d8d05876fbcaf5960e6a | Majavapaja/Mursushakki,Majavapaja/Mursushakki,Majavapaja/Mursushakki,Majavapaja/Mursushakki,Majavapaja/Mursushakki,Majavapaja/Mursushakki | test/data/User.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.9.0',\n RELEASEVERSION: '0... | typescript | edit | 0 | 0 | mit | 60ad193ffd7f5dcc8309cca6553a79dcf197d17e | nie-ine/raeber-website,nie-ine/raeber-website,nie-ine/raeber-website,nie-ine/raeber-website | tools/env/base.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Sources, Sinks, HIGH, LOW, run, byte, createSinks } from '../../../src/boards/arduino-uno';\n\nfunction toggle(value: byte): byte {\n return value == HIGH ? LOW : HIGH;\n}\n\nfunction blink(arduino: Sources): Sinks {\n const ... | typescript | edit | 0 | 2 | mit | a5608af907a1b9d92bc23f69cecc8c191c862738 | artfuldev/RIoT | arduino-uno/tests/blink.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport areIntlLocalesSupported from 'intl-locales-supported'\n\nexport const importIntlPolyfill = async () => {\n const IntlPolyfill = await import('intl')\n global.Intl = IntlPolyfill.default\n}\n\nexport const checkForIntlPolyfill =... | typescript | edit | 0 | 4 | mit | 278b4586508aebd728b027e17b526bbe29444b06 | pkarw/vue-storefront,DivanteLtd/vue-storefront,pkarw/vue-storefront,DivanteLtd/vue-storefront,DivanteLtd/vue-storefront,pkarw/vue-storefront,DivanteLtd/vue-storefront,pkarw/vue-storefront | core/i18n/intl.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Component, ViewEncapsulation } from \"@angular/core\";\nimport { AccountService } from \"./auth/account.service\";\nimport { Router } from \"@angular/router\";\n\n\n/**\n * Main component for the application\n */\n@Component({\... | typescript | edit | 0 | 1 | mit | 55240c9e6ae7cc3eb421fd361ac2502ef9c90034 | BenjaminSchubert/web-polls,BenjaminSchubert/web-polls,BenjaminSchubert/web-polls,BenjaminSchubert/web-polls,BenjaminSchubert/web-polls | frontend/src/webpolls.component.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nmodule languages/Java-1.5/expressions/types/bitwise-logical\n\nimports\n\t\n\tinclude/Java\n\tlib/task/-\n\tlib/types/-\n\tlib/properties/-\n\tlib/relations/-\n\t\n\tlanguages/Java-1.5/types/types/primitives\n\tlanguages/Java-1.5/types/... | typescript | edit | null | null | apache-2.0 | 2edee8cf9e3320ecb8a486dda36bdc18b795cbe6 | metaborg/java-front,metaborg/java-front | java-front/languages/Java-1.5/expressions/types/bitwise-logical.ts | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Component, Input, Output, OnInit, EventEmitter } from '@angular/core';\nimport { AcStars } from './stars';\n\nimport { ToastService } from '../../services/shared/toast.service';\nimport { AuthService } from '../../services/auth... | typescript | edit | 0 | 3 | mit | f1e4a72edde1536ea82791c06b3a3850609b85ff | ZmeiDev/stormtroopers,ZmeiDev/stormtroopers,ZmeiDev/stormtroopers | public/app/shared/stars/auth-stars.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport * from './<%- ngModuleFilename %>';\n\n// all components that will be codegen'd need to be exported for AOT to work\nexport * from './helloWorld.component';\n```\n\nApply this change: Remove .ts from module filename import"
},
... | typescript | edit | null | null | mit | cf4e14adace565fb38c9fea4630ddf2a687fb3b2 | mattlewis92/generator-angular-library,mattlewis92/generator-angular-library,mattlewis92/generator-angular-library | generators/app/templates/src/index.ts | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { BrowserModule } from '@angular/platform-browser';\nimport { PrettyJsonModule } from 'angular2-prettyjson';\nimport { NgModule } from '@angular/core';\nimport { AppComponent } from './app.component';\nimport { LinkedInSdkModule ... | typescript | edit | 0 | 0 | mit | 51885ae979f961adc174a621e655a35069224171 | evodeck/angular-linkedin-sdk,evodeck/angular-linkedin-sdk | demo/src/app/app.module.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Sources, Sinks, HIGH, LOW, run, byte, createSinks } from '../../../src/boards/arduino-uno';\n\nfunction toggle(value: byte): byte {\n return value == HIGH ? LOW : HIGH;\n}\n\nfunction blink(arduino: Sources): Sinks {\n const ... | typescript | edit | 0 | 2 | mit | fb778d8acc5d2985b1495e264c12490abe6bfb72 | artfuldev/RIoT | ts/tests/boards/arduino-uno/blink.ts | rejected_duplicate | Near-duplicate of sample 112907 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {Component, EventEmitter} from 'angular2/core';\nimport {NavbarTab} from './navbartab';\n\n@Component({\n selector: 'navbar',\n template: `<nav class=\"navbar\">\n <div class=\"nav\">\n <a *ngFor=\"#tab of tabs\"\n ... | typescript | edit | 0 | 1 | mit | f6a0a080f46f3b6d159b565b45458c5e066cc63d | rzhw/redue,rzhw/redue,rzhw/redue | app/navbar.component.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { AlphabetsData } from '@/types/alphabets'\nimport { Sentence } from '@/types/phrases'\n\n/*\n * State\n * The Vuex store state\n */\n\nexport type State = {\n text: string\n alphabets: AlphabetsData\n phrases: Sentence[]\n s... | typescript | edit | 0 | 0 | mit | 48670678be9a01b7bf8451b210af9e43bef5b05e | rossjrw/gallifreyo,rossjrw/gallifreyo,rossjrw/gallifreyo | src/types/state.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {Injectable} from '@angular/core';\nimport {HttpClient} from \"@angular/common/http\";\nimport {Observable} from \"rxjs/index\";\nimport {IPage} from \"../model/page.model\";\n\n@Injectable()\nexport class ApplicationDashboardSer... | typescript | edit | 0 | 2 | apache-2.0 | ac6d7e02ebc68c8769d7ad8a31463ff457554d9e | IteraSpeed/OpenSpeedMonitor,iteratec/OpenSpeedMonitor,IteraSpeed/OpenSpeedMonitor,iteratec/OpenSpeedMonitor,IteraSpeed/OpenSpeedMonitor,iteratec/OpenSpeedMonitor,iteratec/OpenSpeedMonitor,iteratec/OpenSpeedMonitor | frontend/src/app/application-dashboard/service/application-dashboard.service.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {Directive, ElementRef, DoCheck} from '@angular/core';\n\n@Directive({selector: '[tumblrEmbeddedMedia]'})\nexport class TumblrEmbeddedMediaDirective implements DoCheck {\n private el: ElementRef;\n\n constructor(el: Element... | typescript | edit | 0 | 8 | mit | 1b9360df5bb626c1d37e5144ef83d9da9c59a345 | zoehneto/tumblr-reader,zoehneto/tumblr-reader,zoehneto/tumblr-reader | src/app/attribute-directives/tumblr-embedded-media.directive.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport React from 'react';\nimport { findElementPaths, getExpectedElementAtPath } from './nodeTree';\n\ntype ExtendedComponentClass = React.ComponentClass & {\n cosmosCapture?: boolean;\n};\n\nexport function findRelevantElementPaths(n... | typescript | edit | 0 | 4 | mit | 910a0b016ae596f3a982af1140d39895b6467f32 | skidding/react-cosmos,skidding/react-cosmos,skidding/cosmos,react-cosmos/react-cosmos,skidding/cosmos,react-cosmos/react-cosmos,react-cosmos/react-cosmos | packages/react-cosmos-shared2/src/FixtureLoader/FixtureCapture/shared/findRelevantElementPaths.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport IToken from './IToken'\nimport { GherkinException } from './Errors'\n\nexport class UnexpectedTokenException extends GherkinException {\n public static create<TokenType>(token: IToken<TokenType>, expectedTokenTypes: string[]) {\... | typescript | edit | 0 | 1 | mit | d82850d7e1672997e0e886e6abf08ab2c7b8cee6 | cucumber/gherkin-javascript,cucumber/gherkin-javascript | src/TokenExceptions.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Browser } from 'mugshot';\n\n/**\n * API adapter for WebdriverIO to make working with it saner.\n */\nexport default class WebdriverIOAdapter implements Browser {\n private browser: WebDriver.ClientAsync & WebdriverIOAsync.Bro... | typescript | edit | 0 | 1 | mit | c7608162a4dfc500c04475cf45583f0e358d0037 | uberVU/mugshot,uberVU/mugshot | packages/webdriverio/src/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { async, ComponentFixture, TestBed } from '@angular/core/testing';\n\nimport { FormGroupComponent } from './form-group-component';\n\ndescribe('FormGroupComponent', () => {\n let component: FormGroupComponent;\n let fixture: Co... | typescript | edit | 0 | 1 | mit | acbd8bcdef198be98c248c90868233dcf02e8ab7 | third774/ng-bootstrap-form-validation,third774/ng-bootstrap-form-validation,third774/ng-bootstrap-form-validation | src/Components/form-group-component/form-group-component.spec.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport FileResource from \"../../../../../resources/fileresource\";\nimport SessionDataService from \"../../sessiondata.service\";\n\nclass TextVisualizationController {\n\n static $inject = ['FileResource', '$scope', 'SessionDataSer... | typescript | edit | 0 | 1 | mit | 0a6d22a4c7840f7a7ffcd3cfbeacd886e77eb9d9 | chipster/chipster-web,chipster/chipster-web,chipster/chipster-web | app/views/sessions/session/visualization/textvisualization/textvisualization.component.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/// <reference path=\"../../app.d.ts\" />\n'use strict';\n\nangular.module('<%= appname %>')\n .directive('<%= camelName %>', function () {\n return {\n restrict: 'EA',\n <% if (needTemplate) { %>temp... | typescript | edit | null | null | bsd-3-clause | 5c920eb71b1f53bbc43c6820edd51e29ebb0e656 | NovaeWorkshop/Nova,NovaeWorkshop/Nova,NovaeWorkshop/Nova | directive/templates/directive.ts | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/**\n * angular2-cookie-law\n *\n * Copyright 2016-2018, @andreasonny83, All rights reserved.\n *\n * @author: @andreasonny83 <<EMAIL>>\n */\n\nimport { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexpo... | typescript | edit | 0 | 1 | mit | b830f908ae488308596a9dd50d42e0275cab96fc | andreasonny83/angular2-cookie-law,andreasonny83/angular2-cookie-law,andreasonny83/angular2-cookie-law | projects/angular2-cookie-law/src/lib/angular2-cookie-law.service.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nexport class Urls {\n public static image(key: string, size: number): string {\n return `https://d1cuyjsrcm0gby.cloudfront.net/${key}/thumb-${size}.jpg?origin=mapillary.webgl`;\n }\n\n public static mesh(key: string): st... | typescript | edit | 0 | 1 | mit | 2e0c128ba193c14bd61a2ec415eb69293e5373ae | mapillary/mapillary-js,mapillary/mapillary-js | src/utils/Urls.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { expect } from 'chai'\nimport Up from '../../../index'\nimport { ImageNode } from '../../../SyntaxNodes/ImageNode'\nimport { DocumentNode } from '../../../SyntaxNodes/DocumentNode'\n\n\ndescribe('The term that represents image c... | typescript | edit | 0 | 1 | mit | e315e8aa4ce8acc3d4173f8b43f034b0e802c731 | start/up,start/up | src/Test/Ast/Config/Image.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from \"react\";\nimport {GenerateMarkdownPreview} from \"../types\";\nimport {Simulate} from \"react-dom/test-utils\";\nimport load = Simulate.load;\n\nexport interface ReactMdePreviewProps {\n className?: string;\n... | typescript | edit | null | null | mit | d1cc00981c8641e98bbd30d41c797310d498e0af | andrerpena/react-mde,andrerpena/react-mde,andrerpena/react-mde | src/components/MdePreview.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport chai = require(\"chai\");\nimport { CronParser } from \"../src/cronParser\";\nlet assert = chai.assert;\n\ndescribe(\"CronParser\", function () {\n describe(\"parse\", function () {\n it(\"should parse 5 part cron\", fu... | typescript | edit | 0 | 1 | mit | bc4d08716879e837841a53174448fb9c6178498b | bradyholt/cRonstrue,bradyholt/cRonstrue | test/cronParser.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nclass Convert {\n static baseMIDINum = 69;\n\n // ref:\n // - https://github.com/watilde/beeplay/blob/master/src/modules/nn.js\n static keyToNote(name: string): number {\n var KEYS = [\n \"c\", \"c#\",\n \"d\", \"d#\",\... | typescript | edit | 0 | 1 | mit | 9a3b81daab3fd2ca3134eacc1425b8b42b783865 | kubosho/ano-gakki,kubosho/ano-gakki,kubosho/ano-gakki,kubosho/ano-gakki | src/lib/convert.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\nimport '../style/index.css';\n\nexport * from './actions';\nexport * from './celltools';\nexport * from './default-toolbar';\nexp... | typescript | edit | 0 | 0 | bsd-3-clause | 0950df4cb6f398f4397c265cae92b3751a858b77 | jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab | packages/notebook/src/index.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport createGenerateClassName from \"@material-ui/core/styles/createGenerateClassName\";\nimport initStoryshots from \"@storybook/addon-storyshots\";\nimport { configure, render } from \"enzyme\";\nimport * as Adapter from \"enzyme-ada... | typescript | edit | 0 | 1 | bsd-3-clause | e0aa0ca31e99a406b852ed6686a3c24d64309301 | maferelo/saleor,mociepka/saleor,UITools/saleor,UITools/saleor,mociepka/saleor,mociepka/saleor,UITools/saleor,maferelo/saleor,UITools/saleor,maferelo/saleor,UITools/saleor | saleor/static/dashboard-next/storybook/Stories.test.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { ICAL_ATTENDEE_ROLE, ICAL_ATTENDEE_STATUS } from '../../calendar/constants';\nimport { CachedKey } from '../CachedKey';\nimport { Calendar, CalendarSettings } from './Calendar';\nimport { CalendarEvent } from './Event';\nimport ... | typescript | edit | 0 | 0 | mit | 849f8f306c9ea5b7b4385a9ce2ac2d50ef357300 | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | packages/shared/lib/interfaces/calendar/Invite.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/**\n * @fileoverview They're red, they're white, they're brown,\n * they get that way under-ground...\n *\n * This defines a custom module, which we'll import in main.ts to include in\n * the LIT app.\n */\n\n// tslint:disable:no-new-d... | typescript | edit | 0 | 1 | apache-2.0 | 14f533f5f5f86609233cb37b7d22feb407899f9a | PAIR-code/lit,pair-code/lit,pair-code/lit,pair-code/lit,PAIR-code/lit,pair-code/lit,PAIR-code/lit,PAIR-code/lit,PAIR-code/lit,pair-code/lit | lit_nlp/examples/custom_module/potato.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport React, {PureComponent} from 'react'\n\ninterface Props {\n name: string\n onAddNode: (name: string) => void\n selectedFunc: string\n onSetSelectedFunc: (name: string) => void\n}\n\nexport default class FuncListItem extends Pu... | typescript | edit | null | null | mit | b85a69a7b83a097c2b88e82bbb308bcfc5c1a775 | influxdb/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,nooproblem/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,li-ang/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,nooproblem/influxdb,influxdata/influxdb,nooproblem/influxdb,influxdb/influxd... | ui/src/ifql/components/FuncListItem.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 { BrowserRouter, Redirect, Route } from \"react-router-dom\";\n\nimport SignIn from \"./SignIn\";\nimport Tasks from \"./Tasks\";\n\nexport default class extends React.Component {\n public re... | typescript | edit | null | null | mit | 5e42a253807199e8f0d8af06b08aac53bb0bef15 | raviqqe/code2d,raviqqe/code2d,raviqqe/code2d,raviqqe/code2d | app/src/container/App.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/// <reference path=\"bonziri.impl.ts\" />\r\n//'use strict'\r\n \r\nnamespace Bonziri {\r\n\r\n export function generateScenario(jsonText: string): Scenario {\r\n return Impl.generateScenario(jsonText);\r\n }\r\n\r\n}\r\n\... | typescript | edit | 0 | 2 | mit | 8db66113420dbcf3e2a2d0625e164f628341aa3e | kndysfm/bonziri,kndysfm/bonziri,kndysfm/bonziri,kndysfm/bonziri | src/bonziri.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport gql from 'graphql-tag';\nimport { useQuery } from 'react-apollo';\nimport { getFragment } from '../../lib/vulcan-lib';\n\nexport const useContinueReading = () => {\n // FIXME: For some unclear reason, using a ...fragment in the ... | typescript | edit | 0 | 1 | mit | 175b7bdc43fc8c5363330cc9d5630be4673b2b7a | Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2 | packages/lesswrong/components/recommendations/withContinueReading.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from 'react'\nimport Store from '../store'\nimport Snapshot from './Snapshot'\nimport { observer } from 'mobx-react'\nimport ConsoleInput from './ConsoleInput'\nimport Toolbar from './Toolbar'\n\nfunction Console({ sto... | typescript | edit | null | null | mit | ce4fc223ed0051dabcc3ca6d45079b7f20271962 | evansb/respace,evansb/respace,evansb/respace,respace-js/respace,respace-js/respace | packages/ui-interpreter/src/ui/Console.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { RequestHandler } from 'express'\nimport { create, CreateHost } from './db'\n\nconst handler: RequestHandler = async (req, res) => {\n const hostname = req.body.hostname || ''\n const vanityHostname = req.body.hostname || host... | typescript | edit | 0 | 11 | mit | defe9dce72e8518106ae38eeb782d133fb07f377 | the-concierge/concierge,the-concierge/concierge,the-concierge/concierge | src/api/hosts/create.ts | rejected_complexity | Cyclomatic complexity too high: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n// @types/puppeteer causing a lot of conflicts with @types/node. Removing for now.\n//import puppeteer, { Browser, Page } from 'puppeteer';\nconst puppeteer = require( 'puppeteer' );\n\ndescribe( 'Autolinker.js UMD file in browser', fun... | typescript | edit | 0 | 1 | mit | 5a3b201875e0d7b73e8b707c7aa35052c7692706 | gregjacobs/Autolinker.js,gregjacobs/Autolinker.js,gregjacobs/Autolinker.js,closeio/Autolinker.js,closeio/Autolinker.js,closeio/Autolinker.js,closeio/Autolinker.js,gregjacobs/Autolinker.js | tests-integration/test-browser-umd.spec.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { rgba, lighten, darken } from 'polished';\n\nexport const mkColor = (color: string) => ({ color });\n\n// Passing arguments that can't be converted to RGB such as linear-gradient\n// to library polished's functions such as light... | typescript | edit | 0 | 4 | mit | f9aee6fab8256a3fdba3e66c6a260a169b8f38df | storybooks/react-storybook,storybooks/storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/react-storybook | lib/theming/src/utils.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/* ts-lint:disable:no-unused-variable */\nimport { TestBed, async } from '@angular/core/testing';\nimport { {{ componentName }} } from './{{ selector }}.component';\n\ndescribe('{{ componentName }}', () => {\n beforeEach(() => {\n ... | typescript | edit | null | null | mit | a74f7fabbf3661f3d002c88c51c36e5596834c16 | gonzofish/angular-library-set,gonzofish/angular-librarian,gonzofish/angular-library-set,gonzofish/angular-library-set,gonzofish/angular-librarian,gonzofish/angular-librarian | commands/component/templates/spec.ts | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/**\n * PS custom HTML elements and Preact handling.\n * By Mia and Zarel\n */\nimport preact from 'preact';\nimport render from 'preact-render-to-string';\nimport {Utils} from '../lib';\n\n/** For easy concenation of Preact nodes with ... | typescript | edit | 0 | 0 | mit | 84094b61ee1e204285a1123378698440f622d032 | xfix/Pokemon-Showdown,xfix/Pokemon-Showdown,svivian/Pokemon-Showdown,svivian/Pokemon-Showdown,xfix/Pokemon-Showdown,svivian/Pokemon-Showdown,xfix/Pokemon-Showdown,svivian/Pokemon-Showdown,svivian/Pokemon-Showdown,xfix/Pokemon-Showdown | server/chat-jsx.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport Document, { Head, Main, NextScript, NextDocumentContext } from 'next/document';\nimport * as http from 'http';\n\ntype MyDocumentProps = {\n locale: string;\n localeDataScript: string;\n};\n\nexport default class MyDocument... | typescript | edit | null | null | mit | 0fff23dbe6fdbb9341805ba67fb307ee0bd5e1d0 | krddevdays/krddevdays.ru,krddevdays/krddevdays.ru | pages/_document.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { ApolloClient, InMemoryCache, ApolloLink } from '@apollo/client';\nimport { BatchHttpLink } from '@apollo/client/link/batch-http';\nimport { apolloCacheVoteablePossibleTypes } from '../../../lib/make_voteable';\nimport meteorAcc... | typescript | edit | 0 | 1 | mit | 649348a41d5f64910f8c02633b3e5d36c4b584c0 | Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2 | packages/lesswrong/client/vulcan-lib/apollo-client/apolloClient.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport {ApolloQueryResult} from \"@apollo/client\"\nimport {GetStaticPropsResult} from \"next\"\nimport {Fragment, FC} from \"react\"\n\nimport PostsPayload from \"type/api/PostsPayload\"\n\nimport getApollo from \"lib/graphql/client/ge... | typescript | edit | null | null | mit | c1ca35eac16c733262862856954a395207f7cbad | octet-stream/eri,octet-stream/eri | whisper/pages/index.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Component, OnInit, Input } from '@angular/core';\n\nimport { SharedModule } from '../shared/shared.module';\n\nimport { Player } from '../core/player.model';\nimport { PlayerService } from '../core/player.service';\n\n@Componen... | typescript | edit | 0 | 4 | mit | 0af57639ed8b9b0db032986ec0d8a0ab3cf4c8af | hodossy/darts-scorer,hodossy/darts-scorer,hodossy/darts-scorer | src/app/player-extendable-list/player-extendable-list.component.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nconst FINISH_ZONE_KEY = 'finish-zone';\nimport {Boat} from '../sprites/boat';\n\nexport class GameControll {\n constructor(private game: Phaser.Game) {\n }\n\n public createBoat(x: number, y: number) {\n const boat = new... | typescript | edit | 0 | 2 | mit | 565959190db1a92b7244e3ae204cc7dfc247c77f | bartoszbobin/global-game-jame-2017,bartoszbobin/global-game-jame-2017,bartoszbobin/global-game-jame-2017,bartoszbobin/global-game-jame-2017 | src/app/controlls/game-controll.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { Injectable, Inject } from '@angular/core';\nimport { Action, ScannedActionsSubject } from '@ngrx/store';\nimport { Observable } from 'rxjs/Observable';\nimport { Operator } from 'rxjs/Operator';\nimport { filter } from 'rxjs/op... | typescript | edit | 0 | 1 | mit | 55c13b22c569969d7e8e4482b9882628346944cb | brandonroberts/platform,brandonroberts/platform,brandonroberts/platform,brandonroberts/platform | modules/effects/src/actions.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n'use strict';\r\n\r\nimport * as path from 'path';\r\nimport { workspace, ExtensionContext } from 'vscode';\r\nimport { LanguageClient, LanguageClientOptions, ServerOptions, TransportKind } from 'vscode-languageclient';\r\n\r\nexport fu... | typescript | edit | 0 | 1 | mit | 30084d7c97317747cb42cab0e570b0053deaf439 | sandhje/vscode-phpmd | client/src/client.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport * as React from 'react'\nimport { ForkContributionTarget } from '../../models/workflow-preferences'\nimport { RepositoryWithForkedGitHubRepository } from '../../models/repository'\n\ninterface IForkSettingsDescription {\n readon... | typescript | edit | null | null | mit | e472e1e61f452ac57a04521ae741410cce454198 | artivilla/desktop,say25/desktop,say25/desktop,shiftkey/desktop,desktop/desktop,j-f1/forked-desktop,kactus-io/kactus,desktop/desktop,say25/desktop,shiftkey/desktop,desktop/desktop,j-f1/forked-desktop,j-f1/forked-desktop,artivilla/desktop,kactus-io/kactus,shiftkey/desktop,shiftkey/desktop,artivilla/desktop,artivilla/desk... | app/src/ui/repository-settings/fork-contribution-target-description.tsx | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { ChartConfig, ChartConfigProps } from \"charts/ChartConfig\"\n\nimport * as fixtures from \"./fixtures\"\n\nexport function createConfig(props: Partial<ChartConfigProps>) {\n const config = new ChartConfig(new ChartConfigProp... | typescript | edit | 0 | 1 | mit | 53880b782b5ec6b84d856c7eaadd530d2ebb0498 | OurWorldInData/owid-grapher,owid/owid-grapher,OurWorldInData/owid-grapher,OurWorldInData/owid-grapher,owid/owid-grapher,OurWorldInData/owid-grapher,owid/owid-grapher,owid/owid-grapher,OurWorldInData/owid-grapher,owid/owid-grapher | test/utils.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\n/**\n * DEPRECATED\n *\n * @deprecated\n */\nimport {Component, Input} from '@angular/core';\n\nimport {HsDatasourcesService} from './datasource-selector.service';\n\n@Component({\n selector: 'hs-select-type-to-add-layer',\n template:... | typescript | edit | 0 | 2 | mit | b7b58fa337c234b9cc21f9fa3b22a745d57ad875 | hslayers/hslayers-ng,hslayers/hslayers-ng,hslayers/hslayers-ng,hslayers/hslayers-ng | components/datasource-selector/select-type-to-add-layer-dialog.component.ts | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```typescript\nimport { defaultTo, lensProp, merge, over, pipe } from 'ramda'\nimport { ComponentClass, createElement as r, SFC } from 'react'\nimport SequentialId from 'react-sequential-id'\nimport { mapProps } from 'recompose'\nimport { WrappedField... | typescript | edit | 0 | 4 | mit | 745e63789707562e087f0e980cdb863de889ab9e | thirdhand/components,thirdhand/components | packages/react-input-feedback/src/index.ts | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.