type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ArrowFunction |
() => {
cy.visitAngularUrl(`${subscriptionBaseLink}/licenses`);
cy.get('dib-company-management dib-subscription dib-subscription-licenses ui-button').contains('Buy now').click();
cy.get('.cdk-overlay-container confirmation-dialog button').contains(' No ').click();
cy.get('.cdk-overlay-container conf... | sjova/cypress-typescript-new-dib-playground | cypress/integration/dib-travel/company-settings/subscription.spec.ts | TypeScript |
ArrowFunction |
() => {
cy.visitAngularUrl(`${subscriptionBaseLink}/licenses`);
cy.intercept('GET', '/api/secure/v2/corporations/*/subscriptions/current').as('currentSubscriptionState');
cy.get('dib-company-management dib-subscription dib-subscription-licenses .subscription-table__row__value').then(
(numberOfLicen... | sjova/cypress-typescript-new-dib-playground | cypress/integration/dib-travel/company-settings/subscription.spec.ts | TypeScript |
ArrowFunction |
(numberOfLicenses) => {
const numberBeforePurchase = parseInt(numberOfLicenses.text());
const numberAfterPurchase = parseInt(numberOfLicenses.text());
cy.get('dib-company-management dib-subscription dib-subscription-licenses ui-button').contains('Buy').click();
cy.get('.cdk-overlay-con... | sjova/cypress-typescript-new-dib-playground | cypress/integration/dib-travel/company-settings/subscription.spec.ts | TypeScript |
ArrowFunction |
(message) => {
expect(message).to.be.oneOf(['Purchase completed successfully', 'Purchase could not be completed']);
} | sjova/cypress-typescript-new-dib-playground | cypress/integration/dib-travel/company-settings/subscription.spec.ts | TypeScript |
ArrowFunction |
() => {
if (numberBeforePurchase == numberBeforePurchase + 1) {
expect(numberAfterPurchase).to.eq(numberBeforePurchase + 1);
} else {
expect(numberAfterPurchase).to.eq(numberBeforePurchase);
}
} | sjova/cypress-typescript-new-dib-playground | cypress/integration/dib-travel/company-settings/subscription.spec.ts | TypeScript |
ArrowFunction |
() => {
cy.visitAngularUrl(`${subscriptionBaseLink}/payment-method`);
cy.get('dib-company-management dib-subscription dib-subscription-payment-method span')
.contains(' Add New Billing Profile ')
.click();
cancelAddingBillingProfile();
} | sjova/cypress-typescript-new-dib-playground | cypress/integration/dib-travel/company-settings/subscription.spec.ts | TypeScript |
ArrowFunction |
() => {
cy.visitAngularUrl(`${subscriptionBaseLink}/payment-method`);
cy.get('dib-company-management dib-subscription dib-subscription-payment-method span')
.contains(' Add New Billing Profile ')
.click();
submitEmptyBillingProfileFormAndConfirm();
} | sjova/cypress-typescript-new-dib-playground | cypress/integration/dib-travel/company-settings/subscription.spec.ts | TypeScript |
ArrowFunction |
() => {
cy.visitAngularUrl(`${subscriptionBaseLink}/payment-method`);
cy.get('dib-company-management dib-subscription dib-subscription-payment-method span')
.contains(' Add New Billing Profile ')
.click();
cy.waitForAngular();
addBillingProfile(paymentMethod);
cy.visitAngularUrl('/c... | sjova/cypress-typescript-new-dib-playground | cypress/integration/dib-travel/company-settings/subscription.spec.ts | TypeScript |
ArrowFunction |
() => {
cy.visitAngularUrl(`${subscriptionBaseLink}/purchase-history`);
cy.get('dib-company-management dib-subscription dib-subscription-purchase-history p')
.should('contain', ' Date ')
.should('contain', ' Invoice number ')
.should('contain', ' Description ')
.should('contain', ' Amo... | sjova/cypress-typescript-new-dib-playground | cypress/integration/dib-travel/company-settings/subscription.spec.ts | TypeScript |
ArrowFunction |
() => {
cy.visitAngularUrl(`${subscriptionBaseLink}/purchase-history`);
cy.get('dib-company-management dib-subscription dib-subscription-purchase-history page-pagination ul li')
.contains('2')
.click();
confirmSecondPagePreview();
cy.get('dib-company-management dib-subscription dib-subsc... | sjova/cypress-typescript-new-dib-playground | cypress/integration/dib-travel/company-settings/subscription.spec.ts | TypeScript |
FunctionDeclaration |
export async function send(
from: string,
to: string,
subject: string,
message: string,
): Promise<any> {
sendgrid.setApiKey(process.env.SENDGRID_API_KEY);
try {
await sendgrid.send({
to: to,
from: from,
subject: subject,
text: message,
... | IB-code/ib-web-hbs | server/utils/mail.ts | TypeScript |
ClassDeclaration |
@Entity('users')
class User {
@PrimaryColumn()
readonly id: string;
@Column()
name: string;
@Column()
email: string;
@Column()
admin: boolean;
@Exclude()
@Column()
password: string;
@CreateDateColumn()
created_at: Date;
@UpdateDateColumn()
updated_at: Date;
constructor() {
i... | Lucas-HMSC/next-level-week | nlw-6/nlwValoriza/src/entities/User.ts | TypeScript |
FunctionDeclaration |
async function getAccessEndpointForResource(
resource: UrlString
): Promise<UrlString> {
// Explicitly makes an unauthenticated fetch to be sure to get the link to the
// authorization server.
const response = await crossFetch(resource);
if (!response.headers.has("WWW-Authenticate")) {
throw new Error(
... | inrupt/solid-client-access-grants-js | src/discover/getAccessApiEndpoint.ts | TypeScript |
FunctionDeclaration | /**
* Discovers the endpoint where access requests may be created for a given resource.
*
* @param resource The resource for which access may be requested.
* @param options Optional properties to customise the access request behaviour.
* @returns The URL of the access request server.
* @since 0.4.0
*/
async func... | inrupt/solid-client-access-grants-js | src/discover/getAccessApiEndpoint.ts | TypeScript |
FunctionDeclaration |
export declare function securitycenter(version: 'v1'): securitycenter_v1.Securitycenter; | AishwaryaAthreya/Bridge-the-gap | node_modules/googleapis/build/src/apis/securitycenter/index.d.ts | TypeScript |
FunctionDeclaration |
export declare function securitycenter(options: securitycenter_v1.Options): securitycenter_v1.Securitycenter; | AishwaryaAthreya/Bridge-the-gap | node_modules/googleapis/build/src/apis/securitycenter/index.d.ts | TypeScript |
FunctionDeclaration |
export declare function securitycenter(version: 'v1beta1'): securitycenter_v1beta1.Securitycenter; | AishwaryaAthreya/Bridge-the-gap | node_modules/googleapis/build/src/apis/securitycenter/index.d.ts | TypeScript |
FunctionDeclaration |
export declare function securitycenter(options: securitycenter_v1beta1.Options): securitycenter_v1beta1.Securitycenter; | AishwaryaAthreya/Bridge-the-gap | node_modules/googleapis/build/src/apis/securitycenter/index.d.ts | TypeScript |
FunctionDeclaration |
export declare function securitycenter(version: 'v1p1alpha1'): securitycenter_v1p1alpha1.Securitycenter; | AishwaryaAthreya/Bridge-the-gap | node_modules/googleapis/build/src/apis/securitycenter/index.d.ts | TypeScript |
FunctionDeclaration |
export declare function securitycenter(options: securitycenter_v1p1alpha1.Options): securitycenter_v1p1alpha1.Securitycenter; | AishwaryaAthreya/Bridge-the-gap | node_modules/googleapis/build/src/apis/securitycenter/index.d.ts | TypeScript |
ArrowFunction |
() => (
<View style={ | JijoBose/yoroi-mobile | src/WalletInit/MnemonicInput/MnemonicInput.stories.tsx | TypeScript |
MethodDeclaration |
action('onDone') | JijoBose/yoroi-mobile | src/WalletInit/MnemonicInput/MnemonicInput.stories.tsx | TypeScript |
ArrowFunction |
e => {
if (e.invokedByUser && formInstance.metadata.closeOnPostIfModal) {
self.close(true);
}
} | UNOPS/UiMetadataFramework | clients/ionic 3/src/pages/ui/outputs/ActionList/ActionList.ts | TypeScript |
ArrowFunction |
a => a === this | UNOPS/UiMetadataFramework | clients/ionic 3/src/pages/ui/outputs/ActionList/ActionList.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'actionlist-output',
templateUrl: 'ActionList.html'
})
export class ActionList implements OnInit{
eventBusService: any;
open: boolean = false;
current: any = null;
modalid = 0;
modals = [];
@Input() field: any;
@Input() app: any;
@Input() form: any;
@Input() parent: any;
@Input() s... | UNOPS/UiMetadataFramework | clients/ionic 3/src/pages/ui/outputs/ActionList/ActionList.ts | TypeScript |
MethodDeclaration |
ngOnInit() {
this.outputField = this.field;
this.outputApp = this.app;
this.outputForm = this.form;
this.outputParent = this.parent;
this.modalid += 1;
} | UNOPS/UiMetadataFramework | clients/ionic 3/src/pages/ui/outputs/ActionList/ActionList.ts | TypeScript |
MethodDeclaration |
beforeDestroy() {
this.eventBusService.FormResponseHandled.unsubsribe();
} | UNOPS/UiMetadataFramework | clients/ionic 3/src/pages/ui/outputs/ActionList/ActionList.ts | TypeScript |
MethodDeclaration |
close(reloadParentForm) {
// Ensure the modal div is hidden.
this.open = false;
this.eventBusService.FormResponseHandled.unsubsribe();
if (reloadParentForm) {
let formId = this.form.metadata.id;
this.onActionRun(formId);
}
this.modals.slice(this.modals.findIndex(a => a === this));
} | UNOPS/UiMetadataFramework | clients/ionic 3/src/pages/ui/outputs/ActionList/ActionList.ts | TypeScript |
MethodDeclaration |
async onActionRun(formId) {
let parentForm = this.parent;
let app = parentForm.app;
let formInstance = parentForm.form;
await parentForm.submit(app, formInstance, null, true);
let eventArgs = new ActionListEventArguments(app, formId);
parentForm.fireAndBubbleUp(this.eventBusService.actionListRunEvent, ev... | UNOPS/UiMetadataFramework | clients/ionic 3/src/pages/ui/outputs/ActionList/ActionList.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'github-demo';
} | ScottPeter/GithubDemo | src/app/app.component.ts | TypeScript |
FunctionDeclaration |
export default function Pricing() {
return (
<Center py={6}>
<Box
maxW={'330px'}
w={'full'}
bg={useColorModeValue('white', 'gray.800')}
boxShadow={'2xl'}
rounded={'md'}
overflow={'hidden'}>
<Stack
textAlign={'center'}
p={6}
... | Berrones-Edwin/chakra-templates | src/pages/templates/components/cards/pricing.tsx | TypeScript |
MethodDeclaration |
useColorModeValue('white', 'gray.800') | Berrones-Edwin/chakra-templates | src/pages/templates/components/cards/pricing.tsx | TypeScript |
MethodDeclaration |
useColorModeValue('gray.800', 'white') | Berrones-Edwin/chakra-templates | src/pages/templates/components/cards/pricing.tsx | TypeScript |
MethodDeclaration |
useColorModeValue('green.50', 'green.900') | Berrones-Edwin/chakra-templates | src/pages/templates/components/cards/pricing.tsx | TypeScript |
MethodDeclaration |
useColorModeValue('gray.50', 'gray.900') | Berrones-Edwin/chakra-templates | src/pages/templates/components/cards/pricing.tsx | TypeScript |
ArrowFunction |
(resolver, reject) => {
this.servers.push(server);
this.save();
resolver({ Status: true });
} | geffzhang/Ocelot.Configurator | src/Ocelot-Configurator/src/app/shared/services/server.service.ts | TypeScript |
ArrowFunction |
(resolver, reject) => {
this.servers = this.servers.filter(p => p != server);
this.save();
resolver({ Status: true });
} | geffzhang/Ocelot.Configurator | src/Ocelot-Configurator/src/app/shared/services/server.service.ts | TypeScript |
ArrowFunction |
p => p != server | geffzhang/Ocelot.Configurator | src/Ocelot-Configurator/src/app/shared/services/server.service.ts | TypeScript |
ArrowFunction |
(resolve, reject) => {
localStorage.removeItem('JwtToken');
if (model && model.Server) {
const server = model.Server;
const url = server.Scheme + '://' + server.Host + (server.Port != 80 ? (':' + server.Port) : '')
+ server.AdministrationApiPath + '/connect/token';
let f... | geffzhang/Ocelot.Configurator | src/Ocelot-Configurator/src/app/shared/services/server.service.ts | TypeScript |
ArrowFunction |
p => {
if (p) {
let jwtToken = p['access_token'];
if (jwtToken) {
localStorage.setItem('JwtToken', jwtToken);
resolve(true);
return;
}
}
resolve(false);
} | geffzhang/Ocelot.Configurator | src/Ocelot-Configurator/src/app/shared/services/server.service.ts | TypeScript |
ArrowFunction |
err => {
resolve(false);
} | geffzhang/Ocelot.Configurator | src/Ocelot-Configurator/src/app/shared/services/server.service.ts | TypeScript |
ArrowFunction |
p => p.Alias == alias | geffzhang/Ocelot.Configurator | src/Ocelot-Configurator/src/app/shared/services/server.service.ts | TypeScript |
ClassDeclaration |
@Injectable()
export class ServerService {
servers: Server[] = [];
constructor(private http: HttpClient) {
this.loadServers();
}
loadServers() {
let con = localStorage.getItem(this.normalizeStorageKey('Servers'));
try {
if (con) {
this.servers = JSON.parse(con);
}
} catc... | geffzhang/Ocelot.Configurator | src/Ocelot-Configurator/src/app/shared/services/server.service.ts | TypeScript |
MethodDeclaration |
loadServers() {
let con = localStorage.getItem(this.normalizeStorageKey('Servers'));
try {
if (con) {
this.servers = JSON.parse(con);
}
} catch (e) {
this.servers = [];
this.save();
}
} | geffzhang/Ocelot.Configurator | src/Ocelot-Configurator/src/app/shared/services/server.service.ts | TypeScript |
MethodDeclaration |
mockServers(count: number) {
for (var i = 0; i < count; i++) {
this.servers.push({
Alias: `MyServer${i + 1}`,
Host: `biz${i + 1}.myhost.com`,
GrantType: 'client_credentials',
Port: 80 + i,
Scheme: 'http',
AdministrationApiPath: '/administration'
});
}... | geffzhang/Ocelot.Configurator | src/Ocelot-Configurator/src/app/shared/services/server.service.ts | TypeScript |
MethodDeclaration | /**
* 添加服务器
* @param server
*/
addServer(server: Server): Promise<any> {
return new Promise((resolver, reject) => {
this.servers.push(server);
this.save();
resolver({ Status: true });
})
} | geffzhang/Ocelot.Configurator | src/Ocelot-Configurator/src/app/shared/services/server.service.ts | TypeScript |
MethodDeclaration | /**
* 保存配置
*/
save() {
localStorage.setItem(this.normalizeStorageKey('Servers'), JSON.stringify(this.servers));
} | geffzhang/Ocelot.Configurator | src/Ocelot-Configurator/src/app/shared/services/server.service.ts | TypeScript |
MethodDeclaration | /**
* 删除一个服务器
* @param server
*/
removeServer(server: Server): Promise<any> {
return new Promise((resolver, reject) => {
this.servers = this.servers.filter(p => p != server);
this.save();
resolver({ Status: true });
})
} | geffzhang/Ocelot.Configurator | src/Ocelot-Configurator/src/app/shared/services/server.service.ts | TypeScript |
MethodDeclaration | /**
* 统一化本地存储的Key
* @param key
*/
normalizeStorageKey(key: string) {
const storagePrefix = 'OC-';
return storagePrefix + key.trim();
} | geffzhang/Ocelot.Configurator | src/Ocelot-Configurator/src/app/shared/services/server.service.ts | TypeScript |
MethodDeclaration | /**
* 登陆到服务器
* @param model
*/
login(model: LoginModel): Promise<boolean> {
return new Promise((resolve, reject) => {
localStorage.removeItem('JwtToken');
if (model && model.Server) {
const server = model.Server;
const url = server.Scheme + '://' + server.Host + (server.Port !=... | geffzhang/Ocelot.Configurator | src/Ocelot-Configurator/src/app/shared/services/server.service.ts | TypeScript |
MethodDeclaration | /**
* 通过别名查找服务器
* @param alias
*/
getServer(alias: string): Server {
return this.servers.find(p => p.Alias == alias);
} | geffzhang/Ocelot.Configurator | src/Ocelot-Configurator/src/app/shared/services/server.service.ts | TypeScript |
MethodDeclaration | /**
* 加载服务器配置
* @param server
*/
loadServerConfig(server: Server): Promise<any> {
const url = server.Scheme + '://' + server.Host + (server.Port != 80 ? (':' + server.Port) : '')
+ server.AdministrationApiPath + '/configuration';
return this.http.get(url).toPromise();
} | geffzhang/Ocelot.Configurator | src/Ocelot-Configurator/src/app/shared/services/server.service.ts | TypeScript |
ClassDeclaration |
@Injectable()
export class AppService {
constructor(
@InjectRepository(Hits)
private usersRepository: Repository<Hits>,
) {}
async findOne(id: number) {
let result= await this.usersRepository.findOne(id);
if(!result){
await this.create();
result=await this.findOne(1);
}
resul... | ismaeil-shajar/nest-docker | src/app.service.ts | TypeScript |
MethodDeclaration |
async findOne(id: number) {
let result= await this.usersRepository.findOne(id);
if(!result){
await this.create();
result=await this.findOne(1);
}
result.lasthits=result.hits
result.hits+=1
this.usersRepository.save(result);
return result;
} | ismaeil-shajar/nest-docker | src/app.service.ts | TypeScript |
MethodDeclaration |
create(): Promise<Hits> {
return this.usersRepository.save({id:1,hits:0,lasthits:0});
} | ismaeil-shajar/nest-docker | src/app.service.ts | TypeScript |
MethodDeclaration |
reset() {
return this.usersRepository.update({id:1},{id:1,hits:0,lasthits:0});
} | ismaeil-shajar/nest-docker | src/app.service.ts | TypeScript |
ArrowFunction |
(state: Store.RootReducer) => {
const {
filtered,
filteredForTextSearch,
filteredUnique
} = getFilteredValidators(state.validators);
const stats = getFilteredStats(state.validators);
const filterModified = isFilterDifferent(state.validators);
state.validators = {
...state.validators,
filt... | tarotaro080808/mini-validator-list | frontend/src/containers/UnlAnalyzer/UnlAnalyzerContainer.tsx | TypeScript |
ArrowFunction |
dispatch => {
return {
onInitValidators: () => dispatch(actions.fetchValidators()),
onApplyFilter: filter => dispatch(actions.applyFilter(filter)),
onResetFilter: () => dispatch(actions.resetFilter()),
onInitArchives: () => dispatch(actions.fetchArchives()),
onUpdateValidators: date => dispatch(a... | tarotaro080808/mini-validator-list | frontend/src/containers/UnlAnalyzer/UnlAnalyzerContainer.tsx | TypeScript |
ArrowFunction |
() => dispatch(actions.fetchValidators()) | tarotaro080808/mini-validator-list | frontend/src/containers/UnlAnalyzer/UnlAnalyzerContainer.tsx | TypeScript |
ArrowFunction |
filter => dispatch(actions.applyFilter(filter)) | tarotaro080808/mini-validator-list | frontend/src/containers/UnlAnalyzer/UnlAnalyzerContainer.tsx | TypeScript |
ArrowFunction |
() => dispatch(actions.resetFilter()) | tarotaro080808/mini-validator-list | frontend/src/containers/UnlAnalyzer/UnlAnalyzerContainer.tsx | TypeScript |
ArrowFunction |
() => dispatch(actions.fetchArchives()) | tarotaro080808/mini-validator-list | frontend/src/containers/UnlAnalyzer/UnlAnalyzerContainer.tsx | TypeScript |
ArrowFunction |
date => dispatch(actions.fetchValidators(date)) | tarotaro080808/mini-validator-list | frontend/src/containers/UnlAnalyzer/UnlAnalyzerContainer.tsx | TypeScript |
ArrowFunction |
(message, variant) =>
dispatch(actions.showNotification(message, variant, "")) | tarotaro080808/mini-validator-list | frontend/src/containers/UnlAnalyzer/UnlAnalyzerContainer.tsx | TypeScript |
ArrowFunction |
(title, items, handleSelect) =>
dispatch(actions.openDialog(title, items, "", handleSelect)) | tarotaro080808/mini-validator-list | frontend/src/containers/UnlAnalyzer/UnlAnalyzerContainer.tsx | TypeScript |
ArrowFunction |
(title, items, selectedValue, handleSelect) =>
dispatch(actions.openDialog(title, items, selectedValue, handleSelect)) | tarotaro080808/mini-validator-list | frontend/src/containers/UnlAnalyzer/UnlAnalyzerContainer.tsx | TypeScript |
ClassDeclaration |
class UnlAnalyzerContainer extends React.Component<any, any> {
componentDidMount() {
this.props.onInitValidators();
}
render() {
const {
vals,
app,
isLoading,
onSelectItemPanelOpen,
onDialogOpen
} = this.props;
return (
<React.Fragment>
<ToolbarLayout... | tarotaro080808/mini-validator-list | frontend/src/containers/UnlAnalyzer/UnlAnalyzerContainer.tsx | TypeScript |
MethodDeclaration |
componentDidMount() {
this.props.onInitValidators();
} | tarotaro080808/mini-validator-list | frontend/src/containers/UnlAnalyzer/UnlAnalyzerContainer.tsx | TypeScript |
MethodDeclaration |
render() {
const {
vals,
app,
isLoading,
onSelectItemPanelOpen,
onDialogOpen
} = this.props;
return (
<React.Fragment>
<ToolbarLayout title="UNL Analyzer" hideTitleOnXs />
<ContentLayout>
<CardLayout>
<CardLayoutItem>
... | tarotaro080808/mini-validator-list | frontend/src/containers/UnlAnalyzer/UnlAnalyzerContainer.tsx | TypeScript |
ClassDeclaration |
export class UserForm {
constructor(fb: FormBuilder) {
return {
username: ['', Validators.required],
passw: ['', [Validators.required, Validators.maxLength(20),Validators.minLength(6)]],
passy: ['', [Validators.required]],
email: ['', [Validators.required, V... | lutonda/Everest4.0-client | src/app/forms/user.form.ts | TypeScript |
ArrowFunction |
name => ({ name, kind: "warning" }) | 597abhinav/TypeScript | tests/cases/fourslash/javaScriptPrototype2.ts | TypeScript |
FunctionDeclaration |
function StructParam (props: Props): React.ReactElement<Props> {
const params = useParamDefs(props.registry, props.type);
const { className = '', isDisabled, label, onChange, overrides, withLabel } = props;
const _onChangeParams = useCallback(
(values: RawParam[]): void => {
onChange && onChange({
... | AxiaSolar-Js/apps | packages/react-params/src/Param/Struct.tsx | TypeScript |
ArrowFunction |
(values: RawParam[]): void => {
onChange && onChange({
isValid: values.reduce((result: boolean, { isValid }) => result && isValid, true),
value: params.reduce((value: Record<string, unknown>, { name }, index): Record<string, unknown> => {
value[name as string] = values[index].value;
... | AxiaSolar-Js/apps | packages/react-params/src/Param/Struct.tsx | TypeScript |
ArrowFunction |
(result: boolean, { isValid }) => result && isValid | AxiaSolar-Js/apps | packages/react-params/src/Param/Struct.tsx | TypeScript |
ArrowFunction |
(value: Record<string, unknown>, { name }, index): Record<string, unknown> => {
value[name as string] = values[index].value;
return value;
} | AxiaSolar-Js/apps | packages/react-params/src/Param/Struct.tsx | TypeScript |
ArrowFunction |
() => {
let component: ItemFrameValueInputComponent
let fixture: ComponentFixture<ItemFrameValueInputComponent>
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ItemFrameValueInputComponent],
}).compileComponents()
}))
beforeEach(() => {
fixture = TestBed.createCom... | Abroca/PoE-Overlay-Community-Fork | src/app/shared/module/poe/component/item-frame-value-input/item-frame-value-input.component.spec.ts | TypeScript |
ArrowFunction |
() => {
TestBed.configureTestingModule({
declarations: [ItemFrameValueInputComponent],
}).compileComponents()
} | Abroca/PoE-Overlay-Community-Fork | src/app/shared/module/poe/component/item-frame-value-input/item-frame-value-input.component.spec.ts | TypeScript |
ArrowFunction |
() => {
fixture = TestBed.createComponent(ItemFrameValueInputComponent)
component = fixture.componentInstance
fixture.detectChanges()
} | Abroca/PoE-Overlay-Community-Fork | src/app/shared/module/poe/component/item-frame-value-input/item-frame-value-input.component.spec.ts | TypeScript |
ArrowFunction |
async (setResources, setEditable) => {
const response = await fetch(`/resources${window.location.search}`)
const { resources, editable } = await response.json()
if (!response.ok) return
setResources(resources)
setEditable(editable)
} | romaingweb/covid19-bed-management | app/javascript/packs/application.tsx | TypeScript |
ArrowFunction |
() => {
const [resources, setResources] = React.useState([])
const [editable, setEditable] = React.useState('')
const [refreshTimer, setRefreshTimer] = React.useState(null)
const [viewMode, setViewMode] = React.useState(false)
React.useEffect(() => {
fetchResources(setResources, setEditable)
}, [])
... | romaingweb/covid19-bed-management | app/javascript/packs/application.tsx | TypeScript |
ArrowFunction |
() => {
fetchResources(setResources, setEditable)
} | romaingweb/covid19-bed-management | app/javascript/packs/application.tsx | TypeScript |
ArrowFunction |
() => {
if (viewMode) {
setRefreshTimer(setInterval(() => {
fetchResources(setResources, setEditable)
}, 10000))
} else {
setRefreshTimer(clearInterval(refreshTimer))
}
} | romaingweb/covid19-bed-management | app/javascript/packs/application.tsx | TypeScript |
ArrowFunction |
() => {
fetchResources(setResources, setEditable)
} | romaingweb/covid19-bed-management | app/javascript/packs/application.tsx | TypeScript |
ArrowFunction |
({ id, name, resources, updated_at }, index) => {
return <tr key={index}>
<td>{name}</td>
{editable === id && !viewMode ? <ResourcesEditor items={resources || {}} setResources={setResources} /> : <Resources items={resources} />}
<td>{moment(updated_at).format('DD MMM YYYY ... | romaingweb/covid19-bed-management | app/javascript/packs/application.tsx | TypeScript |
ArrowFunction |
() => {
ReactDOM.render(
<App />,
document.body.appendChild(document.createElement('div')),
)
} | romaingweb/covid19-bed-management | app/javascript/packs/application.tsx | TypeScript |
MethodDeclaration |
moment(updated_at) | romaingweb/covid19-bed-management | app/javascript/packs/application.tsx | TypeScript |
ArrowFunction |
async (context) => {
const session = await getSession({ req: context.req })
const user = session?.user as FullUser
return {
props: {
user: user?.role === 'ADMIN' || null,
},
}
} | strongly-labs/strong-js | apps/web/app-admin/pages/s/[...resource].tsx | TypeScript |
ArrowFunction |
({ user }: PageProps) => {
const router = useRouter()
const resourceName = router.query?.resource?.[0]
return (
<div className={styles.container}>
<Head>
<title>Strong-JS Admin</title>
<meta name="description" content="Strong-JS Admin" />
<link rel="icon" href="/favicon.ico" />... | strongly-labs/strong-js | apps/web/app-admin/pages/s/[...resource].tsx | TypeScript |
InterfaceDeclaration |
interface PageProps {
user: Partial<FullUser>
} | strongly-labs/strong-js | apps/web/app-admin/pages/s/[...resource].tsx | TypeScript |
FunctionDeclaration | // eslint-disable-next-line import/prefer-default-export
export function formatWalkerOutput(
wo: WalkerOutput,
_opts: Partial<FormatterOptions> = {},
): FormatterOutput {
const {
data: { sourceFiles },
} = wo;
const collector = createDataCollector();
Object.keys(sourceFiles)
.map((sf) => sourceFiles... | code-to-json/code-to-json | packages/formatter/src/formatter.ts | TypeScript |
ArrowFunction |
(sf) => sourceFiles[sf] | code-to-json/code-to-json | packages/formatter/src/formatter.ts | TypeScript |
ArrowFunction |
(sf) => collector.queue(sf, 'f') | code-to-json/code-to-json | packages/formatter/src/formatter.ts | TypeScript |
InterfaceDeclaration |
export interface FormatterOutputMetadata {
versions: {
core: string;
};
format: 'formatted';
} | code-to-json/code-to-json | packages/formatter/src/formatter.ts | TypeScript |
InterfaceDeclaration |
export interface FormatterOutputData {
sourceFiles: { [k: string]: FormattedSourceFile };
types: { [k: string]: FormattedType };
symbols: { [k: string]: FormattedSymbol };
declarations: { [k: string]: FormattedDeclaration };
nodes: { [k: string]: FormattedNode };
} | code-to-json/code-to-json | packages/formatter/src/formatter.ts | TypeScript |
InterfaceDeclaration |
export interface FormatterOutput {
codeToJson: FormatterOutputMetadata;
data: FormatterOutputData;
} | code-to-json/code-to-json | packages/formatter/src/formatter.ts | TypeScript |
InterfaceDeclaration |
export interface FormatterOptions {} | code-to-json/code-to-json | packages/formatter/src/formatter.ts | TypeScript |
MethodDeclaration |
handleType(ref: FormattedTypeRef, item: SerializedType): FormattedType {
return formatType(wo.data, item, ref, collector);
} | code-to-json/code-to-json | packages/formatter/src/formatter.ts | TypeScript |
MethodDeclaration |
handleSourceFile(ref: FormattedSourceFileRef, item: SerializedSourceFile): FormattedSourceFile {
return formatSourceFile(wo.data, item, ref, collector);
} | code-to-json/code-to-json | packages/formatter/src/formatter.ts | TypeScript |
MethodDeclaration |
handleSymbol(ref: FormattedSymbolRef, item: SerializedSymbol): FormattedSymbol {
return formatSymbol(wo.data, item, ref, collector);
} | code-to-json/code-to-json | packages/formatter/src/formatter.ts | TypeScript |
MethodDeclaration |
handleDeclaration(
ref: FormattedDeclarationRef,
item: SerializedDeclaration,
): FormattedDeclaration {
return formatDeclaration(wo.data, item, ref, collector);
} | code-to-json/code-to-json | packages/formatter/src/formatter.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.