type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
MethodDeclaration |
onFormSubmit(form: NgForm) {
if (this.pageType === 'Create') {
console.log('Creating', form)
form = Object.assign(form, {name: form.name.trim().toLowerCase()});
this.api.post('Type', form)
.subscribe(res => {
let id = res['_id'];
this.router.navigate(['settings/item/ty... | databucketsolutions/AngularPOS | src/app/settings/settings-item/settings-type/type-create/type-create.component.ts | TypeScript |
ArrowFunction |
() => {
const s = new Spectral();
s.addRules({
'model-description': Object.assign(ruleset.rules['model-description'], {
recommended: true,
type: RuleType[ruleset.rules['model-description'].type],
}),
});
test('validate a correct object', async () => {
const results = await s.run({
... | cbetta/spectral | src/rulesets/oas2/__tests__/model-description.ts | TypeScript |
ArrowFunction |
async () => {
const results = await s.run({
swagger: '2.0',
paths: {},
host: 'stoplight.io',
definitions: {
user: {
description: 'this describes the user model',
},
},
});
expect(results.length).toEqual(0);
} | cbetta/spectral | src/rulesets/oas2/__tests__/model-description.ts | TypeScript |
ArrowFunction |
async () => {
const results = await s.run({
swagger: '2.0',
paths: {},
host: 'stoplight.io',
definitions: { user: {} },
});
expect(results).toEqual([
{
code: 'model-description',
message: 'Definition `description` must be present and non-empty string.',
... | cbetta/spectral | src/rulesets/oas2/__tests__/model-description.ts | TypeScript |
InterfaceDeclaration | /**
* Dynamic interface to handle routes.
*/
export interface RouteInterface extends StaticRouteInterface {
[ key: string ]: any;
} | emswbandara/identity-apps | modules/core/src/models/route.ts | TypeScript |
InterfaceDeclaration | /**
* Interface for categorized routes.
*/
export interface CategorizedRouteInterface {
[ key: string ]: RouteInterface[];
} | emswbandara/identity-apps | modules/core/src/models/route.ts | TypeScript |
InterfaceDeclaration | /**
* Static route interface.
*/
export interface StaticRouteInterface {
/**
* Main category to put the rout under.
*/
category?: string;
/**
* Component to be displayed.
*/
component?: React.ReactNode | any;
/**
* Child routes.
*/
children?: ChildRouteInterface[]... | emswbandara/identity-apps | modules/core/src/models/route.ts | TypeScript |
InterfaceDeclaration | /**
* Interface to handle child routes.
* TODO: Remover this interface.
*/
export interface ChildRouteInterface extends RouteInterface {
/**
* Nesting level.
*/
level?: number;
} | emswbandara/identity-apps | modules/core/src/models/route.ts | TypeScript |
TypeAliasDeclaration |
export type AwsKmsMrkAwareSymmetricDiscoveryKeyringNodeInput =
AwsKmsMrkAwareSymmetricDiscoveryKeyringInput<KMS> | AllanZhengYP/aws-encryption-sdk-javascript | modules/kms-keyring-node/src/kms_mrk_discovery_keyring_node.ts | TypeScript |
ArrowFunction |
(query?: string): number | undefined =>
query && typeof parseInt(query) === 'number' ? parseInt(query) : undefined | planbetter/explorer | src/common/constants.ts | TypeScript |
ArrowFunction |
(rMap, [k, v]) => {
rMap[v] = k;
return rMap;
} | planbetter/explorer | src/common/constants.ts | TypeScript |
ArrowFunction |
(apiServer: string) => (path?: string) =>
path ? apiServer + path : apiServer | planbetter/explorer | src/common/constants.ts | TypeScript |
ArrowFunction |
(path?: string) =>
path ? apiServer + path : apiServer | planbetter/explorer | src/common/constants.ts | TypeScript |
EnumDeclaration |
export enum MODALS {
SEARCH = 'modals/search',
ADD_NETWORK = 'modals/add-network',
UNLOCKING_SCHEDULE = 'modals/unlocking-schedule',
} | planbetter/explorer | src/common/constants.ts | TypeScript |
TypeAliasDeclaration |
type ReverseMap<T extends Record<keyof T, any>> = {
[V in T[keyof T]]: {
[K in keyof T]: T[K] extends V ? K : never;
}[keyof T];
}; | planbetter/explorer | src/common/constants.ts | TypeScript |
TypeAliasDeclaration |
export type AllModals = keyof typeof reverseMap; | planbetter/explorer | src/common/constants.ts | TypeScript |
FunctionDeclaration |
export function getMaxImageFileSize(): number {
return MAX_IMAGE_FILE_SIZE_BYTES;
} | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
FunctionDeclaration |
export async function trainClassifier(
project: DbObjects.Project,
): Promise<TrainingObjects.VisualClassifier>
{
const training = await getTraining(project);
try {
const existingClassifiers = await store.getImageClassifiers(project.id);
for (const existingClassifier of existingClassifiers... | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
FunctionDeclaration |
async function createClassifier(
project: DbObjects.Project,
credentialsPool: TrainingObjects.BluemixCredentials[],
training: { [label: string]: string },
): Promise<TrainingObjects.VisualClassifier>
{
let classifier: TrainingObjects.VisualClassifier | undefined;
const tenantPolicy = await store.... | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
FunctionDeclaration | /**
* Updates the provided set of image classifiers with the current status from
* Bluemix.
*
* @param classid - the tenant that the user is a member of
* @param classifiers - set of classifiers to get status info for
*
* @returns the same set of classifiers, with the status
* properties set using responses f... | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
FunctionDeclaration |
export async function getStatus(
credentials: TrainingObjects.BluemixCredentials,
classifier: TrainingObjects.VisualClassifier,
): Promise<TrainingObjects.VisualClassifier>
{
let req: NewVisRecRequest | LegacyVisRecRequest;
try {
req = await createBaseRequest(credentials);
}
catch (err)... | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
FunctionDeclaration | /**
* Confirms that the provided locations should be usable by the Vision Recognition service.
*/
function validateRequest(locations: any[]): void {
if (locations.length < 10) {
throw new Error('Not enough images to train the classifier');
}
if (locations.length > 10000) {
throw new Error(... | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
FunctionDeclaration |
async function getTraining(project: DbObjects.Project): Promise<{ [label: string]: string }> {
const counts = await store.countTrainingByLabel(project);
const examples: { [label: string]: string } = {};
const trainingDataToFetch: { [label: string]: downloadAndZip.ImageDownload[] } = {};
for (const l... | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
FunctionDeclaration |
async function getImageDownloadSpec(imageid: string, imageurl: string): Promise<downloadAndZip.ImageDownload> {
if (wikimedia.isWikimedia(imageurl)) {
try {
const thumb = await wikimedia.getThumbnail(imageurl, 400);
return {
type : 'download',
imageid... | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
FunctionDeclaration |
function deleteTrainingFiles(training: { [label: string]: string }): void {
const trainingKeys = Object.keys(training);
for (const trainingKey of trainingKeys) {
if (trainingKey !== 'name') {
fs.unlink(training[trainingKey], (err?: Error | null) => {
if (err) {
... | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
FunctionDeclaration | /**
* Deletes an image classifier.
* This deletes both the classifier from Bluemix, and the record of it
* stored in the app's database.
*/
export async function deleteClassifier(classifier: TrainingObjects.VisualClassifier)
{
try {
const credentials = await store.getBluemixCredentialsById(classifier.... | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
FunctionDeclaration | /**
* A horrid kludgey workaround for some frustrating behaviour in the Visual
* Recognition API.
*
* When the service gets busy, this scenario starts becoming common:
*
* 1) user starts training classifier (attempt-1)
* 2) user cancels the training by deleting the attempt-1 classifier
* 3) cancelled/delete... | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
FunctionDeclaration |
export async function deleteClassifierFromBluemix(
credentials: TrainingObjects.BluemixCredentials,
classifierId: string,
): Promise<void>
{
const req = await createBaseRequest(credentials);
try {
const url = credentials.url + '/v3/classifiers/' + encodeURIComponent(classifierId);
awai... | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
FunctionDeclaration |
export async function testClassifierFile(
credentials: TrainingObjects.BluemixCredentials,
classifierid: string, classifierTimestamp: Date,
projectid: string,
imagefilepath: string,
): Promise<TrainingObjects.Classification[]>
{
const basereq = await createBaseRequest(credentials);
const testre... | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
FunctionDeclaration |
export async function testClassifierURL(
credentials: TrainingObjects.BluemixCredentials,
classifierid: string, classifierTimestamp: Date,
projectid: string,
imageurl: string,
): Promise<TrainingObjects.Classification[]>
{
const basereq = await createBaseRequest(credentials);
const testreq: Tes... | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
FunctionDeclaration |
function classifierNotFoundError(errorInfo: any): boolean {
return errorInfo &&
errorInfo.code &&
errorInfo.code === 404 &&
errorInfo.description &&
typeof errorInfo.description === 'string' &&
(errorInfo.description.startsWith('None of the requested classifie... | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
FunctionDeclaration |
function sortByConfidence(item1: TrainingObjects.Classification, item2: TrainingObjects.Classification): number {
return item2.confidence - item1.confidence;
} | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
FunctionDeclaration |
async function submitTrainingToVisualRecognition(
project: DbObjects.Project,
credentials: TrainingObjects.BluemixCredentials,
url: string,
training: { [label: string]: string },
tenantPolicy: DbObjects.ClassTenant,
): Promise<TrainingObjects.VisualClassifier>
{
const trainingData: { name: stri... | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
FunctionDeclaration |
export async function getImageClassifiers(
credentials: TrainingObjects.BluemixCredentials,
): Promise<TrainingObjects.ClassifierSummary[]>
{
const req = await createBaseRequest(credentials);
// GETs don't need as long a timeout as POSTs
req.timeout = 30000;
const body: VisualRecogApiResponsePayloa... | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
FunctionDeclaration | /**
* An admin user has provided the credentials for a Visual Recognition service instance,
* but we don't know which IBM Cloud region the service instance is from. This function
* identifies the region (by trying the credentials in all known regions, and returning
* the URL for the region that the credentials w... | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
FunctionDeclaration |
export async function cleanupExpiredClassifiers(): Promise<void[]>
{
log.info('Cleaning up expired Visual Recognition classifiers');
const expired: TrainingObjects.VisualClassifier[] = await store.getExpiredImageClassifiers();
return Promise.all(expired.map(deleteClassifier));
} | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
FunctionDeclaration | /**
* Identifies what type of credentials are provided, so that the right auth
* mechanism can be used.
*/
function getType(credentials: TrainingObjects.BluemixCredentials): TrainingObjects.VisualRecCredsType {
if (credentials.url === 'https://gateway-a.watsonplatform.net/visual-recognition/api') {
retu... | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
FunctionDeclaration |
async function createBaseRequest(credentials: TrainingObjects.BluemixCredentials)
: Promise<LegacyVisRecRequest | NewVisRecRequest>
{
// tslint:disable-next-line:variable-name
const api_key: string = credentials.username + credentials.password;
if (getType(credentials) === 'legacy') {
const re... | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
ArrowFunction |
async (classifier) => {
if (classifier.credentialsid in credentialsCacheById === false) {
const creds = await store.getBluemixCredentialsById(classifier.credentialsid);
credentialsCacheById[classifier.credentialsid] = creds;
}
return getStatus(credent... | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
ArrowFunction |
(body) => {
classifier.status = body.status;
return classifier;
} | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
ArrowFunction |
(err) => {
log.warn({ err }, 'Failed to get status');
classifier.status = 'Non Existent';
return classifier;
} | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
ArrowFunction |
(label) => {
return downloadAndZip.run(trainingDataToFetch[label])
.then((trainingZip) => {
examples[label] = trainingZip;
});
} | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
ArrowFunction |
(trainingZip) => {
examples[label] = trainingZip;
} | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
ArrowFunction |
(err?: Error | null) => {
if (err) {
log.error({ err, trainingKey, path : training[trainingKey] }, 'Failed to delete training file');
}
} | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
ArrowFunction |
() => {
deleteClassifierFromBluemix(credentials, classifierId)
.catch((err) => {
log.error({ err }, 'Failed to delete Visual Recognition classifier');
notifications.notify('Failed to delete Visual Recognition classifier ' +
'after... | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
ArrowFunction |
(err) => {
log.error({ err }, 'Failed to delete Visual Recognition classifier');
notifications.notify('Failed to delete Visual Recognition classifier ' +
'after second attempt. \n' +
'Class : ' + credentials.class... | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
ArrowFunction |
(item) => {
return { class_name : item.class, confidence : Math.round(item.score * 100), classifierTimestamp };
} | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
ArrowFunction |
(classifierinfo) => {
const summary: TrainingObjects.ClassifierSummary = {
id : classifierinfo.classifier_id,
name : classifierinfo.name,
type : 'visrec',
credentials,
};
return summary;
} | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
InterfaceDeclaration |
interface VisRecRequestBase {
readonly qs: {
readonly version: string;
};
readonly headers: {
readonly 'user-agent': 'machinelearningforkids';
readonly 'X-Watson-Learning-Opt-Out': 'true';
};
readonly json: true;
readonly gzip: true;
timeout: number;
} | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
InterfaceDeclaration |
export interface LegacyVisRecRequest extends VisRecRequestBase {
readonly qs: {
readonly version: '2016-05-20';
readonly api_key: string;
};
} | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
InterfaceDeclaration |
export interface NewVisRecRequest extends VisRecRequestBase {
readonly qs: {
readonly version: '2018-03-19';
};
readonly headers: {
readonly 'user-agent': 'machinelearningforkids';
readonly 'X-Watson-Learning-Opt-Out': 'true';
readonly Authorization: string;
};
} | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
InterfaceDeclaration |
interface TrainingRequest {
readonly formData: TrainingData;
} | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
InterfaceDeclaration |
interface TestUrlRequest {
readonly qs: {
readonly url: string;
readonly classifier_ids: string;
readonly threshold: number;
};
} | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
InterfaceDeclaration |
interface TestFileRequest {
readonly formData: {
readonly images_file: fs.ReadStream,
readonly parameters: {
readonly value: string;
readonly options: {
readonly contentType: 'application/json';
};
};
};
} | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
InterfaceDeclaration |
export interface LegacyTrainingRequest extends TrainingRequest, LegacyVisRecRequest {} | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
InterfaceDeclaration |
export interface NewTrainingRequest extends TrainingRequest, NewVisRecRequest {} | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
InterfaceDeclaration |
export interface LegacyTestFileRequest extends TestFileRequest, LegacyVisRecRequest {} | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
InterfaceDeclaration |
export interface NewTestFileRequest extends TestFileRequest, NewVisRecRequest {} | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
InterfaceDeclaration |
export interface LegacyTestUrlRequest extends TestUrlRequest, LegacyVisRecRequest {
readonly qs: {
readonly version: '2016-05-20';
readonly api_key: string;
readonly url: string;
readonly classifier_ids: string;
readonly threshold: number;
};
} | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
InterfaceDeclaration |
export interface NewTestUrlRequest extends TestUrlRequest, NewVisRecRequest {
readonly qs: {
readonly version: '2018-03-19';
readonly url: string;
readonly classifier_ids: string;
readonly threshold: number;
};
} | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
InterfaceDeclaration |
export interface VisualRecogApiResponsePayloadClassifiers {
readonly classifiers: VisualRecogApiResponsePayloadClassifier[];
// sometimes Visual Recognition returns errors in response to GETs
readonly error?: any;
} | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
InterfaceDeclaration |
export interface VisualRecogApiResponsePayloadClassifier {
readonly classifier_id: string;
readonly name: string;
readonly owner: string;
readonly status: string;
readonly created: string;
readonly classes: Array<{ class: string }>;
} | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
InterfaceDeclaration |
interface TrainingData {
name: string;
[label: string]: fs.ReadStream | string;
} | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
InterfaceDeclaration |
export interface VisualRecogApiResponsePayloadClassification {
readonly images: Array<{
readonly classifiers: Array<{
readonly classes: Array<{
readonly class: string;
readonly score: number;
}>;
readonly classifier_id: string;
... | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
InterfaceDeclaration |
export interface VisualRecogApiResponsePayloadClassifyFile {
readonly images: Array<{
readonly classifiers: Array<{
readonly classes: Array<{
readonly class: string;
readonly score: number;
}>;
readonly classifier_id: string;
r... | mahesh9254/myAImatelatest | src/lib/training/visualrecognition.ts | TypeScript |
InterfaceDeclaration |
export interface mmCIF_Database extends Database<mmCIF_Schema> {} | sness23/molstar | src/mol-io/reader/cif/schema/mmcif.ts | TypeScript |
TypeAliasDeclaration |
export type mmCIF_Schema = typeof mmCIF_Schema; | sness23/molstar | src/mol-io/reader/cif/schema/mmcif.ts | TypeScript |
ArrowFunction |
(token: ERC20, spender: string, pendingApproval?: boolean) => {
const [allowance, setAllowance] = useState<BigNumber>(null);
const { account } = useWallet();
const fetchAllowance = useCallback(async () => {
const allowance = await token.allowance(account, spender);
console.log(`Allowance: ${allowance.to... | YieldStableDollar/YieldStableDollar | src/hooks/useAllowance.ts | TypeScript |
ArrowFunction |
async () => {
const allowance = await token.allowance(account, spender);
console.log(`Allowance: ${allowance.toString()} ${token.symbol} for ${spender}`);
setAllowance(allowance);
} | YieldStableDollar/YieldStableDollar | src/hooks/useAllowance.ts | TypeScript |
ArrowFunction |
() => {
if (account && spender && token) {
fetchAllowance().catch((err) => console.log(`Failed to fetch allowance: ${err.stack}`));
}
} | YieldStableDollar/YieldStableDollar | src/hooks/useAllowance.ts | TypeScript |
ArrowFunction |
(err) => console.log(`Failed to fetch allowance: ${err.stack}`) | YieldStableDollar/YieldStableDollar | src/hooks/useAllowance.ts | TypeScript |
ClassDeclaration |
export default class FoodCalculator extends React.Component {
public render() {
return <FoodCalculatorCard />;
}
} | ArvinH/workout-calculator | src/app/components/Food_Calculator/index.tsx | TypeScript |
MethodDeclaration |
public render() {
return <FoodCalculatorCard />;
} | ArvinH/workout-calculator | src/app/components/Food_Calculator/index.tsx | TypeScript |
ClassDeclaration |
export class LogMessage extends TypedData {
@declareType({typeId: Ydb.Type.PrimitiveTypeId.UTF8})
public app: string;
@declareType({typeId: Ydb.Type.PrimitiveTypeId.UTF8})
public host: string;
@declareType({typeId: Ydb.Type.PrimitiveTypeId.TIMESTAMP})
public timestamp: Date;
@declareType... | infobot-pro/ydb-nodejs-sdk | examples/bulk-upsert/data-helpers.ts | TypeScript |
InterfaceDeclaration |
export interface ILogMessage {
app: string;
host: string;
timestamp: Date;
httpCode: number;
message: string;
} | infobot-pro/ydb-nodejs-sdk | examples/bulk-upsert/data-helpers.ts | TypeScript |
MethodDeclaration |
static create(app: string, host: string, timestamp: Date, httpCode: number, message: string) {
return new this({app, host, timestamp, httpCode, message});
} | infobot-pro/ydb-nodejs-sdk | examples/bulk-upsert/data-helpers.ts | TypeScript |
ArrowFunction |
() => {
it('watchdog sends heartbeat request after init', (done) => {
let heartbeatReceived = false
let setIntervalId: NodeJS.Timer | null = null
handleMessage(createWatchdogInitMessage(projectId, 10, 20), (msg) => {
switch (msg.type) {
case 'heartbeatrequest':
heartbeatReceived =... | cscheffauer/utopia | editor/src/core/workers/watchdog-worker.spec.ts | TypeScript |
ArrowFunction |
(done) => {
let heartbeatReceived = false
let setIntervalId: NodeJS.Timer | null = null
handleMessage(createWatchdogInitMessage(projectId, 10, 20), (msg) => {
switch (msg.type) {
case 'heartbeatrequest':
heartbeatReceived = true
break
case 'watchdoginitresponse':
... | cscheffauer/utopia | editor/src/core/workers/watchdog-worker.spec.ts | TypeScript |
ArrowFunction |
(msg) => {
switch (msg.type) {
case 'heartbeatrequest':
heartbeatReceived = true
break
case 'watchdoginitresponse':
setIntervalId = msg.setIntervalId
break
}
} | cscheffauer/utopia | editor/src/core/workers/watchdog-worker.spec.ts | TypeScript |
ArrowFunction |
() => {
expect(heartbeatReceived).toBeTruthy()
expect(setIntervalId).not.toBeNull()
handleMessage(createWatchdogTerminateMessage(setIntervalId!), () => {})
done()
} | cscheffauer/utopia | editor/src/core/workers/watchdog-worker.spec.ts | TypeScript |
ArrowFunction |
(done) => {
let setIntervalId: NodeJS.Timer | null = null
handleMessage(createWatchdogInitMessage(projectId, 10, 20), (msg) => {
switch (msg.type) {
case 'watchdoginitresponse':
setIntervalId = msg.setIntervalId
break
}
})
setTimeout(async () => {
const isL... | cscheffauer/utopia | editor/src/core/workers/watchdog-worker.spec.ts | TypeScript |
ArrowFunction |
(msg) => {
switch (msg.type) {
case 'watchdoginitresponse':
setIntervalId = msg.setIntervalId
break
}
} | cscheffauer/utopia | editor/src/core/workers/watchdog-worker.spec.ts | TypeScript |
ArrowFunction |
async () => {
const isLockedUp = await localforage.getItem(getProjectLockedKey(projectId))
expect(isLockedUp).toEqual(true)
expect(setIntervalId).not.toBeNull()
handleMessage(createWatchdogTerminateMessage(setIntervalId!), () => {})
done()
} | cscheffauer/utopia | editor/src/core/workers/watchdog-worker.spec.ts | TypeScript |
ArrowFunction |
(done) => {
let setIntervalId: NodeJS.Timer | null = null
handleMessage(createWatchdogInitMessage(projectId, 1000, 2000), (msg) => {
switch (msg.type) {
case 'watchdoginitresponse':
setIntervalId = msg.setIntervalId
break
case 'heartbeatrequest':
handleMessag... | cscheffauer/utopia | editor/src/core/workers/watchdog-worker.spec.ts | TypeScript |
ArrowFunction |
(msg) => {
switch (msg.type) {
case 'watchdoginitresponse':
setIntervalId = msg.setIntervalId
break
case 'heartbeatrequest':
handleMessage(createHeartbeatResponseMessage(msg.id, msg.projectId, false), () => {})
break
}
} | cscheffauer/utopia | editor/src/core/workers/watchdog-worker.spec.ts | TypeScript |
ArrowFunction |
async () => {
const isLockedUp = await localforage.getItem(getProjectLockedKey(projectId))
expect(isLockedUp).toEqual(false)
expect(setIntervalId).not.toBeNull()
handleMessage(createWatchdogTerminateMessage(setIntervalId!), () => {})
done()
} | cscheffauer/utopia | editor/src/core/workers/watchdog-worker.spec.ts | TypeScript |
ArrowFunction |
async (done) => {
let setIntervalId: NodeJS.Timer | null = null
await localforage.setItem(getProjectLockedKey(projectId), true)
handleMessage(createWatchdogInitMessage(projectId, 1000, 2000), (msg) => {
switch (msg.type) {
case 'watchdoginitresponse':
setIntervalId = msg.setInterval... | cscheffauer/utopia | editor/src/core/workers/watchdog-worker.spec.ts | TypeScript |
ArrowFunction |
async (done) => {
let setIntervalId: NodeJS.Timer | null = null
await localforage.setItem(getProjectLockedKey(projectId), true)
handleMessage(createWatchdogInitMessage(projectId, 1000, 2000), (msg) => {
switch (msg.type) {
case 'watchdoginitresponse':
setIntervalId = msg... | cscheffauer/utopia | editor/src/core/workers/watchdog-worker.spec.ts | TypeScript |
ArrowFunction |
(msg) => {
switch (msg.type) {
case 'watchdoginitresponse':
setIntervalId = msg.setIntervalId
break
case 'heartbeatrequest':
handleMessage(createHeartbeatResponseMessage(msg.id, msg.projectId, true), () => {})
break
}
} | cscheffauer/utopia | editor/src/core/workers/watchdog-worker.spec.ts | TypeScript |
ArrowFunction |
async () => {
const isLockedUp = await localforage.getItem(getProjectLockedKey(projectId))
expect(isLockedUp).toEqual(true)
expect(setIntervalId).not.toBeNull()
handleMessage(createWatchdogTerminateMessage(setIntervalId!), () => {})
done()
} | cscheffauer/utopia | editor/src/core/workers/watchdog-worker.spec.ts | TypeScript |
ArrowFunction |
(Standard: 127.0.0.1) | loulancoin/loulancoin | src/qt/locale/bitcoin_de.ts | TypeScript |
ArrowFunction |
(Standard: 100) | loulancoin/loulancoin | src/qt/locale/bitcoin_de.ts | TypeScript |
ClassDeclaration | /**
* An example element.
*
* @slot - This element has a slot
* @csspart button - The button
*/
export declare class MyElement extends LitElement {
static styles: import("lit").CSSResultGroup;
render(): import("lit").TemplateResult<1>;
} | seethe-cms/cms-web | elements/base.d.ts | TypeScript |
InterfaceDeclaration |
interface HTMLElementTagNameMap {
'delta-base': MyElement;
} | seethe-cms/cms-web | elements/base.d.ts | TypeScript |
MethodDeclaration |
render(): import("lit").TemplateResult<1>; | seethe-cms/cms-web | elements/base.d.ts | TypeScript |
ArrowFunction |
() => serverGroup | amitkhurdhara1990/deck | app/scripts/modules/amazon/src/serverGroup/details/sections/CapacityDetailsSection.tsx | TypeScript |
ArrowFunction |
() => application | amitkhurdhara1990/deck | app/scripts/modules/amazon/src/serverGroup/details/sections/CapacityDetailsSection.tsx | TypeScript |
ClassDeclaration |
@Overridable('amazon.serverGroup.CapacityDetailsSection')
@BindAll()
export class CapacityDetailsSection extends React.Component<IAmazonServerGroupDetailsSectionProps> {
public static resizeServerGroup(serverGroup: IServerGroup, application: Application): void {
ReactInjector.modalService.open({
templateUr... | amitkhurdhara1990/deck | app/scripts/modules/amazon/src/serverGroup/details/sections/CapacityDetailsSection.tsx | TypeScript |
MethodDeclaration |
public static resizeServerGroup(serverGroup: IServerGroup, application: Application): void {
ReactInjector.modalService.open({
templateUrl: ReactInjector.overrideRegistry.getTemplate('aws.resize.modal', require('../resize/resizeServerGroup.html')),
controller: 'awsResizeServerGroupCtrl as ctrl',
... | amitkhurdhara1990/deck | app/scripts/modules/amazon/src/serverGroup/details/sections/CapacityDetailsSection.tsx | TypeScript |
MethodDeclaration |
public render(): JSX.Element {
const { serverGroup, app } = this.props;
const { ViewScalingActivitiesLink } = NgReact;
const simple = serverGroup.asg.minSize === serverGroup.asg.maxSize;
return (
<CollapsibleSection heading="Capacity" defaultExpanded={true}>
<dl className="dl-horizontal ... | amitkhurdhara1990/deck | app/scripts/modules/amazon/src/serverGroup/details/sections/CapacityDetailsSection.tsx | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.