type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
ArrowFunction
() => { it('should return a error response if taskIds length is longer that provided value', () => { const parsed = { raw: '#1010101: My commit message', } expect(activecollabTaskIdMaxLengthRuleResolver(parsed)[0]).toEqual(false) }) it('should return a success response if taskIds length is not ...
rushelex/commitlint-activecollab
packages/commitlint-plugin-activecollab-rules/src/rules/tests/activecollabTaskIdMaxLengthRuleResolver.test.ts
TypeScript
ArrowFunction
() => { const parsed = { raw: '#1010101: My commit message', } expect(activecollabTaskIdMaxLengthRuleResolver(parsed)[0]).toEqual(false) }
rushelex/commitlint-activecollab
packages/commitlint-plugin-activecollab-rules/src/rules/tests/activecollabTaskIdMaxLengthRuleResolver.test.ts
TypeScript
ArrowFunction
() => { const parsed = { raw: '#10101: My commit message', } expect(activecollabTaskIdMaxLengthRuleResolver(parsed)[0]).toEqual(true) }
rushelex/commitlint-activecollab
packages/commitlint-plugin-activecollab-rules/src/rules/tests/activecollabTaskIdMaxLengthRuleResolver.test.ts
TypeScript
ArrowFunction
(_r) => _r instanceof HttpResponse
kloose/XS2A-Sandbox
oba-ui/src/app/api/services/online-banking-consents.service.ts
TypeScript
ArrowFunction
(_r) => { return _r as __StrictHttpResponse<null>; }
kloose/XS2A-Sandbox
oba-ui/src/app/api/services/online-banking-consents.service.ts
TypeScript
ArrowFunction
(_r) => _r.body as null
kloose/XS2A-Sandbox
oba-ui/src/app/api/services/online-banking-consents.service.ts
TypeScript
ArrowFunction
(_r) => { return (_r as HttpResponse<any>).clone({ body: (_r as HttpResponse<any>).body === 'true', }) as __StrictHttpResponse<boolean>; }
kloose/XS2A-Sandbox
oba-ui/src/app/api/services/online-banking-consents.service.ts
TypeScript
ArrowFunction
(_r) => _r.body as boolean
kloose/XS2A-Sandbox
oba-ui/src/app/api/services/online-banking-consents.service.ts
TypeScript
ArrowFunction
(_r) => _r.body as CustomPageImplObaAisConsent
kloose/XS2A-Sandbox
oba-ui/src/app/api/services/online-banking-consents.service.ts
TypeScript
ArrowFunction
(_r) => { return _r as __StrictHttpResponse<Array<ObaAisConsent>>; }
kloose/XS2A-Sandbox
oba-ui/src/app/api/services/online-banking-consents.service.ts
TypeScript
ClassDeclaration
/** * Oba Consent Controller */ @Injectable({ providedIn: 'root', }) class OnlineBankingConsentsService extends __BaseService { static readonly confirmUsingGETPath = '/api/v1/consents/confirm/{userLogin}/{consentId}/{authorizationId}/{tan}'; static readonly revokeConsentUsingPUTPath = '/api/v1/consents/{con...
kloose/XS2A-Sandbox
oba-ui/src/app/api/services/online-banking-consents.service.ts
TypeScript
InterfaceDeclaration
/** * Parameters for confirmUsingGET */ export interface ConfirmUsingGETParams { /** * userLogin */ userLogin: string; /** * tan */ tan: string; /** * consentId */ consentId: string; /** * authorizationId */ authorizationId: string; }
kloose/XS2A-Sandbox
oba-ui/src/app/api/services/online-banking-consents.service.ts
TypeScript
InterfaceDeclaration
/** * Parameters for consentsPagedUsingGET */ export interface PagedUsingGetParams { /** * size */ size?: number; /** * page */ page?: number; }
kloose/XS2A-Sandbox
oba-ui/src/app/api/services/online-banking-consents.service.ts
TypeScript
MethodDeclaration
/** * @param params The `OnlineBankingConsentsService.ConfirmUsingGETParams` containing the following parameters: * * - `userLogin`: userLogin * * - `tan`: tan * * - `consentId`: consentId * * - `authorizationId`: authorizationId */ confirmUsingGETResponse( params: OnlineBankingConsent...
kloose/XS2A-Sandbox
oba-ui/src/app/api/services/online-banking-consents.service.ts
TypeScript
MethodDeclaration
/** * @param params The `OnlineBankingConsentsService.ConfirmUsingGETParams` containing the following parameters: * * - `userLogin`: userLogin * * - `tan`: tan * * - `consentId`: consentId * * - `authorizationId`: authorizationId */ confirmUsingGET( params: OnlineBankingConsentsService...
kloose/XS2A-Sandbox
oba-ui/src/app/api/services/online-banking-consents.service.ts
TypeScript
MethodDeclaration
/** * @param consentId consentId * @return OK */ revokeConsentUsingPUTResponse( consentId: string ): __Observable<__StrictHttpResponse<boolean>> { let __params = this.newParams(); let __headers = new HttpHeaders(); let __body: any = null; let req = new HttpRequest<any>( 'PUT', ...
kloose/XS2A-Sandbox
oba-ui/src/app/api/services/online-banking-consents.service.ts
TypeScript
MethodDeclaration
/** * @param consentId consentId * @return OK */ revokeConsentUsingPUT(consentId: string): __Observable<boolean> { return this.revokeConsentUsingPUTResponse(consentId).pipe( __map((_r) => _r.body as boolean) ); }
kloose/XS2A-Sandbox
oba-ui/src/app/api/services/online-banking-consents.service.ts
TypeScript
MethodDeclaration
consentsPagedUsingGET( userLogin: string, params: OnlineBankingConsentsService.PagedUsingGetParams ): __Observable<CustomPageImplObaAisConsent> { return this.consentsPagedUsingGETResponse(userLogin, params).pipe( __map((_r) => _r.body as CustomPageImplObaAisConsent) ); }
kloose/XS2A-Sandbox
oba-ui/src/app/api/services/online-banking-consents.service.ts
TypeScript
MethodDeclaration
/** * @param userLogin userLogin * @return OK */ consentsPagedUsingGETResponse( userLogin: string, params: OnlineBankingConsentsService.PagedUsingGetParams ): __Observable<__StrictHttpResponse<Array<ObaAisConsent>>> { let __params = this.newParams(); let __headers = new HttpHeaders(); let...
kloose/XS2A-Sandbox
oba-ui/src/app/api/services/online-banking-consents.service.ts
TypeScript
ArrowFunction
(root: string) => existsSync(join(root, MAVEN_POM))
at6ue/gauge-vscode
src/project/projectFactory.ts
TypeScript
ArrowFunction
(root: string, data: any) => new MavenProject(root, data)
at6ue/gauge-vscode
src/project/projectFactory.ts
TypeScript
ArrowFunction
(root: string) => existsSync(join(root, GRADLE_BUILD))
at6ue/gauge-vscode
src/project/projectFactory.ts
TypeScript
ArrowFunction
(root: string, data: any) => new GradleProject(root, data)
at6ue/gauge-vscode
src/project/projectFactory.ts
TypeScript
ClassDeclaration
export class ProjectFactory { public static javaProjectBuilders: Array<{ predicate: (root: string) => boolean, build: (root: string, data: string) => GaugeProject }> = [ { predicate: (root: string) => existsSync(join(root, MAVEN_POM)), build: (root: s...
at6ue/gauge-vscode
src/project/projectFactory.ts
TypeScript
MethodDeclaration
public static get(path: string): GaugeProject { if (!path) throw new Error(`${path} does not belong to a valid gauge project.`); const content = readFileSync(join(path, GAUGE_MANIFEST_FILE)); const data = JSON.parse(content.toString()); if (data.Language && data.Language === "java") { ...
at6ue/gauge-vscode
src/project/projectFactory.ts
TypeScript
MethodDeclaration
public static isGaugeProject(dir: string): boolean { return existsSync(join(dir, GAUGE_MANIFEST_FILE)); }
at6ue/gauge-vscode
src/project/projectFactory.ts
TypeScript
MethodDeclaration
public static getGaugeRootFromFilePath(filepath: string): string { while (!this.isGaugeProject(filepath)) { filepath = parse(filepath).dir; } return filepath; }
at6ue/gauge-vscode
src/project/projectFactory.ts
TypeScript
MethodDeclaration
public static getProjectByFilepath(fsPath: string): GaugeProject { let projectRoot = this.getGaugeRootFromFilePath(fsPath); return this.get(projectRoot); }
at6ue/gauge-vscode
src/project/projectFactory.ts
TypeScript
FunctionDeclaration
// The translate loader needs to know where to load i18n files // in Ionic's static asset pipeline. export function createTranslateLoader(http: HttpClient) { return new TranslateHttpLoader(http, './assets/i18n/', '.json'); }
joao-emilio/askthevet-ionic3-wso2-apimanager
src/app/app.module.ts
TypeScript
FunctionDeclaration
export function provideSettings(storage: Storage) { /** * The Settings provider takes a set of default settings for your app. * * You can add new settings options at any time. Once the settings are saved, * these values will not overwrite the saved values (this can be done manually if desired). */ r...
joao-emilio/askthevet-ionic3-wso2-apimanager
src/app/app.module.ts
TypeScript
ClassDeclaration
@NgModule({ declarations: [ MyApp ], imports: [ BrowserModule, HttpModule, HttpClientModule, TranslateModule.forRoot({ loader: { provide: TranslateLoader, useFactory: (createTranslateLoader), deps: [HttpClient] } }), IonicModule.forRoot(MyApp), ...
joao-emilio/askthevet-ionic3-wso2-apimanager
src/app/app.module.ts
TypeScript
ArrowFunction
async ([name, versionRange]) => { // Determine the minimum version that satisfies the range specified in the // If we can't determine a minimum version from the versionRange // (e.g. because it's a github url) then try to get latest let version = 'latest' if (versionRa...
stencila/dockta
src/JavascriptParser.ts
TypeScript
ClassDeclaration
/** * Dockta `Parser` class for Node.js. */ export default class JavascriptParser extends Parser { /** * Parse a folder to detect any `package.json` or `*.js` source code files * and return a `SoftwarePackage` instance */ async parse(): Promise<SoftwarePackage | null> { if (this.exists('package.json'...
stencila/dockta
src/JavascriptParser.ts
TypeScript
MethodDeclaration
/** * Parse a folder to detect any `package.json` or `*.js` source code files * and return a `SoftwarePackage` instance */ async parse(): Promise<SoftwarePackage | null> { if (this.exists('package.json')) { const data = JSON.parse(this.read('package.json')) return this.createPackage(data) }...
stencila/dockta
src/JavascriptParser.ts
TypeScript
MethodDeclaration
/** * Create a `SoftwarePackage` instance from a Node.js package meta-data object * * Meta-data for a packages dependencies is obtained from https://registry.npmjs.org/ using the * JSON API documented at https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md * and https://github.c...
stencila/dockta
src/JavascriptParser.ts
TypeScript
ArrowFunction
() => { it("returns false when the serverless.yml plugins object is not defined", () => { const service = { plugins: undefined, } as any; const result = hasWebpackPlugin(service); expect(result).toBe(false); }); it("returns false when the serverless.yml plugins object does not define the s...
bendubuisson/serverless-plugin-datadog
src/env.spec.ts
TypeScript
ArrowFunction
() => { const service = { plugins: undefined, } as any; const result = hasWebpackPlugin(service); expect(result).toBe(false); }
bendubuisson/serverless-plugin-datadog
src/env.spec.ts
TypeScript
ArrowFunction
() => { const service = { plugins: ["serverless-plugin-datadog"], } as any; const result = hasWebpackPlugin(service); expect(result).toBe(false); }
bendubuisson/serverless-plugin-datadog
src/env.spec.ts
TypeScript
ArrowFunction
() => { const service = { plugins: ["serverless-plugin-datadog", "serverless-webpack"], } as any; const result = hasWebpackPlugin(service); expect(result).toBe(true); }
bendubuisson/serverless-plugin-datadog
src/env.spec.ts
TypeScript
ArrowFunction
() => { const service = { plugins: { localPath: "", modules: ["serverless-plugin-datadog"], }, } as any; const result = hasWebpackPlugin(service); expect(result).toBe(false); }
bendubuisson/serverless-plugin-datadog
src/env.spec.ts
TypeScript
ArrowFunction
() => { const service = { plugins: { localPath: "", modules: ["serverless-plugin-datadog", "serverless-webpack"], }, } as any; const result = hasWebpackPlugin(service); expect(result).toBe(true); }
bendubuisson/serverless-plugin-datadog
src/env.spec.ts
TypeScript
ArrowFunction
() => { it("get a default configuration when none is present", () => { const result = getConfig({ custom: {} } as any); expect(result).toEqual(defaultConfiguration); }); it("gets a mixed configuration when some values are present", () => { const result = getConfig({ custom: { datadog: ...
bendubuisson/serverless-plugin-datadog
src/env.spec.ts
TypeScript
ArrowFunction
() => { const result = getConfig({ custom: {} } as any); expect(result).toEqual(defaultConfiguration); }
bendubuisson/serverless-plugin-datadog
src/env.spec.ts
TypeScript
ArrowFunction
() => { const result = getConfig({ custom: { datadog: { apiKey: "1234", logLevel: "debug", }, }, } as any); expect(result).toEqual({ addLayers: true, apiKey: "1234", flushMetricsToLogs: true, logLevel: "debug", captureLambdaPaylo...
bendubuisson/serverless-plugin-datadog
src/env.spec.ts
TypeScript
ArrowFunction
() => { const result = getConfig({ custom: { datadog: { apiKey: "1234", logLevel: "debug", addExtension: true, }, }, } as any); expect(result).toEqual({ addLayers: true, apiKey: "1234", flushMetricsToLogs: true, logLevel: "de...
bendubuisson/serverless-plugin-datadog
src/env.spec.ts
TypeScript
ArrowFunction
() => { const result = getConfig({ custom: { datadog: { apiKey: "1234", logLevel: "debug", customHandler: "/src/custom-handler.handler", }, }, } as any); expect(result).toEqual({ addLayers: true, apiKey: "1234", captureLambdaPayloa...
bendubuisson/serverless-plugin-datadog
src/env.spec.ts
TypeScript
ArrowFunction
() => { it("adds missing fields to the webpack config", () => { const service = {} as any; forceExcludeDepsFromWebpack(service); expect(service).toEqual({ custom: { webpack: { includeModules: { forceExclude: ["datadog-lambda-js", "dd-trace"], }, }, ...
bendubuisson/serverless-plugin-datadog
src/env.spec.ts
TypeScript
ArrowFunction
() => { const service = {} as any; forceExcludeDepsFromWebpack(service); expect(service).toEqual({ custom: { webpack: { includeModules: { forceExclude: ["datadog-lambda-js", "dd-trace"], }, }, }, }); }
bendubuisson/serverless-plugin-datadog
src/env.spec.ts
TypeScript
ArrowFunction
() => { const service = { custom: { webpack: { includeModules: true, }, }, } as any; forceExcludeDepsFromWebpack(service); expect(service).toEqual({ custom: { webpack: { includeModules: { forceExclude: ["datadog-lambda-js", "dd-t...
bendubuisson/serverless-plugin-datadog
src/env.spec.ts
TypeScript
ArrowFunction
() => { const service = { custom: { webpack: { includeModules: false, }, }, } as any; forceExcludeDepsFromWebpack(service); expect(service).toEqual({ custom: { webpack: { includeModules: false, }, }, }); }
bendubuisson/serverless-plugin-datadog
src/env.spec.ts
TypeScript
ArrowFunction
() => { const service = { custom: { webpack: { includeModules: { forceExclude: ["datadog-lambda-js", "dd-trace"], }, }, }, } as any; forceExcludeDepsFromWebpack(service); expect(service).toEqual({ custom: { webpack: { i...
bendubuisson/serverless-plugin-datadog
src/env.spec.ts
TypeScript
ArrowFunction
() => { const handlers: FunctionInfo[] = [ { handler: { environment: {}, events: [], }, name: "function", type: RuntimeType.NODE, }, { handler: { environment: {}, events: [], }, name: "function2", ...
bendubuisson/serverless-plugin-datadog
src/env.spec.ts
TypeScript
ArrowFunction
() => { const handlers: FunctionInfo[] = [ { handler: { environment: { DD_API_KEY: "1234", DD_FLUSH_TO_LOG: "true", DD_KMS_API_KEY: "5678", DD_LOG_LEVEL: "debug", DD_SITE: "datadoghq.eu", DD_TRACE_ENABLED: "false", ...
bendubuisson/serverless-plugin-datadog
src/env.spec.ts
TypeScript
ArrowFunction
() => { const handlers: FunctionInfo[] = [ { handler: { environment: {}, events: [], }, name: "function", type: RuntimeType.NODE, }, ]; setEnvConfiguration( { addLayers: false, apiKey: "1234", apiKMSKey: "5678", ...
bendubuisson/serverless-plugin-datadog
src/env.spec.ts
TypeScript
ArrowFunction
() => { const handlers: FunctionInfo[] = [ { handler: { environment: {}, events: [], }, name: "function", type: RuntimeType.NODE, }, ]; setEnvConfiguration( { addLayers: false, apiKey: "1234", apiKMSKey: "5678", ...
bendubuisson/serverless-plugin-datadog
src/env.spec.ts
TypeScript
ArrowFunction
() => { const handlers: FunctionInfo[] = [ { handler: { environment: {}, events: [], }, name: "function", type: RuntimeType.NODE, }, ]; setEnvConfiguration( { addLayers: false, apiKey: "1234", apiKMSKey: "5678", ...
bendubuisson/serverless-plugin-datadog
src/env.spec.ts
TypeScript
FunctionDeclaration
export function handle(req: Request): Response { return { errno: ErrCode.OK } }
hailongz/golang
features/notice/ts/cleanByTypes.less.ts
TypeScript
InterfaceDeclaration
/** * 清理消息 * @method POST */ interface Request { /** * 类型, 多个逗号分割 */ type: string /** * 消息来源ID , 多个逗号分割 */ fid: int64 /** * 消息来源项ID , 多个逗号分割 */ iid: int64 }
hailongz/golang
features/notice/ts/cleanByTypes.less.ts
TypeScript
InterfaceDeclaration
interface Response extends BaseResponse { }
hailongz/golang
features/notice/ts/cleanByTypes.less.ts
TypeScript
ArrowFunction
(): void => { const { lowerBound, topOffset = 0 } = this.props; const { isAboveFold, containerRect } = this.state; const nextContainerRect = this.getContainerRect(); if (window.pageYOffset + topOffset >= nextContainerRect.top) { if (!isAboveFold) { this.setState({ isAboveFold: true, }); }...
maquino96/lucid
src/components/StickySection/StickySection.tsx
TypeScript
ArrowFunction
(): IContainerRect => { const containerRect = getAbsoluteBoundingClientRect( this.scrollContainer.current as HTMLElement ); const stickyRect = ( this.stickySection.current as HTMLElement ).getBoundingClientRect(); const frameRect = ( this.stickyFrame.current as HTMLElement ).getBoundingClientRect(...
maquino96/lucid
src/components/StickySection/StickySection.tsx
TypeScript
ArrowFunction
(): void => { this.setState({ containerRect: this.getContainerRect(), }); this.handleScroll(); }
maquino96/lucid
src/components/StickySection/StickySection.tsx
TypeScript
ClassDeclaration
class StickySection extends React.Component< IStickySectionProps, IStickySectionState, {} > { static displayName = 'StickySection'; static peek = { description: ` \`StickySection\` can be wrapped around any content to make it _stick_ to the top edge of the screen when a user scrolls beyond its initial ...
maquino96/lucid
src/components/StickySection/StickySection.tsx
TypeScript
InterfaceDeclaration
interface IStickySectionProps extends StandardProps, React.DetailedHTMLProps< React.HTMLAttributes<HTMLDivElement>, HTMLDivElement > { /** Pixel value from the top of the document. When scrolled passed, the * sticky header is no longer sticky, and renders normally. */ lowerBound?: number; /** Width of...
maquino96/lucid
src/components/StickySection/StickySection.tsx
TypeScript
InterfaceDeclaration
interface IContainerRect extends Omit<ClientRect, 'x' | 'y' | 'toJSON'> { scrollWidth: number; frameLeft: number; }
maquino96/lucid
src/components/StickySection/StickySection.tsx
TypeScript
InterfaceDeclaration
interface IStickySectionState { isAboveFold: boolean; containerRect: IContainerRect; }
maquino96/lucid
src/components/StickySection/StickySection.tsx
TypeScript
MethodDeclaration
componentDidMount(): void { setTimeout((): void => { this.setState({ containerRect: this.getContainerRect(), }); this.handleScroll(); }, 1); window.addEventListener('scroll', this.handleScroll, true); }
maquino96/lucid
src/components/StickySection/StickySection.tsx
TypeScript
MethodDeclaration
componentWillUnmount(): void { window.removeEventListener('scroll', this.handleScroll, true); }
maquino96/lucid
src/components/StickySection/StickySection.tsx
TypeScript
MethodDeclaration
render(): React.ReactNode { const { children, className, style, topOffset = 0, viewportWidth, ...passThroughs } = this.props; const { isAboveFold, containerRect } = this.state; return ( <div {...omitProps<IStickySectionProps>( passThroughs, undefined, Object.keys(Stick...
maquino96/lucid
src/components/StickySection/StickySection.tsx
TypeScript
MethodDeclaration
cx('&', className)
maquino96/lucid
src/components/StickySection/StickySection.tsx
TypeScript
ClassDeclaration
@NgModule({ declarations: [LayoutComponent, HeaderComponent, FooterComponent], imports: [ CommonModule ], exports: [LayoutComponent] }) export class UiModule { }
Rusty-1/Test4Shaun
src/app/ui/ui.module.ts
TypeScript
InterfaceDeclaration
export interface Router<T> { add(method: string, path: string, handler: T): void match(method: string, path: string): Result<T> | null }
charl-kruger/hono
src/router.ts
TypeScript
InterfaceDeclaration
export interface Result<T> { handlers: T[] params: Record<string, string> }
charl-kruger/hono
src/router.ts
TypeScript
ClassDeclaration
class TestStack extends cdk.Stack { constructor(scope: cdk.App, id: string) { super(scope, id); const bucket = new s3.Bucket(this, 'MyBucket'); const handler1 = new lambda.Function(this, 'MyFunction1', { runtime: lambda.Runtime.NODEJS_14_X, handler: 'index.handler', code: lambda.Code.f...
CarlosDomingues/aws-cdk
packages/@aws-cdk/aws-s3objectlambda/test/integ.s3objectlambda.ts
TypeScript
ArrowFunction
(params: Params) => { this.deviceId = params['deviceid']; if (Number.isNaN(this.deviceId)) { alert('Missing Device ID'); } this.programId = params['programid']; if (Number.isNaN(this.programId)) { alert('Missing Program ID'); } this.newSequence = params['sequen...
damientiede/IrrigationCentral
WebClient/src/app/step/step.component.ts
TypeScript
ArrowFunction
(d: IDevice) => { this.device = d; this.service.getSolenoids(this.deviceId).subscribe((solenoids: ISolenoid[]) => { this.solenoids = []; for (let s of solenoids) { if (s.id !== this.device.PumpSolenoidId) { this.solenoids.push(s); } } if (this...
damientiede/IrrigationCentral
WebClient/src/app/step/step.component.ts
TypeScript
ArrowFunction
(solenoids: ISolenoid[]) => { this.solenoids = []; for (let s of solenoids) { if (s.id !== this.device.PumpSolenoidId) { this.solenoids.push(s); } } if (this.stepId === 'new') { this.step = new IStep(-1, this.newSequence, 60, 1, 'solenoidName', ...
damientiede/IrrigationCentral
WebClient/src/app/step/step.component.ts
TypeScript
ArrowFunction
(step: IStep) => { this.step = step; this.newSequence = step.Sequence; for (let s of this.solenoids) { if (s.id === this.step.SolenoidId) { this.stepSolenoid = s; break; } } this.lo...
damientiede/IrrigationCentral
WebClient/src/app/step/step.component.ts
TypeScript
ArrowFunction
() => { this.loadProgram(); }
damientiede/IrrigationCentral
WebClient/src/app/step/step.component.ts
TypeScript
ArrowFunction
error => () => { console.log('Something went wrong...'); this.toastr.error('Something went wrong...', 'Damn'); }
damientiede/IrrigationCentral
WebClient/src/app/step/step.component.ts
TypeScript
ArrowFunction
() => { console.log('Something went wrong...'); this.toastr.error('Something went wrong...', 'Damn'); }
damientiede/IrrigationCentral
WebClient/src/app/step/step.component.ts
TypeScript
ArrowFunction
() => { console.log('Success'); // this.toastr.success('Changes saved' ); }
damientiede/IrrigationCentral
WebClient/src/app/step/step.component.ts
TypeScript
ArrowFunction
(s: IStep) => { console.log(s); this.step = s; for (let s of this.solenoids) { if (s.id === this.step.SolenoidId) { this.stepSolenoid = s; break; } } this.loadProgram(); }
damientiede/IrrigationCentral
WebClient/src/app/step/step.component.ts
TypeScript
ArrowFunction
error => () => { console.log('Something went wrong...'); this.toastr.error('Something went wrong...', 'Damn'); }
damientiede/IrrigationCentral
WebClient/src/app/step/step.component.ts
TypeScript
ArrowFunction
() => { console.log('Something went wrong...'); this.toastr.error('Something went wrong...', 'Damn'); }
damientiede/IrrigationCentral
WebClient/src/app/step/step.component.ts
TypeScript
ArrowFunction
() => { console.log('Success'); //this.toastr.success('Changes saved' ); this.loadProgram(); }
damientiede/IrrigationCentral
WebClient/src/app/step/step.component.ts
TypeScript
ArrowFunction
(s: IStep) => { console.log('subscribe()'); this.loadProgram(); }
damientiede/IrrigationCentral
WebClient/src/app/step/step.component.ts
TypeScript
ArrowFunction
() => { console.log('Success'); this.loadProgram(); //this.toastr.success('Changes saved' ); }
damientiede/IrrigationCentral
WebClient/src/app/step/step.component.ts
TypeScript
ArrowFunction
error => () => { console.log('Something went wrong...'); this.toastr.error('Something went wrong...', 'Damn'); }
damientiede/IrrigationCentral
WebClient/src/app/step/step.component.ts
TypeScript
ArrowFunction
() => { console.log('Something went wrong...'); this.toastr.error('Something went wrong...', 'Damn'); }
damientiede/IrrigationCentral
WebClient/src/app/step/step.component.ts
TypeScript
ArrowFunction
() => { console.log('command sent'); this.router.navigate([`/device/${this.deviceId}/programs/${this.programId}`]); // this.toastr.success('Command sent' ); }
damientiede/IrrigationCentral
WebClient/src/app/step/step.component.ts
TypeScript
ClassDeclaration
@Component({ selector: 'app-step', templateUrl: './step.component.html', styleUrls: ['./step.component.css'] }) export class StepComponent implements OnInit { deviceId: number; device: IDevice; programId: number; newSequence = 1; stepId: any; step: IStep; solenoids: ISolenoid[]; stepSolenoid: IS...
damientiede/IrrigationCentral
WebClient/src/app/step/step.component.ts
TypeScript
MethodDeclaration
ngOnInit() { // extract route params this.route.params.subscribe((params: Params) => { this.deviceId = params['deviceid']; if (Number.isNaN(this.deviceId)) { alert('Missing Device ID'); } this.programId = params['programid']; if (Number.isNaN(this.programId)) { ale...
damientiede/IrrigationCentral
WebClient/src/app/step/step.component.ts
TypeScript
MethodDeclaration
GetData() { this.service.getDevice(this.deviceId).subscribe((d: IDevice) => { this.device = d; this.service.getSolenoids(this.deviceId).subscribe((solenoids: ISolenoid[]) => { this.solenoids = []; for (let s of solenoids) { if (s.id !== this.device.PumpSolenoidId) { ...
damientiede/IrrigationCentral
WebClient/src/app/step/step.component.ts
TypeScript
MethodDeclaration
back() { this.router.navigate([`device/${this.deviceId}/programs/${this.programId}`]); }
damientiede/IrrigationCentral
WebClient/src/app/step/step.component.ts
TypeScript
MethodDeclaration
delete() { this.service.deleteStep(this.step) .subscribe(() => { this.loadProgram(); }, error => () => { console.log('Something went wrong...'); this.toastr.error('Something went wrong...', 'Damn'); }, () => { console.log('Success'); // this.toastr.success('Changes...
damientiede/IrrigationCentral
WebClient/src/app/step/step.component.ts
TypeScript
MethodDeclaration
save() { this.step.Sequence = this.newSequence; this.step.SolenoidId = this.stepSolenoid.id; this.step.SolenoidName = this.stepSolenoid.Name; this.step.RequiresPump = this.stepSolenoid.RequiresPump; console.log(this.step); if (this.step.id === -1) { this.step.ProgramId = thi...
damientiede/IrrigationCentral
WebClient/src/app/step/step.component.ts
TypeScript
MethodDeclaration
loadProgram() { const cmd = new ICommand( 0, // id 'LoadProgram', // commandType `${this.programId}`, // params new Date, // issued null, // actioned this.deviceId, // deviceId new Date, // createdAt null // updatedAt ); this.service.sendCommand(cmd) ....
damientiede/IrrigationCentral
WebClient/src/app/step/step.component.ts
TypeScript
ArrowFunction
button => { if (this.buttons.indexOf(button) !== -1) { this.onDidTriggerButtonEmitter.fire(button); } }
DalavanCloud/vscode
src/vs/workbench/browser/parts/quickinput/quickInput.ts
TypeScript
ArrowFunction
() => { if (this.visible) { this.ui.progressBar.infinite(); } }
DalavanCloud/vscode
src/vs/workbench/browser/parts/quickinput/quickInput.ts
TypeScript