type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
MethodDeclaration |
onClickAddNaming() {
const modalRef = this.modalService.open(ModalNamingComponent);
modalRef.result.then((result) => {
this.toastService.showSuccess(`Le nommage ${result.name} a bien été ajouté`);
this.applicationChanged(this.applicationSelected);
}, (reason) => {
if (reason.message !== u... | dtrouillet/ebad-front | src/app/manage-naming/manage-naming.component.ts | TypeScript |
MethodDeclaration |
editNaming(naming: FileKind) {
const modalRef = this.modalService.open(ModalNamingComponent);
modalRef.result.then((result) => {
this.toastService.showSuccess(`Le nommage ${result.name} a bien été modifié`);
this.applicationChanged(this.applicationSelected);
}, (reason) => {
if (reason.me... | dtrouillet/ebad-front | src/app/manage-naming/manage-naming.component.ts | TypeScript |
MethodDeclaration |
deleteNaming(naming: FileKind) {
const modalRef = this.modalService.open(ModalNamingDeletionComponent);
modalRef.result.then((result) => {
this.fileKindsService.deleteNaming(naming).subscribe(
fileKind => {
this.toastService.showSuccess(`Le nommage a été supprimé`);
this.appli... | dtrouillet/ebad-front | src/app/manage-naming/manage-naming.component.ts | TypeScript |
ArrowFunction |
() => {
const url = "SLACK_WEBHOOK_URL";
let module: TestingModule;
@Injectable()
class TestService {
public constructor(
@InjectSlack() public readonly slackClient: IncomingWebhook,
) {}
}
beforeEach(async () => {
module = await Test.createTestingModule({
imports: [SlackModule.fo... | piic/nestjs-plugins | packages/nestjs-slack-webhook/__tests__/injectSlack.test.ts | TypeScript |
ArrowFunction |
async () => {
module = await Test.createTestingModule({
imports: [SlackModule.forRoot({ url })],
providers: [TestService],
}).compile();
} | piic/nestjs-plugins | packages/nestjs-slack-webhook/__tests__/injectSlack.test.ts | TypeScript |
ArrowFunction |
() => {
it("should inject the slack client", () => {
const testService = module.get(TestService);
expect(testService).toHaveProperty("slackClient");
expect(testService.slackClient).toBeInstanceOf(IncomingWebhook);
});
} | piic/nestjs-plugins | packages/nestjs-slack-webhook/__tests__/injectSlack.test.ts | TypeScript |
ArrowFunction |
() => {
const testService = module.get(TestService);
expect(testService).toHaveProperty("slackClient");
expect(testService.slackClient).toBeInstanceOf(IncomingWebhook);
} | piic/nestjs-plugins | packages/nestjs-slack-webhook/__tests__/injectSlack.test.ts | TypeScript |
ClassDeclaration |
@Injectable()
class TestService {
public constructor(
@InjectSlack() public readonly slackClient: IncomingWebhook,
) {}
} | piic/nestjs-plugins | packages/nestjs-slack-webhook/__tests__/injectSlack.test.ts | TypeScript |
ClassDeclaration |
@Injectable({
providedIn: 'root'
})
export class LocationService {
private getNearbyPlacesEndpoint = `${environment.BASE_API_URL}/nearbyPlaces`;
private getNearbyPlacesByCategoryEndpoint = `${environment.BASE_API_URL}/nearbyPlacesByCategory`;
private voteInterestEndpoint = `${environment.BASE_API_URL}/likedInt... | Your-Next-Stop/your-next-stop | src/app/services/location.service.ts | TypeScript |
MethodDeclaration |
public getCurrentPosition(): Observable<any> {
//stubbed location for bypassing navigator.geolocation calls due to inconsistency of availability
return from([{coords: {
latitude: 29.948541105522256,
longitude: -90.07328461341694
}
}])
// return new Observable((observer) => {
// ... | Your-Next-Stop/your-next-stop | src/app/services/location.service.ts | TypeScript |
MethodDeclaration |
public getNearbyPlaces(location, snapshotUrl) {
const currentPositionString = `${location.coords.latitude},${location.coords.longitude}`;
const id = localStorage.getItem('userId');
return this.http.get(this.getNearbyPlacesEndpoint, {
params: new HttpParams()
.set('location', current... | Your-Next-Stop/your-next-stop | src/app/services/location.service.ts | TypeScript |
MethodDeclaration |
public getNearbyPlacesByCategory(location, category) {
const currentPositionString = `${location.coords.latitude},${location.coords.longitude}`;
return this.http.get(this.getNearbyPlacesByCategoryEndpoint, {
params: new HttpParams()
.set('location', currentPositionString)
.set('... | Your-Next-Stop/your-next-stop | src/app/services/location.service.ts | TypeScript |
MethodDeclaration |
public getPlacePhoto(coordinates) {
return this.http.get(`${environment.BASE_API_URL}/yelpAPI`, {
params: new HttpParams()
.set('latitude', coordinates.lat)
.set('longitude', coordinates.lng)
.set('name', coordinates.name)
})
} | Your-Next-Stop/your-next-stop | src/app/services/location.service.ts | TypeScript |
MethodDeclaration |
public getPlaceInfo(place, userId) {
const placeId = place.id;
return this.http.get(`${this.getPlaceInfoEndpoint}`, {
params: new HttpParams()
.set("userId", userId)
.set("placeId", placeId)
})
} | Your-Next-Stop/your-next-stop | src/app/services/location.service.ts | TypeScript |
MethodDeclaration |
voteInterest(votedPlace, action, userId) {
const placeId = votedPlace.placeId;
if (action === 'remove') {
return this.http.delete(this.voteInterestEndpoint, {
params: new HttpParams()
.set('placeId', placeId)
.set('userId', userId)
})
}
return this.http.post(this.v... | Your-Next-Stop/your-next-stop | src/app/services/location.service.ts | TypeScript |
MethodDeclaration |
getUserPlaces(user) {
return this.http.get(`${this.getUserPlacesEndpoint}?id=${user}`);
} | Your-Next-Stop/your-next-stop | src/app/services/location.service.ts | TypeScript |
InterfaceDeclaration |
interface AppMainState {
setName: string;
filterParams: FilterParams;
filterPanelOpen: boolean;
relatedPanelOpen: boolean;
scrollOffset: number;
searchBackend: import("./reducer").SearchBackend;
} | aazaff/cosmos-visualizer | frontend-shared/src/visualizer-app/knowledge-base/provider/types.d.ts | TypeScript |
InterfaceDeclaration |
interface AppErrorState {
errorMessage: string;
allowSearch: boolean;
} | aazaff/cosmos-visualizer | frontend-shared/src/visualizer-app/knowledge-base/provider/types.d.ts | TypeScript |
TypeAliasDeclaration |
type FeatureType = { id: string; name: string }; | aazaff/cosmos-visualizer | frontend-shared/src/visualizer-app/knowledge-base/provider/types.d.ts | TypeScript |
TypeAliasDeclaration |
type FilterParams = {
query: string;
base_confidence?: number;
postprocessing_confidence?: number;
area?: number;
type?: string;
}; | aazaff/cosmos-visualizer | frontend-shared/src/visualizer-app/knowledge-base/provider/types.d.ts | TypeScript |
TypeAliasDeclaration |
type AppState = AppMainState & AppErrorState; | aazaff/cosmos-visualizer | frontend-shared/src/visualizer-app/knowledge-base/provider/types.d.ts | TypeScript |
ArrowFunction |
({
className,
orderNumber,
removeEndpoint,
api,
name,
canEdit,
onMoveEntryUp,
onMoveEntryDown,
onUpdateEndpoint,
isEndpointUrlExists,
}: EndpointEntryProps) => {
const [isEditable, setEditable] = useState(canEdit);
const [inputErrorMessageName, setInputErrorMessageName... | koriaf/tradetrust-website | src/components/AddressResolver/EndpointEntry.tsx | TypeScript |
ArrowFunction |
(event: React.ChangeEvent<HTMLInputElement>) => {
setEndpointAPIValue(event.target.value);
} | koriaf/tradetrust-website | src/components/AddressResolver/EndpointEntry.tsx | TypeScript |
ArrowFunction |
(event: React.ChangeEvent<HTMLInputElement>) => {
setEndpointNameValue(event.target.value);
} | koriaf/tradetrust-website | src/components/AddressResolver/EndpointEntry.tsx | TypeScript |
ArrowFunction |
() => {
const nameTrimmed = endpointName.trim();
const apiTrimmed = endpointAPI.trim();
if (isEmpty(nameTrimmed)) {
setInputErrorMessageName("Name must not be blank.");
return false;
}
if (isEmpty(apiTrimmed)) {
setInputErrorMessageEndpoint("Endpoint must not be ... | koriaf/tradetrust-website | src/components/AddressResolver/EndpointEntry.tsx | TypeScript |
ArrowFunction |
() => {
if (!canUpdateValue()) return;
setEditable(false);
setInputErrorMessageName("");
setInputErrorMessageEndpoint("");
onUpdateEndpoint(endpointName.trim(), endpointAPI.trim());
} | koriaf/tradetrust-website | src/components/AddressResolver/EndpointEntry.tsx | TypeScript |
InterfaceDeclaration |
interface EndpointEntryProps {
className?: string;
orderNumber: number;
api: string;
name: string;
canEdit: boolean;
removeEndpoint: () => void;
onMoveEntryUp?: () => void;
onMoveEntryDown?: () => void;
onUpdateEndpoint: (name: string, endpoint: string) => void;
isEndpointUrlExists: (endpoint: stri... | koriaf/tradetrust-website | src/components/AddressResolver/EndpointEntry.tsx | TypeScript |
MethodDeclaration |
isEditable ? (
<SvgIcon onClick={onSave}>
<SvgIconSave />
</SvgIcon>
) : (
<SvgIcon
onClick={() => {
setEditable(true);
}}
>
<SvgIconEdit2 | koriaf/tradetrust-website | src/components/AddressResolver/EndpointEntry.tsx | TypeScript |
ClassDeclaration |
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class AppusersRoutingModule { } | arunpragada/angular-admin | src/app/layout/appusers/appusers-routing.module.ts | TypeScript |
FunctionDeclaration |
export function validateENV(config: Record<string, unknown>) {
const validatedConfig = plainToClass(EnvironmentVariables, config, {
enableImplicitConversion: true,
});
const errors = validateSync(validatedConfig, {
skipMissingProperties: false,
});
if (errors.length > 0) {
throw new Err... | mpetrus001/task-management-nestjs | src/env.validation.ts | TypeScript |
ClassDeclaration |
class EnvironmentVariables {
@IsString()
POSTGRES_USER: string;
@IsString()
POSTGRES_PASSWORD: string;
@IsString()
POSTGRES_DB: string;
@IsString()
JWT_SECRET: string;
} | mpetrus001/task-management-nestjs | src/env.validation.ts | TypeScript |
FunctionDeclaration | /**
*
* @param props
* @param ref
* @internal
*/
export function useFocusGesture({ whileFocus, visualElement }: FeatureProps) {
const onFocus = () => {
visualElement.animationState?.setActive(AnimationType.Focus, true)
}
const onBlur = () => {
visualElement.animationState?.setActive(An... | DongKyoungPark/motion | src/gestures/use-focus-gesture.ts | TypeScript |
ArrowFunction |
() => {
visualElement.animationState?.setActive(AnimationType.Focus, true)
} | DongKyoungPark/motion | src/gestures/use-focus-gesture.ts | TypeScript |
ArrowFunction |
() => {
visualElement.animationState?.setActive(AnimationType.Focus, false)
} | DongKyoungPark/motion | src/gestures/use-focus-gesture.ts | TypeScript |
InterfaceDeclaration |
export interface useScreenSizeProps {
} | motor-js/motor-ui | src/lib/hooks/useScreenSize.d.ts | TypeScript |
TypeAliasDeclaration |
export type useScreenSizeType = useScreenSizeProps | motor-js/motor-ui | src/lib/hooks/useScreenSize.d.ts | TypeScript |
ArrowFunction |
({
result,
vote,
id,
quorum,
threshold,
tally,
hasStarted,
hasEnded,
}: Props): JSX.Element => {
const voteText = voteToString(vote);
return (
<Block minWidth="160px" margin={2} display="flex" flexDirection="column">
{hasEnded && <ResultFlair result={result} />}
{hasStarted && <Typ... | 6uild/ponferrada | packages/sil-governance/src/routes/dashboard/components/Proposal/VotingPanel/index.tsx | TypeScript |
InterfaceDeclaration |
interface Props {
readonly result: ProposalResult;
readonly vote: VoteOption | undefined;
readonly id: number;
readonly quorum: number;
readonly threshold: number;
readonly tally: Tally;
readonly hasStarted: boolean;
readonly hasEnded: boolean;
} | 6uild/ponferrada | packages/sil-governance/src/routes/dashboard/components/Proposal/VotingPanel/index.tsx | TypeScript |
FunctionDeclaration |
export function shouldRelyOnDefaultResolver(
typeName: string,
fieldToResolve: GraphQLField<any, any>,
datamodelInfo: InternalDatamodelInfo,
) {
const fieldName = fieldToResolve.name
const finalType = getFinalType(fieldToResolve.type)
if (isScalarType(finalType)) {
return true
}
if (isEnumType(fi... | aserranom/nexus-prisma | packages/nexus-prisma/src/resolver.ts | TypeScript |
FunctionDeclaration |
function getPrismaClient(
prismaClient: PrismaClientInput,
ctx: any,
): PrismaClient {
if (typeof prismaClient === 'function') {
return prismaClient(ctx)
}
return prismaClient
} | aserranom/nexus-prisma | packages/nexus-prisma/src/resolver.ts | TypeScript |
FunctionDeclaration |
export function generateDefaultResolver(
typeName: string,
fieldToResolve: GraphQLField<any, any>,
prismaClientInput: PrismaClientInput,
datamodelInfo: InternalDatamodelInfo,
): GraphQLFieldResolver<any, any> | undefined {
const fieldName = fieldToResolve.name
/**
* If we know the prisma-client returns... | aserranom/nexus-prisma | packages/nexus-prisma/src/resolver.ts | TypeScript |
ArrowFunction |
(root, args, ctx, info) => {
const prismaClient = getPrismaClient(prismaClientInput, ctx)
// Resolve top-level fields
if (isTopLevel) {
throwIfUnknownClientFunction(prismaClient, fieldName, typeName, info)
if (isCreateMutation(typeName, fieldName)) {
args = args.data
} else if (... | aserranom/nexus-prisma | packages/nexus-prisma/src/resolver.ts | TypeScript |
ArrowFunction |
uniqFieldName => root[uniqFieldName] !== undefined | aserranom/nexus-prisma | packages/nexus-prisma/src/resolver.ts | TypeScript |
FunctionDeclaration |
export function toWei (amount: number | bigint, dec: number | string = 18) {
let decimals = BigInt(dec);
return BigInt(amount) * 10n ** decimals;
} | tenbits/web3m-sample | dequanto/src/contracts/utils/ConvertUtils.ts | TypeScript |
FunctionDeclaration |
export function toEther (amount: number | bigint, dec: number | string = 18) {
const round = 100000n;
let decimals = BigInt(dec);
let val = BigInt(amount) * round / 10n ** decimals;
if (val < Number.MAX_SAFE_INTEGER) {
return Number(val) / Number(round);
}
re... | tenbits/web3m-sample | dequanto/src/contracts/utils/ConvertUtils.ts | TypeScript |
ClassDeclaration | /**
* Chooses wild Pokemon to encounter during walking.
*/
export class EncounterChoices extends Section<FullScreenPokemon> {
/**
* May randomly starts a wild Pokemon encounter if the player while walking.
*
* @param thing In-game Player that may encounter a wild Pokemon.
* @returns Wild Pok... | lqzo/FullScreenPokemon | src/sections/actions/walking/encounters/EncounterChoices.ts | TypeScript |
MethodDeclaration | /**
* May randomly starts a wild Pokemon encounter if the player while walking.
*
* @param thing In-game Player that may encounter a wild Pokemon.
* @returns Wild Pokemon schemas to choose from, if a battle is to start.
*/
public getWildEncounterPokemonOptions(thing: IPlayer): IWildPokemonSch... | lqzo/FullScreenPokemon | src/sections/actions/walking/encounters/EncounterChoices.ts | TypeScript |
MethodDeclaration | /**
* Gets options for a grass battle if the player is in grass.
*
* @param thing A Player in grass.
* @returns Wild Pokemon options to start battle with, if a battle should start.
* @remarks Uses the doesGrassEncounterHappen equation internally.
*/
private getGrassPokemonOptions(thing: IP... | lqzo/FullScreenPokemon | src/sections/actions/walking/encounters/EncounterChoices.ts | TypeScript |
MethodDeclaration | /**
* Gets options for a wild Pokemon battle while walking.
*
* @param thing A walking Player.
* @returns Wild Pokemon options to start battle with, if a battle should start.
* @remarks Uses the doesWalkingEncounterHappen equation internally.
*/
private getWalkingPokemonOptions(): IWildP... | lqzo/FullScreenPokemon | src/sections/actions/walking/encounters/EncounterChoices.ts | TypeScript |
MethodDeclaration | /**
* Gets options for a wild Pokemon battle while surfing.
*
* @param thing A surfing Player.
* @returns Wild Pokemon options to start battle with, if a battle should start.
* @remarks Uses the doesWalkingEncounterHappen equation internally.
*/
private getSurfingPokemonOptions(thing: IP... | lqzo/FullScreenPokemon | src/sections/actions/walking/encounters/EncounterChoices.ts | TypeScript |
ClassDeclaration |
@Module({
imports: [
TypeOrmModule.forRootAsync({
imports: [ConfigModule],
useClass: TypeOrmConfigService,
inject: [ConfigService],
}),
UserModule,
BoardModule,
AuthModule
],
controllers: [AppController],
providers: [AppService],
})
export class AppModule {} | smoothbear/Learning-About-Nest-js | src/modules/main/app.module.ts | TypeScript |
FunctionDeclaration |
export function pipelinePromiseRejectFactory<T>(scheduler: IDispatcher<T>): IPipeline<T> {
return new PipelinePromiseReject(scheduler);
} | DavidBM/acelga-bus | src/spec/corebus/mocks/pipelinePromiseReject.ts | TypeScript |
ClassDeclaration |
export class PipelinePromiseReject<T> implements IPipeline<T> {
constructor(dispatcher: IDispatcher<T>) {
}
executeStopOnError(events: T[]): PipelineExecutionResult<T> {
return Promise.reject(new Error('executeStopOnError (error from Mock)'));
}
executeContinueOnError(events: T[]): PipelineExecutionResult<T>... | DavidBM/acelga-bus | src/spec/corebus/mocks/pipelinePromiseReject.ts | TypeScript |
MethodDeclaration |
executeStopOnError(events: T[]): PipelineExecutionResult<T> {
return Promise.reject(new Error('executeStopOnError (error from Mock)'));
} | DavidBM/acelga-bus | src/spec/corebus/mocks/pipelinePromiseReject.ts | TypeScript |
MethodDeclaration |
executeContinueOnError(events: T[]): PipelineExecutionResult<T> {
return Promise.reject(new Error('executeContinueOnError (error from Mock)'));
} | DavidBM/acelga-bus | src/spec/corebus/mocks/pipelinePromiseReject.ts | TypeScript |
ArrowFunction |
async () => {
const [ major ] = version.split('.')
const domain = `https://ui-v${major}.eqmac.app`
await cf.zones.purgeCache(process.env.CLOUDFLARE_ZONE_ID, {
files: [ domain ]
})
console.log(`🧹 Cloudflare cache successfully cleared for domain ${domain}`)
} | kant/eqMac | ui/scripts/purge-cache.ts | TypeScript |
ArrowFunction |
err => {
console.error(err)
process.exit(1)
} | kant/eqMac | ui/scripts/purge-cache.ts | TypeScript |
ArrowFunction |
props => widthMap[props.width ?? ('xlarge' as const)] | SferaDev/react | src/Dialog/Dialog.tsx | TypeScript |
ArrowFunction |
props => heightMap[props.height ?? ('auto' as const)] | SferaDev/react | src/Dialog/Dialog.tsx | TypeScript |
ArrowFunction |
({dialogLabelId, title, subtitle, dialogDescriptionId, onClose}) => {
const onCloseClick = useCallback(() => {
onClose('close-button')
}, [onClose])
return (
<Dialog.Header>
<Box display="flex">
<Box display="flex" px={2} py="6px" flexDirection="column" flexGrow={1}>
<Dialog.Title... | SferaDev/react | src/Dialog/Dialog.tsx | TypeScript |
ArrowFunction |
() => {
onClose('close-button')
} | SferaDev/react | src/Dialog/Dialog.tsx | TypeScript |
ArrowFunction |
({children}) => {
return <Dialog.Body>{children}</Dialog.Body>
} | SferaDev/react | src/Dialog/Dialog.tsx | TypeScript |
ArrowFunction |
({footerButtons}) => {
const {containerRef: footerRef} = useFocusZone({
bindKeys: FocusKeys.ArrowHorizontal | FocusKeys.Tab,
focusInStrategy: 'closest'
})
return footerButtons ? (
<Dialog.Footer ref={footerRef as React.RefObject<HTMLDivElement>}>
<Dialog.Buttons buttons={footerButtons} />
<... | SferaDev/react | src/Dialog/Dialog.tsx | TypeScript |
ArrowFunction |
(props, forwardedRef) => {
const {
title = 'Dialog',
subtitle = '',
renderHeader,
renderBody,
renderFooter,
onClose,
role = 'dialog',
width = 'xlarge',
height = 'auto'
} = props
const dialogLabelId = useSSRSafeId()
const dialogDescriptionId = useSSRSafeId()
const defaulted... | SferaDev/react | src/Dialog/Dialog.tsx | TypeScript |
ArrowFunction |
(event: KeyboardEvent) => {
onClose('escape')
event.preventDefault()
} | SferaDev/react | src/Dialog/Dialog.tsx | TypeScript |
ArrowFunction |
({buttons}) => {
const autoFocusRef = useRef<HTMLButtonElement>(null)
let autoFocusCount = 0
const [hasRendered, setHasRendered] = useState(0)
useEffect(() => {
// hack to work around dialogs originating from other focus traps.
if (hasRendered === 1) {
autoFocusRef.current?.focus()
} else {
... | SferaDev/react | src/Dialog/Dialog.tsx | TypeScript |
ArrowFunction |
() => {
// hack to work around dialogs originating from other focus traps.
if (hasRendered === 1) {
autoFocusRef.current?.focus()
} else {
setHasRendered(hasRendered + 1)
}
} | SferaDev/react | src/Dialog/Dialog.tsx | TypeScript |
ArrowFunction |
(dialogButtonProps, index) => {
const {content, buttonType = 'normal', autoFocus = false, ...buttonProps} = dialogButtonProps
const ButtonElement = buttonTypes[buttonType]
return (
<ButtonElement
key={index}
{ | SferaDev/react | src/Dialog/Dialog.tsx | TypeScript |
ArrowFunction |
({onClose}) => {
return (
<DialogCloseButton aria-label="Close" onClick={onClose}>
<StyledOcticon icon={XIcon} />
</DialogCloseButton> | SferaDev/react | src/Dialog/Dialog.tsx | TypeScript |
InterfaceDeclaration | /**
* Props to customize the rendering of the Dialog.
*/
export interface DialogProps {
/**
* Title of the Dialog. Also serves as the aria-label for this Dialog.
*/
title?: React.ReactNode
/**
* The Dialog's subtitle. Optional. Rendered below the title in smaller
* type with less contrast. Also ser... | SferaDev/react | src/Dialog/Dialog.tsx | TypeScript |
InterfaceDeclaration | /**
* Props that are passed to a component that serves as a dialog header
*/
export interface DialogHeaderProps extends DialogProps {
/**
* ID of the element that will be used as the `aria-labelledby` attribute on the
* dialog. This ID should be set to the element that renders the dialog's title.
*/
dial... | SferaDev/react | src/Dialog/Dialog.tsx | TypeScript |
InterfaceDeclaration |
interface StyledDialogProps {
width?: DialogWidth
height?: DialogHeight
} | SferaDev/react | src/Dialog/Dialog.tsx | TypeScript |
TypeAliasDeclaration | /**
* Props that characterize a button to be rendered into the footer of
* a Dialog.
*/
export type DialogButtonProps = ButtonProps & {
/**
* The type of Button element to use
*/
buttonType?: 'normal' | 'primary' | 'danger'
/**
* The Button's inner text
*/
content: React.ReactNode
/**
* If... | SferaDev/react | src/Dialog/Dialog.tsx | TypeScript |
TypeAliasDeclaration |
export type DialogWidth = keyof typeof widthMap | SferaDev/react | src/Dialog/Dialog.tsx | TypeScript |
TypeAliasDeclaration |
export type DialogHeight = keyof typeof heightMap | SferaDev/react | src/Dialog/Dialog.tsx | TypeScript |
ArrowFunction |
items => {
this.arrayItems = [];
items.forEach(item => {
var y = item.payload.toJSON();
y['$key'] = item.key;
this.arrayItems.push(y);
})
this.arrayItems = this.arrayItems.filter(data => data.status == true && data.postuserid == this.firebaseService.userKey);
this... | courageDeveloper/nessty | src/pages/tabs/tabs.ts | TypeScript |
ArrowFunction |
item => {
var y = item.payload.toJSON();
y['$key'] = item.key;
this.arrayItems.push(y);
} | courageDeveloper/nessty | src/pages/tabs/tabs.ts | TypeScript |
ArrowFunction |
data => data.status == true && data.postuserid == this.firebaseService.userKey | courageDeveloper/nessty | src/pages/tabs/tabs.ts | TypeScript |
ArrowFunction |
res => {
if (res.status == true) {
this.show = true;
}
} | courageDeveloper/nessty | src/pages/tabs/tabs.ts | TypeScript |
ClassDeclaration | /**
* Generated class for the TabsPage page.
*
* See https://ionicframework.com/docs/components/#navigation for more info on
* Ionic pages and navigation.
*/
@IonicPage()
@Component({
selector: 'page-tabs',
templateUrl: 'tabs.html',
})
export class TabsPage {
// set the root pages for each tab
tab1Root: an... | courageDeveloper/nessty | src/pages/tabs/tabs.ts | TypeScript |
MethodDeclaration |
ionViewDidEnter() {
this.firebaseService.getAlerts().snapshotChanges().subscribe(items => {
this.arrayItems = [];
items.forEach(item => {
var y = item.payload.toJSON();
y['$key'] = item.key;
this.arrayItems.push(y);
})
this.arrayItems = this.arrayItems.filter(data =... | courageDeveloper/nessty | src/pages/tabs/tabs.ts | TypeScript |
ArrowFunction |
(adapter, request, userId) => {
const fiscalYearId: Id = ExpressSerializer.deserialize(request.params.fiscalYearId)
return adapter.verification.getAll({ userId: userId, fiscalYearId: fiscalYearId })
} | Senth/accounting | packages/backend/src/framework/api/ExpressApi.ts | TypeScript |
ArrowFunction |
async (adapter, request, userId, files) => {
const verificationData = ExpressSerializer.deserialize(request.body)
verificationData.files = files
const input: VerificationNewInput = { userId: userId, verification: verificationData }
if (VerificationNewInput.validate(input)) {
return adapter.verification... | Senth/accounting | packages/backend/src/framework/api/ExpressApi.ts | TypeScript |
ArrowFunction |
async (adapter, request, userId, files) => {
const verifictationData = ExpressSerializer.deserialize(request.body)
verifictationData.files = files
const input: VerificationNewCustomTransactionInput = { userId: userId, verification: verifictationData }
if (VerificationNewCustomTransactionInput.validate(inpu... | Senth/accounting | packages/backend/src/framework/api/ExpressApi.ts | TypeScript |
ArrowFunction |
async (adapter, request, userId, files) => {
const input: VerificationNewFromParserInput = { userId: userId, files: files }
if (VerificationNewFromParserInput.validate(input)) {
return adapter.verification.addFromParser(input)
}
} | Senth/accounting | packages/backend/src/framework/api/ExpressApi.ts | TypeScript |
ArrowFunction |
(adapter, request) => {
const userData = ExpressSerializer.deserialize(request.body)
return adapter.user.create({ user: userData })
} | Senth/accounting | packages/backend/src/framework/api/ExpressApi.ts | TypeScript |
ArrowFunction |
(adapter, request) => {
return adapter.user.getByKey({ apiKey: request.params.apiKey })
} | Senth/accounting | packages/backend/src/framework/api/ExpressApi.ts | TypeScript |
ArrowFunction |
(adapter, request, userId) => {
return adapter.fiscalYear.getAll({ userId: userId })
} | Senth/accounting | packages/backend/src/framework/api/ExpressApi.ts | TypeScript |
ClassDeclaration |
export class ExpressApi {
readonly api: ExpressApiHelper
constructor(apiAdapter: ApiAdapter) {
this.api = new ExpressApiHelper(apiAdapter)
this.bindApi()
}
private bindApi() {
this.bindVerification()
this.bindUser()
this.bindFiscalYear()
}
private bindVerification() {
// Get all
this.api.getAuth... | Senth/accounting | packages/backend/src/framework/api/ExpressApi.ts | TypeScript |
MethodDeclaration |
private bindApi() {
this.bindVerification()
this.bindUser()
this.bindFiscalYear()
} | Senth/accounting | packages/backend/src/framework/api/ExpressApi.ts | TypeScript |
MethodDeclaration |
private bindVerification() {
// Get all
this.api.getAuthorized('/api/verification/:fiscalYearId', (adapter, request, userId) => {
const fiscalYearId: Id = ExpressSerializer.deserialize(request.params.fiscalYearId)
return adapter.verification.getAll({ userId: userId, fiscalYearId: fiscalYearId })
})
// A... | Senth/accounting | packages/backend/src/framework/api/ExpressApi.ts | TypeScript |
MethodDeclaration |
private bindUser() {
// Create user
this.api.post('/api/user', (adapter, request) => {
const userData = ExpressSerializer.deserialize(request.body)
return adapter.user.create({ user: userData })
})
// Get user by Api key
this.api.get('/api/user/:apiKep', (adapter, request) => {
return adapter.user.... | Senth/accounting | packages/backend/src/framework/api/ExpressApi.ts | TypeScript |
MethodDeclaration |
private bindFiscalYear() {
// Get all
this.api.getAuthorized('/api/fiscal-year', (adapter, request, userId) => {
return adapter.fiscalYear.getAll({ userId: userId })
})
} | Senth/accounting | packages/backend/src/framework/api/ExpressApi.ts | TypeScript |
ClassDeclaration |
@Bean('scrollVisibleService')
export class ScrollVisibleService extends BeanStub {
@Autowired('columnApi') private columnApi: ColumnApi;
@Autowired('gridApi') private gridApi: GridApi;
@Autowired('controllersService') public controllersService: ControllersService;
private horizontalScrollShowing: boo... | Bakino/ag-grid | community-modules/core/src/ts/gridBodyComp/scrollVisibleService.ts | TypeScript |
InterfaceDeclaration |
export interface SetScrollsVisibleParams {
horizontalScrollShowing: boolean;
verticalScrollShowing: boolean;
} | Bakino/ag-grid | community-modules/core/src/ts/gridBodyComp/scrollVisibleService.ts | TypeScript |
MethodDeclaration |
@PostConstruct
private postConstruct(): void {
this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, this.onDisplayedColumnsChanged.bind(this));
this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, this.onDisplayedColumnsWidthChanged.... | Bakino/ag-grid | community-modules/core/src/ts/gridBodyComp/scrollVisibleService.ts | TypeScript |
MethodDeclaration |
public onDisplayedColumnsChanged(): void {
this.update();
} | Bakino/ag-grid | community-modules/core/src/ts/gridBodyComp/scrollVisibleService.ts | TypeScript |
MethodDeclaration |
private onDisplayedColumnsWidthChanged(): void {
this.update();
} | Bakino/ag-grid | community-modules/core/src/ts/gridBodyComp/scrollVisibleService.ts | TypeScript |
MethodDeclaration |
private update(): void {
// because of column animation (which takes 200ms), we have to do this twice.
// eg if user removes cols anywhere except at the RHS, then the cols on the RHS
// will animate to the left to fill the gap. this animation means just after
// the cols are removed, th... | Bakino/ag-grid | community-modules/core/src/ts/gridBodyComp/scrollVisibleService.ts | TypeScript |
MethodDeclaration |
private updateImpl(): void {
const centerRowCtrl = this.controllersService.getCenterRowContainerCon();
const params: SetScrollsVisibleParams = {
horizontalScrollShowing: centerRowCtrl.isHorizontalScrollShowing(),
verticalScrollShowing: this.isVerticalScrollShowing()
};
... | Bakino/ag-grid | community-modules/core/src/ts/gridBodyComp/scrollVisibleService.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.