type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
InterfaceDeclaration | /**
* @class
* Initializes a new instance of the NewAppReleaseAlertingEvent class.
* @constructor
* New app release alerting event
*
* @member {array} [userIds] List of users who need to receive an email
* notification. If this is not null, then only sending emails will be
* triggered even if the event requires... | AndreyMitsyk/appcenter-cli | src/util/apis/generated/models/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* @class
* Initializes a new instance of the BugTrackerIssueResult class.
* @constructor
* Object returned in response to getting a bug tracker issue related to a
* crash group id
*
* @member {string} [id]
* @member {string} [url]
* @member {string} [title]
* @member {string} [bugTrackerType] Possible val... | AndreyMitsyk/appcenter-cli | src/util/apis/generated/models/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* @class
* Initializes a new instance of the BugTrackerIssuesResult class.
* @constructor
* Returns a list of all issues associated with a repo
*
* @member {array} [issues]
*/
export interface BugTrackerIssuesResult {
issues?: BugTrackerIssueResult[];
} | AndreyMitsyk/appcenter-cli | src/util/apis/generated/models/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* @class
* Initializes a new instance of the EventResponseResult class.
* @constructor
* Object returned in response to accepting an event occurance
*
*/
export interface EventResponseResult extends AlertOperationResult {
} | AndreyMitsyk/appcenter-cli | src/util/apis/generated/models/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* @class
* Initializes a new instance of the AlertingError class.
* @constructor
* Alerting service error
*
* @member {number} code The status code return by the API. It can be 400 or
* 404 or 409 or 500.
* @member {string} [message] The reason for the request failed
*/
export interface AlertingError exten... | AndreyMitsyk/appcenter-cli | src/util/apis/generated/models/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* @class
* Initializes a new instance of the BillingPlan class.
* @constructor
* Billing Plan
*
* @member {string} [id] The Billing Plan ID
* @member {string} [version] Version of the Billing Plan schema
* @member {number} [priceBucket] Price bucket of the billing plan. Free plans
* start with 0, paid plan... | AndreyMitsyk/appcenter-cli | src/util/apis/generated/models/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* @class
* Initializes a new instance of the BillingPlanSelection class.
* @constructor
* Selection of a billing plan
*
* @member {number} [count] Number of instances of the billing plan.
* @member {object} [plan]
* @member {string} [plan.id] The Billing Plan ID
* @member {string} [plan.version] Version of... | AndreyMitsyk/appcenter-cli | src/util/apis/generated/models/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* @class
* Initializes a new instance of the BillingPeriod class.
* @constructor
* Billing plans for a given period
*
* @member {string} [startTime] Inclusive start of the period
* @member {string} [endTime] Exclusive end of the period.
* @member {object} [byAccount]
* @member {number} [byAccount.count] Nu... | AndreyMitsyk/appcenter-cli | src/util/apis/generated/models/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* @class
* Initializes a new instance of the ServiceBillingPlans class.
* @constructor
* Billing Plans for a single service
*
* @member {boolean} [canSelectTrialPlan] Can customer select trial plan for
* that service (if it exists)?
* @member {string} [lastTrialPlanExpirationTime] Expiration time of the las... | AndreyMitsyk/appcenter-cli | src/util/apis/generated/models/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* @class
* Initializes a new instance of the BillingInformationPlans class.
* @constructor
* Billing Plans section in the Billing Information
*
* @member {object} [buildService]
* @member {boolean} [buildService.canSelectTrialPlan] Can customer select
* trial plan for that service (if it exists)?
* @member... | AndreyMitsyk/appcenter-cli | src/util/apis/generated/models/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* @class
* Initializes a new instance of the UsagePeriod class.
* @constructor
* Usage for a single period
*
* @member {string} [startTime] Inclusive start time of the usage period
* @member {string} [endTime] Exclusive end time of the usage period.
* @member {object} [byAccount]
* @member {object} [byApp]... | AndreyMitsyk/appcenter-cli | src/util/apis/generated/models/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* @class
* Initializes a new instance of the ServiceResourceUsage class.
* @constructor
* Resource usage for a single Mobile Center service
*
* @member {object} [currentUsagePeriod]
* @member {string} [currentUsagePeriod.startTime] Inclusive start time of the
* usage period
* @member {string} [currentUsage... | AndreyMitsyk/appcenter-cli | src/util/apis/generated/models/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* @class
* Initializes a new instance of the BillingResourceUsage class.
* @constructor
* Usage section in the Billing Information
*
* @member {object} [buildService]
* @member {object} [buildService.currentUsagePeriod]
* @member {string} [buildService.currentUsagePeriod.startTime] Inclusive start
* time o... | AndreyMitsyk/appcenter-cli | src/util/apis/generated/models/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* @class
* Initializes a new instance of the BillingErrorError class.
* @constructor
* @member {number} [code] The status code return by the API. It can be 400 or
* 403 or 500.
* @member {string} [message] The reason for the request failed
*/
export interface BillingErrorError {
code?: number;
message?: ... | AndreyMitsyk/appcenter-cli | src/util/apis/generated/models/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* @class
* Initializes a new instance of the BillingError class.
* @constructor
* Error
*
* @member {object} [error]
* @member {number} [error.code] The status code return by the API. It can be
* 400 or 403 or 500.
* @member {string} [error.message] The reason for the request failed
*/
export interface Bi... | AndreyMitsyk/appcenter-cli | src/util/apis/generated/models/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* @class
* Initializes a new instance of the BillingPlansChangeTypeResponse class.
* @constructor
* Responses for requests that detect billing plans change type
*
* @member {string} [result] Possible values include: 'NoChange', 'Downgrade',
* 'Upgrade'
*/
export interface BillingPlansChangeTypeResponse {
... | AndreyMitsyk/appcenter-cli | src/util/apis/generated/models/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* @class
* Initializes a new instance of the BillingPlansSelection class.
* @constructor
* Selection of a billing plan for one or more services
*
* @member {object} [buildService]
* @member {number} [buildService.count] Number of instances of the billing
* plan.
* @member {object} [buildService.plan]
* @m... | AndreyMitsyk/appcenter-cli | src/util/apis/generated/models/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* @class
* Initializes a new instance of the UsageRecordStatus class.
* @constructor
* Status of the usage record creation
*
* @member {boolean} [expectedLatestBuildExists] Is the age of the most recent
* Build service usage record within expected limits
* @member {boolean} [expectedLatestPushExists] Is the... | AndreyMitsyk/appcenter-cli | src/util/apis/generated/models/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* @class
* Initializes a new instance of the VersionedBillingPlan class.
* @constructor
* Billing Plan with a version
*
* @member {object} [document]
* @member {string} [document.id] The Billing Plan ID
* @member {string} [document.version] Version of the Billing Plan schema
* @member {number} [document.pr... | AndreyMitsyk/appcenter-cli | src/util/apis/generated/models/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* @class
* Initializes a new instance of the MessageEnvelope class.
* @constructor
* Envelope for messages sent to actors
*
* @member {string} [messageId] Unique id of the message
* @member {string} [messageType] Type of the message
* @member {object} [message] Body of the message
*/
export interface Messa... | AndreyMitsyk/appcenter-cli | src/util/apis/generated/models/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* @class
* Initializes a new instance of the DataSubjectRightResponse class.
* @constructor
* @member {string} token Unique request identifier
* @member {string} createdAt ISO 8601 format timestamp of when request was
* created.
*/
export interface DataSubjectRightResponse {
token: string;
createdAt: str... | AndreyMitsyk/appcenter-cli | src/util/apis/generated/models/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* @class
* Initializes a new instance of the DataSubjectRightStatusResponse class.
* @constructor
* @member {string} [sasUrl] Azure Storage shared access signature (SAS) URL
* for exported user data.
* @member {boolean} [sasUrlExpired] Whether Azure Storage shared access
* signature (SAS) URL has expired or ... | AndreyMitsyk/appcenter-cli | src/util/apis/generated/models/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* @class
* Initializes a new instance of the ListOKResponseItem class.
* @constructor
* @member {string} displayName The display name of the organization
* @member {string} name The slug name of the organization
* @member {string} origin The creation origin of this organization. Possible
* values include: 'a... | AndreyMitsyk/appcenter-cli | src/util/apis/generated/models/index.d.ts | TypeScript |
FunctionDeclaration |
function main() {
console.log("poggers");
} | Midren/refactoring.nvim | lua/refactoring/tests/debug/cleanup/ts/cleanup.expected.ts | TypeScript |
ArrowFunction |
(event, user) => {
console.log("Authorization Service => user user_logged_out status");
this.user.next(user);
console.log(user);
} | suanter/resfrac-app | src/app/services/authentication.service.ts | TypeScript |
ArrowFunction |
(event, user) => {
console.log("Authorization Service => user user_logged status");
this.user.next(user);
console.log(user);
} | suanter/resfrac-app | src/app/services/authentication.service.ts | TypeScript |
ArrowFunction |
(e) => this.value = e | suanter/resfrac-app | src/app/services/authentication.service.ts | TypeScript |
ArrowFunction |
(e) => value = e | suanter/resfrac-app | src/app/services/authentication.service.ts | TypeScript |
ClassDeclaration |
@Injectable({
providedIn: 'root'
})
export class AuthenticationService {
user = new BehaviorSubject({});
value = {}
constructor() {
electron.ipcRenderer.on('user_logged_out', (event, user) => {
console.log("Authorization Service => user user_logged_out status");
this.user.next(user);
con... | suanter/resfrac-app | src/app/services/authentication.service.ts | TypeScript |
MethodDeclaration |
login() {
electron.ipcRenderer.send('login_user', "start");
} | suanter/resfrac-app | src/app/services/authentication.service.ts | TypeScript |
MethodDeclaration |
logout() {
electron.ipcRenderer.send('logout_user', "start");
} | suanter/resfrac-app | src/app/services/authentication.service.ts | TypeScript |
MethodDeclaration |
getUserInformation() {
electron.ipcRenderer.send('user_logged');
} | suanter/resfrac-app | src/app/services/authentication.service.ts | TypeScript |
MethodDeclaration |
getAuthStatus() {
let value;
this.user.subscribe((e) => value = e);
console.log("getAuthStatus");
console.log(value)
if (value)
return value['logged']
return false;
} | suanter/resfrac-app | src/app/services/authentication.service.ts | TypeScript |
ArrowFunction |
async (epoch: BigNumber) => {
d._init_();
console.log("\nStarted Epoch", epoch.toString());
const WAITING_TIME = GLOBAL_CONFIG.WAITING_TIME;
console.log("Now waiting for", WAITING_TIME / 60000, "min");
await sleep(WAITING_TIME);
console.log("\nGetting Amounts");
const {bullAmount, bearAmount} = a... | AladeenCR/PancakeSwap-Prediction-Bot-v3 | src/index.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'not-found',
template: `
<h1>
Page Not found
</h1>
`,
})
export class PageNotFoundComponent {
} | Euricom/training-workshop-JS-Angular-2017Q2 | samples/ng-router/src/app/components/notfound.component.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app',
templateUrl: './template.html',
styleUrls: ['../main.scss', './styles.scss'],
encapsulation: ViewEncapsulation.None
})
export class DemoComponent {} | Di-did-done/mosaic | packages/mosaic-dev/link/module.ts | TypeScript |
ClassDeclaration | /* tslint:disable:max-classes-per-file */
@NgModule({
declarations: [
DemoComponent
],
imports: [
BrowserModule,
McLinkModule,
McIconModule
],
bootstrap: [
DemoComponent
]
})
export class DemoModule {} | Di-did-done/mosaic | packages/mosaic-dev/link/module.ts | TypeScript |
ClassDeclaration | /** The HTTP application protocol. */
export abstract class WebAppRpcProtocol extends RpcProtocol {
/** Convenience handler for an RPC operation get request for an HTTP server. */
public async handleOperationGetRequest(req: HttpServerRequest, res: HttpServerResponse) {
return this.handleOperationPostRequest(req... | JBMonnier/imodeljs | core/common/src/rpc/web/WebAppRpcProtocol.ts | TypeScript |
InterfaceDeclaration | /** An HTTP server request object. */
export interface HttpServerRequest extends Readable {
httpVersion: string;
httpVersionMajor: number;
httpVersionMinor: number;
connection: any;
headers: { [header: string]: string | string[] | undefined };
rawHeaders: string[];
trailers: { [key: string]: string | unde... | JBMonnier/imodeljs | core/common/src/rpc/web/WebAppRpcProtocol.ts | TypeScript |
InterfaceDeclaration | /** An HTTP server response object. */
export interface HttpServerResponse extends Writable {
send(body?: any): HttpServerResponse;
status(code: number): HttpServerResponse;
set(field: string, value: string): void;
} | JBMonnier/imodeljs | core/common/src/rpc/web/WebAppRpcProtocol.ts | TypeScript |
MethodDeclaration | /** Convenience handler for an RPC operation get request for an HTTP server. */
public async handleOperationGetRequest(req: HttpServerRequest, res: HttpServerResponse) {
return this.handleOperationPostRequest(req, res);
} | JBMonnier/imodeljs | core/common/src/rpc/web/WebAppRpcProtocol.ts | TypeScript |
MethodDeclaration | /** Convenience handler for an RPC operation post request for an HTTP server. */
public async handleOperationPostRequest(req: HttpServerRequest, res: HttpServerResponse) {
const request = await WebAppRpcRequest.parseRequest(this, req);
const fulfillment = await this.fulfill(request);
WebAppRpcRequest.sendRe... | JBMonnier/imodeljs | core/common/src/rpc/web/WebAppRpcProtocol.ts | TypeScript |
MethodDeclaration | /** Convenience handler for an OpenAPI description request for an HTTP server. */
public handleOpenApiDescriptionRequest(_req: HttpServerRequest, res: HttpServerResponse) {
const description = JSON.stringify(this.openAPIDescription);
res.send(description);
} | JBMonnier/imodeljs | core/common/src/rpc/web/WebAppRpcProtocol.ts | TypeScript |
MethodDeclaration | /** Converts an HTTP content type value to an RPC content type value. */
public static computeContentType(httpType: string | null | undefined): RpcContentType {
if (!httpType)
return RpcContentType.Unknown;
if (httpType.indexOf(WEB_RPC_CONSTANTS.ANY_TEXT) === 0) {
return RpcContentType.Text;
} ... | JBMonnier/imodeljs | core/common/src/rpc/web/WebAppRpcProtocol.ts | TypeScript |
MethodDeclaration | /** Supplies the status corresponding to a protocol-specific code value. */
public getStatus(code: number): RpcRequestStatus {
switch (code) {
case 202: return RpcRequestStatus.Provisioning;
case 404: return RpcRequestStatus.NotFound;
case 409: return RpcRequestStatus.Pending;
case 200: retu... | JBMonnier/imodeljs | core/common/src/rpc/web/WebAppRpcProtocol.ts | TypeScript |
MethodDeclaration | /** Supplies the protocol-specific code corresponding to a status value. */
public getCode(status: RpcRequestStatus): number {
switch (status) {
case RpcRequestStatus.Provisioning: return 202;
case RpcRequestStatus.NotFound: return 404;
case RpcRequestStatus.Pending: return 409;
case RpcRequ... | JBMonnier/imodeljs | core/common/src/rpc/web/WebAppRpcProtocol.ts | TypeScript |
MethodDeclaration | /** Returns the OpenAPI-compatible URI path parameters for an RPC operation. */
public abstract supplyPathParametersForOperation(_operation: RpcOperation): OpenAPIParameter[]; | JBMonnier/imodeljs | core/common/src/rpc/web/WebAppRpcProtocol.ts | TypeScript |
ArrowFunction |
() => {
it('should sort', () => {
const orderedItems: Ordered<Foo>[] = [
{
name: 'A',
order: 4
},
{
name: 'B',
order: 2
},
{
name: 'C',
order: 1
... | dirkluijk/typescript-essentials | projects/typescript-essentials/src/lib/ordering/compare-by-order.fn.spec.ts | TypeScript |
ArrowFunction |
() => {
const orderedItems: Ordered<Foo>[] = [
{
name: 'A',
order: 4
},
{
name: 'B',
order: 2
},
{
name: 'C',
order: 1
},
{
... | dirkluijk/typescript-essentials | projects/typescript-essentials/src/lib/ordering/compare-by-order.fn.spec.ts | TypeScript |
ArrowFunction |
(it) => it.name | dirkluijk/typescript-essentials | projects/typescript-essentials/src/lib/ordering/compare-by-order.fn.spec.ts | TypeScript |
InterfaceDeclaration |
interface Foo { name: string; } | dirkluijk/typescript-essentials | projects/typescript-essentials/src/lib/ordering/compare-by-order.fn.spec.ts | TypeScript |
ArrowFunction |
({placement}) => (placement === 'top' ? css`
top: 7px;
right: 7px;
` : css`
right: 7px;
bottom: 7px;
`) | 3ach/mattermost-webapp | components/advanced_text_editor/texteditor_actions/texteditor_actions.tsx | TypeScript |
ArrowFunction |
({show = true}) => (show ? 1 : 0) | 3ach/mattermost-webapp | components/advanced_text_editor/texteditor_actions/texteditor_actions.tsx | TypeScript |
ArrowFunction |
({show = true}) => (show ? 'visible' : 'hidden') | 3ach/mattermost-webapp | components/advanced_text_editor/texteditor_actions/texteditor_actions.tsx | TypeScript |
TypeAliasDeclaration | /** eslint-disable no-confusing-arrow */
type TexteditorActionsProps = {
placement: 'top' | 'bottom';
show?: boolean;
} | 3ach/mattermost-webapp | components/advanced_text_editor/texteditor_actions/texteditor_actions.tsx | TypeScript |
ClassDeclaration |
export default class RoleUpdateEvent extends Event {
constructor(bot: Bot) {
super(bot, Constants.Events.GUILD_ROLE_UPDATE);
}
async execute(bot: Bot, oldRole: Role, newRole: Role) {
try {
if (!newRole.guild) return;
if (!newRole.guild.available) return;
const webhook = await bot.utils... | barzanimatin/ghost | src/events/guild/roleUpdate.ts | TypeScript |
MethodDeclaration |
async execute(bot: Bot, oldRole: Role, newRole: Role) {
try {
if (!newRole.guild) return;
if (!newRole.guild.available) return;
const webhook = await bot.utils.getWebhook(newRole.guild);
if (!webhook) return;
let msg = "";
if (oldRole.name !== newRole.name) {
msg = `Rol... | barzanimatin/ghost | src/events/guild/roleUpdate.ts | TypeScript |
ArrowFunction |
(chainId: number = CHAINID ) => {
if (chainId === SupportedChainId.POLYGON) {
return polygonTokens
} else if (chainId === SupportedChainId.AURORA) {
return auroraTokens
} else {
return polygonTokens
}
} | Possum-ONE/possum-app | src/constants/tokens.ts | TypeScript |
ArrowFunction |
(chainId: number = CHAINID, hash: string ) => {
let url: string = ''
if (chainId === SupportedChainId.POLYGON) {
url = ViewBlockScan[SupportedChainId.POLYGON]
return `${url}/tx/${hash}`
} else if (chainId === SupportedChainId.AURORA) {
url = ViewBlockScan[SupportedChainId.AURORA]
... | Possum-ONE/possum-app | src/constants/tokens.ts | TypeScript |
InterfaceDeclaration | // define custom interface
export interface userType {
username: String;
password: String;
firstName: String;
lastName: String;
email: String;
phone: String;
occupation: String;
isDeveloper: Boolean;
isValid: Boolean;
isAdmin: Boolean;
} | chuangyu-hscy/- | controller/user/userInterface.ts | TypeScript |
ClassDeclaration |
@Injectable({
providedIn: 'root'
})
export class FacebookService {
constructor(
private http: HttpClient,
) { }
getFacebookAccessToken(): Observable<any> {
console.log('get access token invoked');
return this.http.get(
`/oauth/access_token?client_id=1233979890091351&client_secret=1c80b71b37... | avinduhewa/publicera | publicera/src/app/shared/services/facebook.service.ts | TypeScript |
MethodDeclaration |
getFacebookAccessToken(): Observable<any> {
console.log('get access token invoked');
return this.http.get(
`/oauth/access_token?client_id=1233979890091351&client_secret=1c80b71b377433c0c5fe6bf00f457b06&grant_type=client_credentials`);
} | avinduhewa/publicera | publicera/src/app/shared/services/facebook.service.ts | TypeScript |
MethodDeclaration |
getPosts(pageName, accessToken): Observable<any> {
console.log('get posts invoked');
return this.http.get(
`/v2.9/${pageName}/posts?access_token=${accessToken}`);
} | avinduhewa/publicera | publicera/src/app/shared/services/facebook.service.ts | TypeScript |
FunctionDeclaration | /**
* The connection strings for the given database account.
*/
export function listDatabaseAccountConnectionStrings(args: ListDatabaseAccountConnectionStringsArgs, opts?: pulumi.InvokeOptions): Promise<ListDatabaseAccountConnectionStringsResult> {
if (!opts) {
opts = {}
}
if (!opts.version) {
... | pulumi/pulumi-azure-nextgen | sdk/nodejs/documentdb/v20190801/listDatabaseAccountConnectionStrings.ts | TypeScript |
InterfaceDeclaration |
export interface ListDatabaseAccountConnectionStringsArgs {
/**
* Cosmos DB database account name.
*/
readonly accountName: string;
/**
* Name of an Azure resource group.
*/
readonly resourceGroupName: string;
} | pulumi/pulumi-azure-nextgen | sdk/nodejs/documentdb/v20190801/listDatabaseAccountConnectionStrings.ts | TypeScript |
InterfaceDeclaration | /**
* The connection strings for the given database account.
*/
export interface ListDatabaseAccountConnectionStringsResult {
/**
* An array that contains the connection strings for the Cosmos DB account.
*/
readonly connectionStrings?: outputs.documentdb.v20190801.DatabaseAccountConnectionStringRes... | pulumi/pulumi-azure-nextgen | sdk/nodejs/documentdb/v20190801/listDatabaseAccountConnectionStrings.ts | TypeScript |
ArrowFunction |
({
height = 19,
width = 19,
viewBox = '0 0 24 24',
className,
...props
}) => {
const classes = ['icon', className].join(' ');
return (
<svg
className={classes}
height={height}
width={width}
viewBox={viewBox}
{...props}
>
<g>
<path d="M18,3 C19.6568542,3... | azmi989/shifa-ui | src/icons/CheckBox.tsx | TypeScript |
ArrowFunction |
() => {
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
RouterTestingModule
],
declarations: [
AppComponent
],
}).compileComponents();
}));
it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
cons... | Tab0o33/MyHomeControlV3 | src/app/app.component.spec.ts | TypeScript |
ArrowFunction |
() => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('MyHomeControlV3');
} | Tab0o33/MyHomeControlV3 | src/app/app.component.spec.ts | TypeScript |
ArrowFunction |
() => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement;
expect(compiled.querySelector('.content span').textContent).toContain('MyHomeControlV3 app is running!');
} | Tab0o33/MyHomeControlV3 | src/app/app.component.spec.ts | TypeScript |
ClassDeclaration |
export class GetOperationDTO {
@ApiProperty({
type: String,
required: true
})
@IsUUID()
id: string;
} | GrefferM/bank | shared/dto/get.operation.dto.ts | TypeScript |
FunctionDeclaration |
export function configure(config: Config): SystemConfigured {
// Upgrade `edonet` reference in config to `edo2net`. This is done for the
// sake of compatibility since the meaning of "edonet" is ambiguous: in some
// parts of the ecosystem it refers to latest version of edonet, which is also
// referred to as ... | illuminautical/minter | src/lib/system.ts | TypeScript |
FunctionDeclaration |
function createMetadataResolver(
system: SystemConfigured,
toolkit: TezosToolkit,
contractAddress: string
): ResolveMetadata {
const ipfsGateway =
system.config.network === 'sandboxnet'
? 'localhost:8080'
: 'gateway.ipfs.io';
const gatewayProtocol =
system.config.network === 'sandboxnet' ... | illuminautical/minter | src/lib/system.ts | TypeScript |
FunctionDeclaration |
export function connectToolkit(system: SystemConfigured): SystemWithToolkit {
const toolkit = new TezosToolkit(system.config.rpc);
const faucetAddress = system.config.contracts.nftFaucet;
return {
...system,
status: Status.ToolkitConnected,
toolkit: toolkit,
resolveMetadata: createMetadataResolve... | illuminautical/minter | src/lib/system.ts | TypeScript |
FunctionDeclaration |
function networkType(config: Config) {
if (config.network === 'mainnet') {
return NetworkType.MAINNET;
}
if (config.network === 'delphinet') {
return NetworkType.DELPHINET;
}
// Edonet support is split between two network types, edonet and edo2net. For
// now, .CUSTOM must be used when referring to... | illuminautical/minter | src/lib/system.ts | TypeScript |
FunctionDeclaration |
function getWallet(
system: SystemWithToolkit,
eventHandlers?: DAppClientOptions['eventHandlers']
): BeaconWallet {
if (wallet === null) {
wallet = new BeaconWallet({
name: 'OpenSystem dApp',
preferredNetwork: networkType(system.config),
eventHandlers
});
}
return wallet;
} | illuminautical/minter | src/lib/system.ts | TypeScript |
FunctionDeclaration |
async function initWallet(
system: SystemWithToolkit,
forceConnect: boolean,
eventHandlers?: DAppClientOptions['eventHandlers']
): Promise<boolean> {
const network = networkType(system.config);
const wallet = getWallet(system, eventHandlers);
const activeAccount = await wallet.client.getActiveAccount();
... | illuminautical/minter | src/lib/system.ts | TypeScript |
FunctionDeclaration |
async function createSystemWithWallet(
system: SystemWithToolkit
): Promise<SystemWithWallet> {
const wallet = getWallet(system);
system.toolkit.setWalletProvider(wallet);
tzUtils.setConfirmationPollingInterval(system.toolkit);
const tzPublicKey = await wallet.getPKH();
return {
...system,
statu... | illuminautical/minter | src/lib/system.ts | TypeScript |
FunctionDeclaration |
export async function reconnectWallet(
system: SystemWithToolkit,
eventHandlers?: DAppClientOptions['eventHandlers']
): Promise<SystemWithWallet | SystemWithToolkit> {
const connected = await initWallet(system, false, eventHandlers);
if (connected) {
const systemWithWallet = await createSystemWithWallet(sy... | illuminautical/minter | src/lib/system.ts | TypeScript |
FunctionDeclaration |
export async function connectWallet(
system: SystemWithToolkit,
eventHandlers?: DAppClientOptions['eventHandlers']
): Promise<SystemWithWallet> {
await initWallet(system, true, eventHandlers);
return await createSystemWithWallet(system);
} | illuminautical/minter | src/lib/system.ts | TypeScript |
FunctionDeclaration |
export async function disconnectWallet(
system: SystemWithWallet
): Promise<SystemWithToolkit> {
await system.wallet.disconnect();
const toolkit = new TezosToolkit(system.config.rpc);
wallet = null;
return {
...system,
status: Status.ToolkitConnected,
toolkit: toolkit,
wallet: null,
tzPub... | illuminautical/minter | src/lib/system.ts | TypeScript |
ArrowFunction |
async uri => {
const contract = await defaultContract;
return provider.provideMetadata(contract, uri, context);
} | illuminautical/minter | src/lib/system.ts | TypeScript |
InterfaceDeclaration |
export interface Config {
rpc: string;
network: string;
bcd: {
api: string;
gui: string;
};
contracts: {
nftFaucet: string;
marketplace: {
fixedPrice: {
tez: string;
};
};
};
ipfsApi: string;
} | illuminautical/minter | src/lib/system.ts | TypeScript |
InterfaceDeclaration |
export interface SystemConfigured {
status: Status.Configured;
config: Config;
betterCallDev: BetterCallDev;
toolkit: null;
wallet: null;
walletReconnectAttempted: boolean;
tzPublicKey: null;
} | illuminautical/minter | src/lib/system.ts | TypeScript |
InterfaceDeclaration |
export interface SystemWithToolkit {
status: Status.ToolkitConnected;
config: Config;
betterCallDev: BetterCallDev;
toolkit: TezosToolkit;
resolveMetadata: ResolveMetadata;
wallet: null;
walletReconnectAttempted: boolean;
tzPublicKey: null;
} | illuminautical/minter | src/lib/system.ts | TypeScript |
InterfaceDeclaration |
export interface SystemWithWallet {
status: Status.WalletConnected;
config: Config;
betterCallDev: BetterCallDev;
toolkit: TezosToolkit;
resolveMetadata: ResolveMetadata;
wallet: BeaconWallet;
walletReconnectAttempted: boolean;
tzPublicKey: string;
} | illuminautical/minter | src/lib/system.ts | TypeScript |
EnumDeclaration |
export enum Status {
Configured = 'Configured',
ToolkitConnected = 'ToolkitConnected',
WalletConnected = 'WalletConnected'
} | illuminautical/minter | src/lib/system.ts | TypeScript |
TypeAliasDeclaration |
type ResolveMetadata = (
uri: string
) => ReturnType<MetadataProvider['provideMetadata']>; | illuminautical/minter | src/lib/system.ts | TypeScript |
TypeAliasDeclaration |
export type System = SystemConfigured | SystemWithToolkit | SystemWithWallet; | illuminautical/minter | src/lib/system.ts | TypeScript |
ArrowFunction |
() => {
const dbConnectionObj = getMockDBConnection();
const sampleReq = {
keycloak_token: {},
body: {},
params: {
projectId: 1
}
} as any;
afterEach(() => {
sinon.restore();
});
it('should throw a 400 error when no projectId is provided', async () => {
sinon.stub(db, 'getD... | bcgov/restoration-tracker | api/src/paths/project/{projectId}/export/eml.test.ts | TypeScript |
ArrowFunction |
() => {
sinon.restore();
} | bcgov/restoration-tracker | api/src/paths/project/{projectId}/export/eml.test.ts | TypeScript |
ArrowFunction |
async () => {
sinon.stub(db, 'getDBConnection').returns(dbConnectionObj);
try {
await getProjectEml()(
{ ...sampleReq, params: { ...sampleReq.params, projectId: null } },
(null as unknown) as any,
(null as unknown) as any
);
expect.fail();
} catch (actualError) {
... | bcgov/restoration-tracker | api/src/paths/project/{projectId}/export/eml.test.ts | TypeScript |
ArrowFunction |
async () => {
const dbConnectionObj = getMockDBConnection({ rollback: sinon.stub(), release: sinon.stub() });
sinon.stub(db, 'getDBConnection').returns(dbConnectionObj);
sinon.stub(EmlService.prototype, 'buildProjectEml').rejects(new Error('a test error'));
const { mockReq, mockRes, mockNext } = get... | bcgov/restoration-tracker | api/src/paths/project/{projectId}/export/eml.test.ts | TypeScript |
ArrowFunction |
({
animatedProps,
data,
layout,
y,
borderColor,
borderWidth,
component,
reverse,
scale,
height,
onMouseEnter,
onMouseLeave,
onClick,
}: BulletRectsProps) => {
const rects = useMemo(
() =>
computeRects({
data,
la... | AthithyanRengaswamy/nivo | packages/bullet/src/BulletRects.tsx | TypeScript |
ArrowFunction |
() =>
computeRects({
data,
layout,
reverse,
scale,
height,
}) | AthithyanRengaswamy/nivo | packages/bullet/src/BulletRects.tsx | TypeScript |
ArrowFunction |
(value: number) =>
`translate(${layout === 'horizontal' ? 0 : value},${layout === 'horizontal' ? value : 0})` | AthithyanRengaswamy/nivo | packages/bullet/src/BulletRects.tsx | TypeScript |
ArrowFunction |
rect => `${rect.data.index}` | AthithyanRengaswamy/nivo | packages/bullet/src/BulletRects.tsx | TypeScript |
ArrowFunction |
rect => ({
x: rect.x,
y: rect.y,
width: rect.width,
height: rect.height,
color: rect.data.color,
}) | AthithyanRengaswamy/nivo | packages/bullet/src/BulletRects.tsx | TypeScript |
ArrowFunction |
value => Math.max(value, 0) | AthithyanRengaswamy/nivo | packages/bullet/src/BulletRects.tsx | TypeScript |
MethodDeclaration |
transition( | AthithyanRengaswamy/nivo | packages/bullet/src/BulletRects.tsx | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.