type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
ArrowFunction
(partial: Partial<RulerAlertingRuleDTO> = {}): RulerAlertingRuleDTO => ({ alert: 'alert1', expr: 'up = 1', labels: { severity: 'warning', }, annotations: { summary: 'test alert', }, })
JiayuanZHOU/grafana
public/app/features/alerting/unified/mocks.ts
TypeScript
ArrowFunction
(partial: Partial<RulerRuleGroupDTO> = {}): RulerRuleGroupDTO => ({ name: 'group1', rules: [mockRulerAlertingRule()], ...partial, })
JiayuanZHOU/grafana
public/app/features/alerting/unified/mocks.ts
TypeScript
ArrowFunction
(partial: Partial<AlertingRule> = {}): AlertingRule => { return { type: PromRuleType.Alerting, alerts: [mockPromAlert()], name: 'myalert', query: 'foo > 1', lastEvaluation: '2021-03-23T08:19:05.049595312Z', evaluationTime: 0.000395601, annotations: { message: 'alert with severity "{...
JiayuanZHOU/grafana
public/app/features/alerting/unified/mocks.ts
TypeScript
ArrowFunction
(partial: Partial<RecordingRule> = {}): RecordingRule => { return { type: PromRuleType.Recording, query: 'bar < 3', labels: { cluster: 'eu-central', }, health: 'OK', name: 'myrecordingrule', lastEvaluation: '2021-03-23T08:19:05.049595312Z', evaluationTime: 0.000395601, ...pa...
JiayuanZHOU/grafana
public/app/features/alerting/unified/mocks.ts
TypeScript
ArrowFunction
(partial: Partial<RuleGroup> = {}): RuleGroup => { return { name: 'mygroup', interval: 60, rules: [mockPromAlertingRule()], ...partial, }; }
JiayuanZHOU/grafana
public/app/features/alerting/unified/mocks.ts
TypeScript
ArrowFunction
(partial: Partial<RuleNamespace> = {}): RuleNamespace => { return { dataSourceName: 'Prometheus-1', name: 'default', groups: [mockPromRuleGroup()], ...partial, }; }
JiayuanZHOU/grafana
public/app/features/alerting/unified/mocks.ts
TypeScript
ArrowFunction
(partial: Partial<AlertmanagerAlert> = {}): AlertmanagerAlert => { return { annotations: { summary: 'US-Central region is on fire', }, endsAt: '2021-06-22T21:49:28.562Z', fingerprint: '88e013643c3df34ac3', receivers: [{ name: 'pagerduty' }], startsAt: '2021-06-21T17:25:28.562Z', sta...
JiayuanZHOU/grafana
public/app/features/alerting/unified/mocks.ts
TypeScript
ArrowFunction
(partial: Partial<AlertmanagerGroup> = {}): AlertmanagerGroup => { return { labels: { severity: 'warning', region: 'US-Central', }, receiver: { name: 'pagerduty', }, alerts: [ mockAlertmanagerAlert(), mockAlertmanagerAlert({ status: { state: AlertState.Suppre...
JiayuanZHOU/grafana
public/app/features/alerting/unified/mocks.ts
TypeScript
ArrowFunction
(partial: Partial<Silence> = {}): Silence => { return { id: '1a2b3c4d5e6f', matchers: [{ name: 'foo', value: 'bar', isEqual: true, isRegex: false }], startsAt: new Date().toISOString(), endsAt: new Date(Date.now() + 60 * 60 * 1000).toISOString(), updatedAt: new Date().toISOString(), createdBy...
JiayuanZHOU/grafana
public/app/features/alerting/unified/mocks.ts
TypeScript
ArrowFunction
() => []
JiayuanZHOU/grafana
public/app/features/alerting/unified/mocks.ts
TypeScript
ArrowFunction
(name: any) => name
JiayuanZHOU/grafana
public/app/features/alerting/unified/mocks.ts
TypeScript
ArrowFunction
(acc, ds) => { acc[ds.name] = ds; return acc; }
JiayuanZHOU/grafana
public/app/features/alerting/unified/mocks.ts
TypeScript
ArrowFunction
( type: string, overrides: Partial<GrafanaManagedReceiverConfig> = {} ): GrafanaManagedReceiverConfig => ({ type: type, name: type, disableResolveMessage: false, settings: {}, ...overrides, })
JiayuanZHOU/grafana
public/app/features/alerting/unified/mocks.ts
TypeScript
ArrowFunction
(dataSourceName = 'Prometheus'): RuleNamespace[] => [ { dataSourceName, name: 'namespace1', groups: [ mockPromRuleGroup({ name: 'group1', rules: [mockPromAlertingRule({ name: 'alert1' })] }), mockPromRuleGroup({ name: 'group2', rules: [mockPromAlertingRule({ name: 'alert2' })] }), ], },...
JiayuanZHOU/grafana
public/app/features/alerting/unified/mocks.ts
TypeScript
ClassDeclaration
export class MockDataSourceSrv implements DataSourceSrv { datasources: Record<string, DataSourceApi> = {}; // @ts-ignore private settingsMapByName: Record<string, DataSourceInstanceSettings> = {}; private settingsMapByUid: Record<string, DataSourceInstanceSettings> = {}; private settingsMapById: Record<strin...
JiayuanZHOU/grafana
public/app/features/alerting/unified/mocks.ts
TypeScript
MethodDeclaration
get(name?: string | null | DataSourceRef, scopedVars?: ScopedVars): Promise<DataSourceApi> { return DatasourceSrv.prototype.get.call(this, name, scopedVars); //return Promise.reject(new Error('not implemented')); }
JiayuanZHOU/grafana
public/app/features/alerting/unified/mocks.ts
TypeScript
MethodDeclaration
/** * Get a list of data sources */ getList(filters?: GetDataSourceListFilters): DataSourceInstanceSettings[] { return DatasourceSrv.prototype.getList.call(this, filters); }
JiayuanZHOU/grafana
public/app/features/alerting/unified/mocks.ts
TypeScript
MethodDeclaration
/** * Get settings and plugin metadata by name or uid */ getInstanceSettings(nameOrUid: string | null | undefined): DataSourceInstanceSettings | undefined { return ( DatasourceSrv.prototype.getInstanceSettings.call(this, nameOrUid) || (({ meta: { info: { logos: {} } } } as unknown) as DataSourceIn...
JiayuanZHOU/grafana
public/app/features/alerting/unified/mocks.ts
TypeScript
MethodDeclaration
async loadDatasource(name: string): Promise<DataSourceApi<any, any>> { return DatasourceSrv.prototype.loadDatasource.call(this, name); }
JiayuanZHOU/grafana
public/app/features/alerting/unified/mocks.ts
TypeScript
ArrowFunction
(value: string) => R.map(Number.parseInt, R.split(',', value))
sprengerjo/katas_js
src/gol.ts
TypeScript
ArrowFunction
(key: any, value: any) => { return GameOfLife.isAlive(value, R.contains(destructIdentity(key), cells)); }
sprengerjo/katas_js
src/gol.ts
TypeScript
ArrowFunction
cs => GameOfLife.filterWithKeys(fn, cs)
sprengerjo/katas_js
src/gol.ts
TypeScript
ArrowFunction
(cell: Number) => R.identity(cell.toString())
sprengerjo/katas_js
src/gol.ts
TypeScript
ArrowFunction
(val: any) => R.apply(pred, val)
sprengerjo/katas_js
src/gol.ts
TypeScript
ClassDeclaration
export default class GameOfLife { static nextGeneration(cells: [number[]]) { const destructIdentity = (value: string) => R.map(Number.parseInt, R.split(',', value)); const fn = (key: any, value: any) => { return GameOfLife.isAlive(value, R.contains(destructIdentity(key), cells)); ...
sprengerjo/katas_js
src/gol.ts
TypeScript
MethodDeclaration
static nextGeneration(cells: [number[]]) { const destructIdentity = (value: string) => R.map(Number.parseInt, R.split(',', value)); const fn = (key: any, value: any) => { return GameOfLife.isAlive(value, R.contains(destructIdentity(key), cells)); }; const nextGen = R.compo...
sprengerjo/katas_js
src/gol.ts
TypeScript
MethodDeclaration
public static getNeighbours(cell: number []): any [] { const neighbours = []; if (GameOfLife.isValid(cell)) { const d = [1, 0, -1]; for (let i in d) { for (let j in d) { if (d[i] === 0 && d[j] === 0) { continue; ...
sprengerjo/katas_js
src/gol.ts
TypeScript
MethodDeclaration
public static isAlive(number: number, alive: boolean) { return number === 3 || number === 2 && alive; }
sprengerjo/katas_js
src/gol.ts
TypeScript
MethodDeclaration
private static isValid(cell: number []): boolean { return cell !== undefined && cell !== null && cell.length > 0; }
sprengerjo/katas_js
src/gol.ts
TypeScript
MethodDeclaration
private static filterWithKeys(pred: any, obj: any) { return R.pipe( R.toPairs, R.filter((val: any) => R.apply(pred, val)), R.fromPairs )(obj); }
sprengerjo/katas_js
src/gol.ts
TypeScript
ArrowFunction
() => { const { ratings } = Redux( (state: AppReduxState) => ({ ratings: state.ratings, }), shallow ); const [sortConfig, setSortConfig] = useState<SortConfig>({ column: 'rating', order: 1, }); const [activePage, setActivePage] = useState(1); const getData = useMemo( () => ...
hbiede/LA-Feedback-System
src/components/AdminComponents/LADetailTable.tsx
TypeScript
ArrowFunction
(state: AppReduxState) => ({ ratings: state.ratings, })
hbiede/LA-Feedback-System
src/components/AdminComponents/LADetailTable.tsx
TypeScript
ArrowFunction
() => ratings.slice().sort((a, b) => { let cmp = 0; const { column, order } = sortConfig; const { rating: ratingA, time: timeA, course: courseA, sentiment: sentimentA, } = a; const { rating: ratingB, time: timeB, ...
hbiede/LA-Feedback-System
src/components/AdminComponents/LADetailTable.tsx
TypeScript
ArrowFunction
(a, b) => { let cmp = 0; const { column, order } = sortConfig; const { rating: ratingA, time: timeA, course: courseA, sentiment: sentimentA, } = a; const { rating: ratingB, time: timeB, course: courseB, ...
hbiede/LA-Feedback-System
src/components/AdminComponents/LADetailTable.tsx
TypeScript
ArrowFunction
(event: React.MouseEvent<HTMLTableHeaderCellElement, MouseEvent>) => { const { id: clickedHeader } = event.currentTarget; const { column, order } = sortConfig; setActivePage(1); if (column === clickedHeader) { setSortConfig({ column, order: order * -1, }); ...
hbiede/LA-Feedback-System
src/components/AdminComponents/LADetailTable.tsx
TypeScript
ArrowFunction
(acc, rating) => acc + rating.rating
hbiede/LA-Feedback-System
src/components/AdminComponents/LADetailTable.tsx
TypeScript
ArrowFunction
(r) => r.course === firstCourse
hbiede/LA-Feedback-System
src/components/AdminComponents/LADetailTable.tsx
TypeScript
ArrowFunction
(row) => ( <tr className={getRowClass(row.rating
hbiede/LA-Feedback-System
src/components/AdminComponents/LADetailTable.tsx
TypeScript
MethodDeclaration
getRowClass(row
hbiede/LA-Feedback-System
src/components/AdminComponents/LADetailTable.tsx
TypeScript
FunctionDeclaration
/** * Downloads the data at the object's location. Returns an error if the object * is not found. * * To use this functionality, you have to whitelist your app's origin in your * Cloud Storage bucket. See also * https://cloud.google.com/storage/docs/configuring-cors * * This API is not available in Node. * * ...
BearerPipelineTest/firebase-js-sdk
packages/storage/src/api.node.ts
TypeScript
FunctionDeclaration
/** * Downloads the data at the object's location. Raises an error event if the * object is not found. * * This API is only available in Node. * * @public * @param ref - StorageReference where data should be downloaded. * @param maxDownloadSizeBytes - If set, the maximum allowed size in bytes to * retrieve. *...
BearerPipelineTest/firebase-js-sdk
packages/storage/src/api.node.ts
TypeScript
FunctionDeclaration
export default function(theme: string | ThemeDef, opts: Partial<IOptions> = {}) { const { cwd = process.cwd() } = opts; if (!theme) { return {}; } if (typeof theme === 'string') { const themePath = isAbsolute(theme) ? theme : resolve(cwd, theme); if (existsSync(themePath)) { try { co...
FringeY/alibabacloud-console-toolkit
packages/plugin-react/src/webpack/rules/style/normalizeTheme.ts
TypeScript
InterfaceDeclaration
interface IOptions { cwd: string; }
FringeY/alibabacloud-console-toolkit
packages/plugin-react/src/webpack/rules/style/normalizeTheme.ts
TypeScript
ClassDeclaration
@Injectable() export class AuthRequiredGuard implements CanActivate { canActivate(context: ExecutionContext) { const req = context.switchToHttp().getRequest(); return !!req.user; } }
dailydismay/calm-waters-api
src/auth/guards/auth.guard.ts
TypeScript
MethodDeclaration
canActivate(context: ExecutionContext) { const req = context.switchToHttp().getRequest(); return !!req.user; }
dailydismay/calm-waters-api
src/auth/guards/auth.guard.ts
TypeScript
ClassDeclaration
export class GetByEmailAccountsValidationResult implements IValidationResult { public isValid: boolean; public errors: string[] = []; }
adico1/clean-on-nest
libs/bootcamp-businesslogic/src/lib/accounts/get-by-email/get-by-email.accounts.validation-result.ts
TypeScript
FunctionDeclaration
/** * Ensure branch integrity - GitHub and RTD urls, and workflow target branches * * @returns An array of messages for changes. */ function ensureBranch(): string[] { const messages: string[] = []; const { source, target, rtdVersion } = URL_CONFIG; // Handle the github_version in conf.py const confPath =...
Refinitiv/jupyterlab
buildutils/src/ensure-repo.ts
TypeScript
FunctionDeclaration
/** * Ensure the metapackage package. * * @returns An array of messages for changes. */ function ensureMetaPackage(): string[] { const basePath = path.resolve('.'); const mpPath = path.join(basePath, 'packages', 'metapackage'); const mpJson = path.join(mpPath, 'package.json'); const mpData = utils.readJSONF...
Refinitiv/jupyterlab
buildutils/src/ensure-repo.ts
TypeScript
FunctionDeclaration
/** * Ensure the jupyterlab application package. */ function ensureJupyterlab(): string[] { const basePath = path.resolve('.'); const corePath = path.join(basePath, 'dev_mode', 'package.json'); const corePackage = utils.readJSONFile(corePath); corePackage.jupyterlab.extensions = {}; corePackage.jupyterlab....
Refinitiv/jupyterlab
buildutils/src/ensure-repo.ts
TypeScript
FunctionDeclaration
/** * Ensure buildutils and builder bin files are symlinked */ function ensureBuildUtils() { const basePath = path.resolve('.'); ['builder', 'buildutils'].forEach(packageName => { const utilsPackage = path.join(basePath, packageName, 'package.json'); const utilsData = utils.readJSONFile(utilsPackage); ...
Refinitiv/jupyterlab
buildutils/src/ensure-repo.ts
TypeScript
FunctionDeclaration
/** * Ensure the repo integrity. */ export async function ensureIntegrity(): Promise<boolean> { const messages: Dict<string[]> = {}; if (process.env.SKIP_INTEGRITY_CHECK === 'true') { console.log('Skipping integrity check'); return true; } // Handle branch integrity const branchMessages = ensureBr...
Refinitiv/jupyterlab
buildutils/src/ensure-repo.ts
TypeScript
ArrowFunction
filePath => { return fileTypes.indexOf(path.extname(filePath)) !== -1; }
Refinitiv/jupyterlab
buildutils/src/ensure-repo.ts
TypeScript
ArrowFunction
filePath => { if (path.basename(filePath) === 'ensure-repo.ts') { return; } const oldData = fs.readFileSync(filePath, 'utf-8'); let newData = oldData; urlMap.forEach(section => { const test = new RegExp(section[0], 'g'); const replacer = section[1]; if (newData.match(test)) ...
Refinitiv/jupyterlab
buildutils/src/ensure-repo.ts
TypeScript
ArrowFunction
section => { const test = new RegExp(section[0], 'g'); const replacer = section[1]; if (newData.match(test)) { newData = newData.replace(test, replacer); } }
Refinitiv/jupyterlab
buildutils/src/ensure-repo.ts
TypeScript
ArrowFunction
filePath => { let workflowData = fs.readFileSync(filePath, 'utf-8'); const test = new RegExp(`\\[${source}\\]`, 'g'); if (workflowData.match(test)) { if (workflowData.match(test)![1] !== `[${target}]`) { messages.push(`Overwriting ${filePath}`); workflowData = workflowData.replace(tes...
Refinitiv/jupyterlab
buildutils/src/ensure-repo.ts
TypeScript
ArrowFunction
pkgPath => { if (path.resolve(pkgPath) === path.resolve(mpPath)) { return; } const name = pkgNames[pkgPath]; if (!name) { return; } seen[name] = true; const data = pkgData[name]; let valid = true; // Ensure it is a dependency. if (!mpData.dependencies[name]) { ...
Refinitiv/jupyterlab
buildutils/src/ensure-repo.ts
TypeScript
ArrowFunction
name => { if (!(name in seen)) { messages.push(`Removing dependency: ${name}`); delete mpData.dependencies[name]; } }
Refinitiv/jupyterlab
buildutils/src/ensure-repo.ts
TypeScript
ArrowFunction
pkgPath => { const dataPath = path.join(pkgPath, 'package.json'); let data: any; try { data = utils.readJSONFile(dataPath); } catch (e) { return; } coreData.set(data.name, data); // If the package has a tokens.ts file, make sure it is noted as a singleton if ( fs.exi...
Refinitiv/jupyterlab
buildutils/src/ensure-repo.ts
TypeScript
ArrowFunction
(data, name) => { // Insist on a restricted version in the yarn resolution. corePackage.resolutions[name] = `~${data.version}`; }
Refinitiv/jupyterlab
buildutils/src/ensure-repo.ts
TypeScript
ArrowFunction
data => { if (data.dependencies) { Object.entries(data.dependencies).forEach(([dep, version]) => { if ( singletonPackages.includes(dep) && !(dep in corePackage.resolutions) ) { corePackage.resolutions[dep] = version; } }); } }
Refinitiv/jupyterlab
buildutils/src/ensure-repo.ts
TypeScript
ArrowFunction
([dep, version]) => { if ( singletonPackages.includes(dep) && !(dep in corePackage.resolutions) ) { corePackage.resolutions[dep] = version; } }
Refinitiv/jupyterlab
buildutils/src/ensure-repo.ts
TypeScript
ArrowFunction
pkg => !(pkg in corePackage.resolutions)
Refinitiv/jupyterlab
buildutils/src/ensure-repo.ts
TypeScript
ArrowFunction
(data, name) => { // Determine if the package wishes to be included in the top-level // dependencies. const meta = data.jupyterlab; const keep = !!( meta && (meta.coreDependency || meta.extension || meta.mimeExtension) ); if (!keep) { return; } // Make sure it is incl...
Refinitiv/jupyterlab
buildutils/src/ensure-repo.ts
TypeScript
ArrowFunction
item => { let ext = meta[item]; if (ext === true) { ext = ''; } if (typeof ext !== 'string') { return; } corePackage.jupyterlab[`${item}s`][name] = ext; }
Refinitiv/jupyterlab
buildutils/src/ensure-repo.ts
TypeScript
ArrowFunction
pkgPath => { const dataPath = path.join(pkgPath, 'package.json'); let data: any; try { data = utils.readJSONFile(dataPath); } catch (e) { return; } // Skip private packages. if (data.private === true) { return; } // watch all src, build, and test files in the Jupy...
Refinitiv/jupyterlab
buildutils/src/ensure-repo.ts
TypeScript
ArrowFunction
packageName => { const utilsPackage = path.join(basePath, packageName, 'package.json'); const utilsData = utils.readJSONFile(utilsPackage); for (const name in utilsData.bin) { const src = path.join(basePath, packageName, utilsData.bin[name]); const dest = path.join(basePath, 'node_modules', '.b...
Refinitiv/jupyterlab
buildutils/src/ensure-repo.ts
TypeScript
ArrowFunction
pkgPath => { // Read in the package.json. let data: any; try { data = utils.readJSONFile(path.join(pkgPath, 'package.json')); } catch (e) { console.error(e); return; } pkgData[data.name] = data; pkgPaths[data.name] = pkgPath; pkgNames[pkgPath] = data.name; locals[...
Refinitiv/jupyterlab
buildutils/src/ensure-repo.ts
TypeScript
ArrowFunction
name => { const data = pkgData[name]; const deps: Dict<string> = data.dependencies || {}; const skip = SKIP_CSS[name] || []; // Initialize cssData with explicit css imports if available const cssData: Dict<string[]> = { ...(data.jupyterlab && data.jupyterlab.extraStyles) }; const cssM...
Refinitiv/jupyterlab
buildutils/src/ensure-repo.ts
TypeScript
ArrowFunction
depName => { // Bail for skipped imports and known extra styles. if (skip.includes(depName) || depName in cssData) { return; } const depData = graph.getNodeData(depName) as any; if (typeof depData.style === 'string') { cssData[depName] = [depData.style]; } if ...
Refinitiv/jupyterlab
buildutils/src/ensure-repo.ts
TypeScript
ArrowFunction
depName => { if (depName in cssData) { cssData[depName].forEach(cssPath => { cssImports[name].push(`${depName}/${cssPath}`); }); } if (depName in cssModuleData) { cssModuleData[depName].forEach(cssModulePath => { cssModuleImports[name].push(`${depName}/${cs...
Refinitiv/jupyterlab
buildutils/src/ensure-repo.ts
TypeScript
ArrowFunction
cssPath => { cssImports[name].push(`${depName}/${cssPath}`); }
Refinitiv/jupyterlab
buildutils/src/ensure-repo.ts
TypeScript
ArrowFunction
cssModulePath => { cssModuleImports[name].push(`${depName}/${cssModulePath}`); }
Refinitiv/jupyterlab
buildutils/src/ensure-repo.ts
TypeScript
ArrowFunction
pth => !tsConfigDocExclude.some(pkg => pth.includes(pkg))
Refinitiv/jupyterlab
buildutils/src/ensure-repo.ts
TypeScript
ArrowFunction
pkg => pth.includes(pkg)
Refinitiv/jupyterlab
buildutils/src/ensure-repo.ts
TypeScript
ArrowFunction
pth => { return { path: './' + path.relative('.', pth) }; }
Refinitiv/jupyterlab
buildutils/src/ensure-repo.ts
TypeScript
TypeAliasDeclaration
type Dict<T> = { [key: string]: T };
Refinitiv/jupyterlab
buildutils/src/ensure-repo.ts
TypeScript
InterfaceDeclaration
export interface IPayloadParselizer { parse(buffer: Buffer): PayloadType | null; serialize(payload: Exclude<PayloadType, null>): Buffer | null; }
bghtrbb/metekcity
packages/esn00-packet/src/lib/payloads/index.ts
TypeScript
TypeAliasDeclaration
export type PayloadType = Exclude<number | boolean | IMeasurement, null>;
bghtrbb/metekcity
packages/esn00-packet/src/lib/payloads/index.ts
TypeScript
ArrowFunction
(request: FinalizeHandlerArguments<any>) => requestHandler.handle(request.request as __HttpRequest, options || {})
Sordie/aws-sdk-js-v3
clients/client-lightsail/src/commands/GetInstancePortStatesCommand.ts
TypeScript
ClassDeclaration
/** * <p>Returns the firewall port states for a specific Amazon Lightsail instance, the IP addresses * allowed to connect to the instance through the ports, and the protocol.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { LightsailClient, Ge...
Sordie/aws-sdk-js-v3
clients/client-lightsail/src/commands/GetInstancePortStatesCommand.ts
TypeScript
InterfaceDeclaration
export interface GetInstancePortStatesCommandInput extends GetInstancePortStatesRequest {}
Sordie/aws-sdk-js-v3
clients/client-lightsail/src/commands/GetInstancePortStatesCommand.ts
TypeScript
InterfaceDeclaration
export interface GetInstancePortStatesCommandOutput extends GetInstancePortStatesResult, __MetadataBearer {}
Sordie/aws-sdk-js-v3
clients/client-lightsail/src/commands/GetInstancePortStatesCommand.ts
TypeScript
MethodDeclaration
/** * @internal */ resolveMiddleware( clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: LightsailClientResolvedConfig, options?: __HttpHandlerOptions ): Handler<GetInstancePortStatesCommandInput, GetInstancePortStatesCommandOutput> { this.middlewareStack.use(get...
Sordie/aws-sdk-js-v3
clients/client-lightsail/src/commands/GetInstancePortStatesCommand.ts
TypeScript
MethodDeclaration
private serialize(input: GetInstancePortStatesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { return serializeAws_json1_1GetInstancePortStatesCommand(input, context); }
Sordie/aws-sdk-js-v3
clients/client-lightsail/src/commands/GetInstancePortStatesCommand.ts
TypeScript
MethodDeclaration
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<GetInstancePortStatesCommandOutput> { return deserializeAws_json1_1GetInstancePortStatesCommand(output, context); }
Sordie/aws-sdk-js-v3
clients/client-lightsail/src/commands/GetInstancePortStatesCommand.ts
TypeScript
ArrowFunction
(req, res) => { res.send({"username":"admin","locale":"en"}) }
Haulmont/jmix-frontend
packages/jmix-server-mock/src/rest.ts
TypeScript
ArrowFunction
(req, res) => { res.send({ "entities": [], "entityAttributes": [], "specifics": [{"target": "rest.fileDownload.enabled", "value": 1}, { "target": "rest.fileUpload.enabled", "value": 1 }] }) }
Haulmont/jmix-frontend
packages/jmix-server-mock/src/rest.ts
TypeScript
ArrowFunction
(req, res) => { res.send({}) }
Haulmont/jmix-frontend
packages/jmix-server-mock/src/rest.ts
TypeScript
ArrowFunction
res => { if (res) { this.flashMessage.showFlashMessage({ messages: ['Your account successfully created, Let\'s get logged in!'], dismissible: true, timeout: 4000, type: 'success' }); this.router.navigate(['login']); ...
b-lor/B2BCustomerPortal
.history/Portal/src/app/user/sign-up/sign-up.component_20190220111918.ts
TypeScript
ClassDeclaration
@Component({ selector: 'app-sign-up', templateUrl: './sign-up.component.html', styleUrls: ['./sign-up.component.css'] }) export class SignUpComponent implements OnInit { // tslint:disable-next-line:max-line-length emailRegex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-...
b-lor/B2BCustomerPortal
.history/Portal/src/app/user/sign-up/sign-up.component_20190220111918.ts
TypeScript
MethodDeclaration
ngOnInit() {}
b-lor/B2BCustomerPortal
.history/Portal/src/app/user/sign-up/sign-up.component_20190220111918.ts
TypeScript
MethodDeclaration
onHandleSubmit(form: NgForm) { const user = { email: form.value.email, username: form.value.username, password: form.value.password, password2: form.value.password2 }; if (!this.validateService.validateEmail(user.email)) { this.flashMessage.showFlashMessage({ messages...
b-lor/B2BCustomerPortal
.history/Portal/src/app/user/sign-up/sign-up.component_20190220111918.ts
TypeScript
ClassDeclaration
export default class TestAnimation extends ThreeAnimation { vShader = ` precision mediump float; precision mediump int; uniform mat4 modelViewMatrix; // optional uniform mat4 projectionMatrix; // optional attribute vec3 position; varying vec3 vPosition; void main() { vPosit...
JRoper18/channels
src/animations/testanimation.ts
TypeScript
MethodDeclaration
update(_ : number) : void { this.material.uniforms.time.value = this.currentTime; }
JRoper18/channels
src/animations/testanimation.ts
TypeScript
ArrowFunction
() => { it('happy', () => { const result = renameProps(rules, input) result // $ExpectType object }) it('curried', () => { const result = renameProps(rules)(input) result // $ExpectType object }) }
Paqmind/rambda
source/renameProps-spec.ts
TypeScript
ArrowFunction
() => { const result = renameProps(rules, input) result // $ExpectType object }
Paqmind/rambda
source/renameProps-spec.ts
TypeScript
ArrowFunction
() => { const result = renameProps(rules)(input) result // $ExpectType object }
Paqmind/rambda
source/renameProps-spec.ts
TypeScript
ArrowFunction
() => { interface Output { foo: number, bar: number, } it('happy', () => { const result = renameProps<Output>(rules, input) result // $ExpectType Output }) it('curried', () => { const result = renameProps<Output>(rules)(input) result // $ExpectType Output }) }
Paqmind/rambda
source/renameProps-spec.ts
TypeScript
ArrowFunction
() => { const result = renameProps<Output>(rules, input) result // $ExpectType Output }
Paqmind/rambda
source/renameProps-spec.ts
TypeScript
ArrowFunction
() => { const result = renameProps<Output>(rules)(input) result // $ExpectType Output }
Paqmind/rambda
source/renameProps-spec.ts
TypeScript