type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
FunctionDeclaration
function Home() { const context = useDocusaurusContext(); const { siteConfig } = context; return ( <Layout description={siteConfig.tagline} title="Safely render HTML in React"> <header className={clsx('hero hero--primary', styles.heroBanner)}> <div className="container"> <h1 className="hero__title">{...
milesj/react-interpose
website/src/pages/index.tsx
TypeScript
ArrowFunction
(props, idx) => ( // eslint-disable-next-line react/no-array-index-key <Feature key={idx}
milesj/react-interpose
website/src/pages/index.tsx
TypeScript
InterfaceDeclaration
interface FeatureProps { title: string; description: React.ReactNode; imageUrl?: string; }
milesj/react-interpose
website/src/pages/index.tsx
TypeScript
MethodDeclaration
clsx('col col--4', styles
milesj/react-interpose
website/src/pages/index.tsx
TypeScript
MethodDeclaration
useBaseUrl('docs/')
milesj/react-interpose
website/src/pages/index.tsx
TypeScript
ClassDeclaration
@Injectable() export class RedisService { private _client: RedisClient; get client(): RedisClient { return this._client; } constructor(private readonly apiConfigModule: ApiConfigService) { this._client = createClient({ url: this.apiConfigModule.redisUrl }); } }
thesoundfromthesky/play-with-nestjs
src/feature/auth/services/redis.service.ts
TypeScript
ArrowFunction
() => { const { items, addTodoItem, loadTodoItemById } = useTodo(); const todoInput = useRef<HTMLInputElement>(null); const todoIdInput = useRef<HTMLInputElement>(null); const onSubmit = () => { const todoItemValue = todoInput?.current?.value; if (todoItemValue) { addTodoItem(todoItemValue); ...
simplify-apps/simplify-redux-app
example/src/App.tsx
TypeScript
ArrowFunction
() => { const todoItemValue = todoInput?.current?.value; if (todoItemValue) { addTodoItem(todoItemValue); } }
simplify-apps/simplify-redux-app
example/src/App.tsx
TypeScript
ArrowFunction
async () => { const todoItemId = todoIdInput?.current?.value; if (todoItemId) { loadTodoItemById(todoItemId); } }
simplify-apps/simplify-redux-app
example/src/App.tsx
TypeScript
ArrowFunction
(it: string, index: number) => ( <p key={index}
simplify-apps/simplify-redux-app
example/src/App.tsx
TypeScript
ArrowFunction
secs => meta => setTimeout(meta.commit, secs)
KevCJones/kaop-ts
test/advice-merge.spec.ts
TypeScript
ArrowFunction
meta => setTimeout(meta.commit, secs)
KevCJones/kaop-ts
test/advice-merge.spec.ts
TypeScript
ArrowFunction
() => { beforeAll(() => { carInstance = new Car() }) it("Delay advice should stop the execution", done => { const time = Date.now() carInstance.startEngine(() => { expect(Date.now() - time).toBeGreaterThan(3000) expect(Date.now() - time).toBeLessThan(3100) done() }) }) }
KevCJones/kaop-ts
test/advice-merge.spec.ts
TypeScript
ArrowFunction
() => { carInstance = new Car() }
KevCJones/kaop-ts
test/advice-merge.spec.ts
TypeScript
ArrowFunction
done => { const time = Date.now() carInstance.startEngine(() => { expect(Date.now() - time).toBeGreaterThan(3000) expect(Date.now() - time).toBeLessThan(3100) done() }) }
KevCJones/kaop-ts
test/advice-merge.spec.ts
TypeScript
ArrowFunction
() => { expect(Date.now() - time).toBeGreaterThan(3000) expect(Date.now() - time).toBeLessThan(3100) done() }
KevCJones/kaop-ts
test/advice-merge.spec.ts
TypeScript
ClassDeclaration
class Car { @someBehavior startEngine (cbk) { cbk() } }
KevCJones/kaop-ts
test/advice-merge.spec.ts
TypeScript
MethodDeclaration
@someBehavior startEngine (cbk) { cbk() }
KevCJones/kaop-ts
test/advice-merge.spec.ts
TypeScript
ArrowFunction
photo => this.photo = ({ ...photo, dateuploaded: (new Date(Number(photo.dateuploaded) * 1000).toLocaleDateString('fr-FR')) })
Shr0Om/ProjetAngular
src/app/image-details/image-details.component.ts
TypeScript
ClassDeclaration
@Component({ selector: 'app-image-details', templateUrl: './image-details.component.html', styleUrls: ['./image-details.component.less'], providers: [ApiService] }) export class ImageDetailsComponent implements OnInit { photo: any = { title: {}, owner: {}, description: {} }; constructor( ...
Shr0Om/ProjetAngular
src/app/image-details/image-details.component.ts
TypeScript
InterfaceDeclaration
export interface ImageDetailData { title: String; id: String; }
Shr0Om/ProjetAngular
src/app/image-details/image-details.component.ts
TypeScript
MethodDeclaration
ngOnInit(): void { this.api.getImageDetails(this.data.id).subscribe(photo => this.photo = ({ ...photo, dateuploaded: (new Date(Number(photo.dateuploaded) * 1000).toLocaleDateString('fr-FR')) })); }
Shr0Om/ProjetAngular
src/app/image-details/image-details.component.ts
TypeScript
MethodDeclaration
getUrl() { return this.photo['server'] ? convertImageUrl({photo: this.photo, resolution: Resolution.large}) : ''; }
Shr0Om/ProjetAngular
src/app/image-details/image-details.component.ts
TypeScript
ArrowFunction
(update: Partial<Environment>) => { this.environment = Object.assign({}, this.environment, update); }
AMoo-Miki/OpenSearch-Dashboards
src/plugins/home/public/services/environment/environment.ts
TypeScript
ClassDeclaration
export class EnvironmentService { private environment = { cloud: false, apmUi: false, ml: false, }; public setup() { return { /** * Update the environment to influence how the home app is presenting available features. * This API should not be extended for new features and wi...
AMoo-Miki/OpenSearch-Dashboards
src/plugins/home/public/services/environment/environment.ts
TypeScript
InterfaceDeclaration
/* * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to * this file be licensed under the Apache-2.0 license or a * compatible open source license. */ /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distri...
AMoo-Miki/OpenSearch-Dashboards
src/plugins/home/public/services/environment/environment.ts
TypeScript
TypeAliasDeclaration
export type EnvironmentServiceSetup = ReturnType<EnvironmentService['setup']>;
AMoo-Miki/OpenSearch-Dashboards
src/plugins/home/public/services/environment/environment.ts
TypeScript
MethodDeclaration
public setup() { return { /** * Update the environment to influence how the home app is presenting available features. * This API should not be extended for new features and will be removed in future versions * in favor of display specific extension apis. * @deprecated * @p...
AMoo-Miki/OpenSearch-Dashboards
src/plugins/home/public/services/environment/environment.ts
TypeScript
MethodDeclaration
public getEnvironment() { return this.environment; }
AMoo-Miki/OpenSearch-Dashboards
src/plugins/home/public/services/environment/environment.ts
TypeScript
ArrowFunction
err => FileuploadService.handleError(err)
OliverChmelicky/litter3
ui/src/app/services/fileupload/fileupload.service.ts
TypeScript
ClassDeclaration
@Injectable({ providedIn: 'root' }) export class FileuploadService { apiUrl: string; constructor( private http: HttpClient, ) { this.apiUrl = ApisModel.apiUrl } uploadUserImage(fd : FormData) { const url = `${ApisModel.apiUrl}/${ApisModel.fileupload}/${ApisModel.user}/upload`; return this...
OliverChmelicky/litter3
ui/src/app/services/fileupload/fileupload.service.ts
TypeScript
MethodDeclaration
uploadUserImage(fd : FormData) { const url = `${ApisModel.apiUrl}/${ApisModel.fileupload}/${ApisModel.user}/upload`; return this.http.post(url, fd).pipe( catchError(err => FileuploadService.handleError(err)) ); }
OliverChmelicky/litter3
ui/src/app/services/fileupload/fileupload.service.ts
TypeScript
MethodDeclaration
uploadSocietyImage(fd: FormData, societyId: string): Observable<any> { const url = `${ApisModel.apiUrl}/${ApisModel.fileupload}/${ApisModel.society}/${societyId}`; return this.http.post(url, fd).pipe( catchError(err => FileuploadService.handleError(err)) ); }
OliverChmelicky/litter3
ui/src/app/services/fileupload/fileupload.service.ts
TypeScript
MethodDeclaration
uploadTrashImages(fd: FormData, trashId: string): Observable<any> { const url = `${ApisModel.apiUrl}/${ApisModel.fileupload}/${ApisModel.trash}/${trashId}`; return this.http.post(url, fd).pipe( catchError(err => FileuploadService.handleError(err)) ); }
OliverChmelicky/litter3
ui/src/app/services/fileupload/fileupload.service.ts
TypeScript
MethodDeclaration
uploadCollectionImages(fd: FormData, collectionId: string): Observable<any> { const url = `${ApisModel.apiUrl}/${ApisModel.fileupload}/${ApisModel.collection}/${collectionId}`; return this.http.post(url, fd).pipe( catchError(err => FileuploadService.handleError(err)) ); }
OliverChmelicky/litter3
ui/src/app/services/fileupload/fileupload.service.ts
TypeScript
MethodDeclaration
deleteUserImage() { const url = `${this.apiUrl}/${ApisModel.fileupload}/${ApisModel.user}/delete`; return this.http.delete(url).pipe( catchError(err => FileuploadService.handleError(err)) ); }
OliverChmelicky/litter3
ui/src/app/services/fileupload/fileupload.service.ts
TypeScript
MethodDeclaration
deleteSocietyImage() { }
OliverChmelicky/litter3
ui/src/app/services/fileupload/fileupload.service.ts
TypeScript
MethodDeclaration
deleteTrashImages() { }
OliverChmelicky/litter3
ui/src/app/services/fileupload/fileupload.service.ts
TypeScript
MethodDeclaration
deleteCollectionImagesFromEvent(images: string[], eventId: string, eventPickerModel: EventPickerModel) { const imagesQueryParam = images.join(); const url = `${this.apiUrl}/${ApisModel.fileupload}/${ApisModel.collection}/delete?ids=${imagesQueryParam}event=${eventId}&picker=${eventPickerModel.Id}&asSociety=${e...
OliverChmelicky/litter3
ui/src/app/services/fileupload/fileupload.service.ts
TypeScript
MethodDeclaration
deleteCollectionImagesFromRandom(images: string[], collectionId: string) { const imagesQueryParam = images.join(); const url = `${this.apiUrl}/${ApisModel.fileupload}/${ApisModel.collection}/delete/${collectionId}?ids=${imagesQueryParam}`; return this.http.delete(url).pipe( catchError(err => Fileuplo...
OliverChmelicky/litter3
ui/src/app/services/fileupload/fileupload.service.ts
TypeScript
MethodDeclaration
private static handleError<T>(error: HttpErrorResponse, result?: T) { if (error.error instanceof ErrorEvent) { // A client-side or network error occurred. Handle it accordingly. console.error('An error occurred:', error.error.message); } else { // The backend returned an unsuccessful response...
OliverChmelicky/litter3
ui/src/app/services/fileupload/fileupload.service.ts
TypeScript
InterfaceDeclaration
export interface Mnemonic { phrase: MnemonicPhrase; password?: MnemonicPassword; }
0xfoobar/truffle
packages/hdwallet-provider/src/constructor/types.ts
TypeScript
TypeAliasDeclaration
/* * type aliases for better readability around legacy positional arguments */ export type MnemonicPhrase = string;
0xfoobar/truffle
packages/hdwallet-provider/src/constructor/types.ts
TypeScript
TypeAliasDeclaration
export type MnemonicPassword = string;
0xfoobar/truffle
packages/hdwallet-provider/src/constructor/types.ts
TypeScript
TypeAliasDeclaration
export type Provider = any;
0xfoobar/truffle
packages/hdwallet-provider/src/constructor/types.ts
TypeScript
TypeAliasDeclaration
export type ProviderUrl = string;
0xfoobar/truffle
packages/hdwallet-provider/src/constructor/types.ts
TypeScript
TypeAliasDeclaration
export type ProviderOrUrl = Provider | ProviderUrl;
0xfoobar/truffle
packages/hdwallet-provider/src/constructor/types.ts
TypeScript
TypeAliasDeclaration
export type AddressIndex = number;
0xfoobar/truffle
packages/hdwallet-provider/src/constructor/types.ts
TypeScript
TypeAliasDeclaration
export type NumberOfAddresses = number;
0xfoobar/truffle
packages/hdwallet-provider/src/constructor/types.ts
TypeScript
TypeAliasDeclaration
export type PollingInterval = number;
0xfoobar/truffle
packages/hdwallet-provider/src/constructor/types.ts
TypeScript
TypeAliasDeclaration
export type ShareNonce = boolean;
0xfoobar/truffle
packages/hdwallet-provider/src/constructor/types.ts
TypeScript
TypeAliasDeclaration
export type DerivationPath = string;
0xfoobar/truffle
packages/hdwallet-provider/src/constructor/types.ts
TypeScript
TypeAliasDeclaration
export type ChainId = number;
0xfoobar/truffle
packages/hdwallet-provider/src/constructor/types.ts
TypeScript
TypeAliasDeclaration
export type Hardfork = string;
0xfoobar/truffle
packages/hdwallet-provider/src/constructor/types.ts
TypeScript
TypeAliasDeclaration
export type ChainSettings = { hardfork?: Hardfork; chainId?: ChainId; };
0xfoobar/truffle
packages/hdwallet-provider/src/constructor/types.ts
TypeScript
FunctionDeclaration
export function fiboEvenSum(n: number): number { let [i, j] = [1, 2]; let sum = 0; while (i < n) { if (i % 2 === 0) { sum += i; } [i, j] = [j, i + j]; } return sum; }
desi-belokonska/project-euler
02_even-fibonacci-numbers/index.ts
TypeScript
ClassDeclaration
@Component({ selector: 'app-comp-3756', templateUrl: './comp-3756.component.html', styleUrls: ['./comp-3756.component.css'] }) export class Comp3756Component implements OnInit { constructor() { } ngOnInit() { } }
angular/angular-cli-stress-test
src/app/components/comp-3756/comp-3756.component.ts
TypeScript
FunctionDeclaration
export declare function writeBinaryFile(aFile: PathOrFileDescriptor, anObject: PlistJsObj, callback: callbackFn<void>): void;
1-8192/DogsBestFriendApp
node_modules/simple-plist/dist/writeBinaryFile.d.ts
TypeScript
FunctionDeclaration
export declare function writeBinaryFile(aFile: PathOrFileDescriptor, anObject: PlistJsObj, options: WriteFileOptions, callback: callbackFn<void>): void;
1-8192/DogsBestFriendApp
node_modules/simple-plist/dist/writeBinaryFile.d.ts
TypeScript
FunctionDeclaration
function handleLinkToWhatsapp(){ api.post('connections', { user_id: teacher.id, }); Linking.openURL(`whatsapp://send?phone=${teacher.whatsapp}`) }
David-Ackerman/NLW-Proffy-Mobile
src/components/TeacherItem/index.tsx
TypeScript
FunctionDeclaration
async function handleToogleFavorite(){ const favorites = await AsyncStorage.getItem('favorites'); let favoritesArray =[]; if (favorites){ favoritesArray = JSON.parse(favorites); } if(isFavorited){ const favoriteIndex = favoritesArray.findIndex((teacherIt...
David-Ackerman/NLW-Proffy-Mobile
src/components/TeacherItem/index.tsx
TypeScript
ArrowFunction
({teacher, favorited}) => { const [isFavorited, setIsFavorited] = useState(favorited); function handleLinkToWhatsapp(){ api.post('connections', { user_id: teacher.id, }); Linking.openURL(`whatsapp://send?phone=${teacher.whatsapp}`) } async function handleTo...
David-Ackerman/NLW-Proffy-Mobile
src/components/TeacherItem/index.tsx
TypeScript
ArrowFunction
(teacherItem: Teacher) => { return teacherItem.id === teacher.id; }
David-Ackerman/NLW-Proffy-Mobile
src/components/TeacherItem/index.tsx
TypeScript
InterfaceDeclaration
export interface Teacher { id: number; avatar: string; bio: string; cost: number; name: string; subject: string; whatsapp: string; }
David-Ackerman/NLW-Proffy-Mobile
src/components/TeacherItem/index.tsx
TypeScript
InterfaceDeclaration
interface TeacherItemProps{ teacher: Teacher; favorited: boolean; }
David-Ackerman/NLW-Proffy-Mobile
src/components/TeacherItem/index.tsx
TypeScript
MethodDeclaration
isFavorited ? <Image source={unfavoriteIcon}
David-Ackerman/NLW-Proffy-Mobile
src/components/TeacherItem/index.tsx
TypeScript
ArrowFunction
() => { let component: ExampleListComponent; let fixture: ComponentFixture<ExampleListComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ ExampleListComponent ] }) .compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(Example...
kayvanbree/contexr
src/app/modules/example-list/example-list/example-list.component.spec.ts
TypeScript
ArrowFunction
() => { TestBed.configureTestingModule({ declarations: [ ExampleListComponent ] }) .compileComponents(); }
kayvanbree/contexr
src/app/modules/example-list/example-list/example-list.component.spec.ts
TypeScript
ArrowFunction
() => { fixture = TestBed.createComponent(ExampleListComponent); component = fixture.componentInstance; fixture.detectChanges(); }
kayvanbree/contexr
src/app/modules/example-list/example-list/example-list.component.spec.ts
TypeScript
ClassDeclaration
class MenuExampleTabShorthand extends React.Component { render() { return ( <Menu defaultActiveIndex={0} items={items} underlined primary accessibility={tabListBehavior} aria-label="Today's events" /> ) } }
AnastasiyaSarmant/fluent-ui-react
docs/src/examples/components/Menu/Usage/MenuExampleTabList.shorthand.tsx
TypeScript
MethodDeclaration
render() { return ( <Menu defaultActiveIndex={0} items={items} underlined primary accessibility={tabListBehavior} aria-label="Today's events" /> ) }
AnastasiyaSarmant/fluent-ui-react
docs/src/examples/components/Menu/Usage/MenuExampleTabList.shorthand.tsx
TypeScript
ArrowFunction
() => ({ id: props.datasetId })
METASPACE2020/METASPACE
metaspace/webapp/src/modules/Datasets/common/VisibilityBadge.tsx
TypeScript
ArrowFunction
() => { queryOptions.enabled = true }
METASPACE2020/METASPACE
metaspace/webapp/src/modules/Datasets/common/VisibilityBadge.tsx
TypeScript
ArrowFunction
() => { if (query.result.value != null) { const { datasetVisibility, currentUser } = query.result.value if (datasetVisibility != null) { const { submitter, group, projects } = datasetVisibility const submitterName = currentUser && submitter.id === currentUser.id ? 'you' : subm...
METASPACE2020/METASPACE
metaspace/webapp/src/modules/Datasets/common/VisibilityBadge.tsx
TypeScript
ArrowFunction
() => ( <Popover class="ml-1"
METASPACE2020/METASPACE
metaspace/webapp/src/modules/Datasets/common/VisibilityBadge.tsx
TypeScript
MethodDeclaration
setup(props) { const queryOptions = reactive({ enabled: false }) const queryVars = computed(() => ({ id: props.datasetId })) const query = useQuery<DatasetVisibilityQuery>(datasetVisibilityQuery, queryVars, queryOptions) const loadVisibility = () => { queryOptions.enabled = true } const visibility...
METASPACE2020/METASPACE
metaspace/webapp/src/modules/Datasets/common/VisibilityBadge.tsx
TypeScript
ClassDeclaration
/** * Class for managing encrypting and decrypting private auth information. */ export declare class Crypto extends AsyncOptionalCreatable<CryptoOptions> { private _key; private options; private messages; private noResetOnClose; /** * Constructor * **Do not directly construct instances o...
oswin-correa/sfdx-plugins
node_modules/@salesforce/command/node_modules/@salesforce/core/lib/crypto.d.ts
TypeScript
InterfaceDeclaration
interface CryptoOptions { keychain?: KeyChain; platform?: string; retryStatus?: string; noResetOnClose?: boolean; }
oswin-correa/sfdx-plugins
node_modules/@salesforce/command/node_modules/@salesforce/core/lib/crypto.d.ts
TypeScript
MethodDeclaration
/** * Encrypts text. Returns the encrypted string or undefined if no string was passed. * @param text The text to encrypt. */ encrypt(text?: string): Optional<string>;
oswin-correa/sfdx-plugins
node_modules/@salesforce/command/node_modules/@salesforce/core/lib/crypto.d.ts
TypeScript
MethodDeclaration
/** * Decrypts text. * @param text The text to decrypt. */ decrypt(text?: string): Optional<string>;
oswin-correa/sfdx-plugins
node_modules/@salesforce/command/node_modules/@salesforce/core/lib/crypto.d.ts
TypeScript
MethodDeclaration
/** * Clears the crypto state. This should be called in a finally block. */ close(): void;
oswin-correa/sfdx-plugins
node_modules/@salesforce/command/node_modules/@salesforce/core/lib/crypto.d.ts
TypeScript
MethodDeclaration
/** * Initialize async components. */ protected init(): Promise<void>;
oswin-correa/sfdx-plugins
node_modules/@salesforce/command/node_modules/@salesforce/core/lib/crypto.d.ts
TypeScript
FunctionDeclaration
export function IsIn15MinuteInterval(): PropertyDecorator { return function (object: object, propertyName: string) { registerDecorator({ propertyName, name: 'isIn15MinuteInterval', target: object.constructor, options: { message: `${propertyName} must be in 15-minute intervals` }, va...
claudealdric/rest-api
src/validators/is-in-15-minute-interval.validator.ts
TypeScript
MethodDeclaration
validate(input: unknown): boolean { return ( typeof input === 'string' && new Date(input).getMinutes() % 15 === 0 ); }
claudealdric/rest-api
src/validators/is-in-15-minute-interval.validator.ts
TypeScript
ArrowFunction
(name: string, databaseField?: string) => new ArrayField(name, databaseField)
inidaname/tensei
packages/common/src/fields/Array.ts
TypeScript
ClassDeclaration
export class ArrayField extends Field { protected arrayOf: ArrayTypes = 'string' public component = { form: 'Array', index: 'Array', detail: 'Array' } constructor(name: string, databaseField?: string) { super(name, databaseField) this.property.type = 'json' this.rules('array') t...
inidaname/tensei
packages/common/src/fields/Array.ts
TypeScript
TypeAliasDeclaration
type ArrayTypes = 'string' | 'number' | 'decimal' | 'date'
inidaname/tensei
packages/common/src/fields/Array.ts
TypeScript
MethodDeclaration
public of(arrayOf: ArrayTypes) { this.arrayOf = arrayOf this.arrayValidationRules = [] this.arrayRules( { string: 'string', decimal: 'number', date: 'date', number: 'number' }[arrayOf] ) return this }
inidaname/tensei
packages/common/src/fields/Array.ts
TypeScript
MethodDeclaration
public serialize() { return { ...super.serialize(), arrayOf: this.arrayOf } }
inidaname/tensei
packages/common/src/fields/Array.ts
TypeScript
FunctionDeclaration
export function Get(route: string) { return function (target: any, propertyKey: string, descriptor: PropertyDescriptor) { if (!target["__methods__"]) target["__methods__"] = [] target["__methods__"].push({ method: "GET", route: route, function: target[propertyKey...
betagouv/api-subventions-asso
packages/front/src/decorators/http.methods.decorator.ts
TypeScript
FunctionDeclaration
export function Post(route: string) { return function (target: any, propertyKey: string, descriptor: PropertyDescriptor) { if (!target["__methods__"]) target["__methods__"] = [] target["__methods__"].push({ method: "POST", route: route, function: target[propertyK...
betagouv/api-subventions-asso
packages/front/src/decorators/http.methods.decorator.ts
TypeScript
FunctionDeclaration
export function Put(route: string) { return function (target: any, propertyKey: string, descriptor: PropertyDescriptor) { if (!target["__methods__"]) target["__methods__"] = [] target["__methods__"].push({ method: "PUT", route: route, function: target[propertyKey...
betagouv/api-subventions-asso
packages/front/src/decorators/http.methods.decorator.ts
TypeScript
FunctionDeclaration
export function Delete(route: string) { return function (target: any, propertyKey: string, descriptor: PropertyDescriptor) { if (!target["__methods__"]) target["__methods__"] = [] target["__methods__"].push({ method: "DELETE", route: route, function: target[prope...
betagouv/api-subventions-asso
packages/front/src/decorators/http.methods.decorator.ts
TypeScript
ClassDeclaration
/** Configure undesired operator variants */ export class PreferredCompareOperatorConf extends BasicRuleConfig { /** Operators which are not allowed */ public badOperators: string[] = ["EQ", "><", "NE", "GE", "GT", "LT", "LE"]; }
Steve192/abaplint
src/rules/preferred_compare_operator.ts
TypeScript
ClassDeclaration
export class PreferredCompareOperator extends ABAPRule { private conf = new PreferredCompareOperatorConf(); public getKey(): string { return "preferred_compare_operator"; } private getDescription(operator: string): string { return "Compare operator \"" + operator + "\" not preferred"; } public ...
Steve192/abaplint
src/rules/preferred_compare_operator.ts
TypeScript
MethodDeclaration
public getKey(): string { return "preferred_compare_operator"; }
Steve192/abaplint
src/rules/preferred_compare_operator.ts
TypeScript
MethodDeclaration
private getDescription(operator: string): string { return "Compare operator \"" + operator + "\" not preferred"; }
Steve192/abaplint
src/rules/preferred_compare_operator.ts
TypeScript
MethodDeclaration
public runParsed(file: ABAPFile) { const issues: Issue[] = []; const struc = file.getStructure(); if (struc === undefined) { return []; } const operators = struc.findAllExpressions(Expressions.CompareOperator).concat( struc.findAllExpressions(Expressions.SQLCompareOperator)); for ...
Steve192/abaplint
src/rules/preferred_compare_operator.ts
TypeScript
MethodDeclaration
public getConfig() { return this.conf; }
Steve192/abaplint
src/rules/preferred_compare_operator.ts
TypeScript
MethodDeclaration
public setConfig(conf: PreferredCompareOperatorConf) { this.conf = conf; }
Steve192/abaplint
src/rules/preferred_compare_operator.ts
TypeScript