type
stringclasses 7
values | content
stringlengths 4
9.55k
| repo
stringlengths 7
96
| path
stringlengths 4
178
| language
stringclasses 1
value |
---|---|---|---|---|
FunctionDeclaration |
export default function Checkbox(props: RZNTProps.Form.Checkbox) {
return (
<label {...props.containerProps} className={conclass('form-choicebox', props.containerProps?.className)}>
<span className="form-checkbox-control">
<input {...props} type="checkbox" className="form-checkbox-input"/>
<span className={conclass('form-checkbox-backdrop', props.backdropClassName)}></span>
<span className={conclass('form-checkbox-icon', props.iconClassName)}>
<svg className="fill-current text-white" xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 17.837 17.837" >
<g>
<path id="checkmark" d="M16.145,2.571c-0.272-0.273-0.718-0.273-0.99,0L6.92,10.804l-4.241-4.27 c-0.272-0.274-0.715-0.274-0.989,0L0.204,8.019c-0.272,0.271-0.272,0.717,0,0.99l6.217,6.258c0.272,0.271,0.715,0.271,0.99,0
L17.63,5.047c0.276-0.273,0.276-0.72,0-0.994L16.145,2.571z"/>
</g>
</svg>
</span>
</span>
<span className={conclass('form-checkbox-label', props.labelClassName)}>{props.label}</span>
</label>
);
} | rzfury/rz-next-tailwind | src/components/common/form/checkbox.tsx | TypeScript |
MethodDeclaration |
conclass('form-choicebox', props | rzfury/rz-next-tailwind | src/components/common/form/checkbox.tsx | TypeScript |
MethodDeclaration |
conclass('form-checkbox-icon', props | rzfury/rz-next-tailwind | src/components/common/form/checkbox.tsx | TypeScript |
MethodDeclaration |
conclass('form-checkbox-label', props | rzfury/rz-next-tailwind | src/components/common/form/checkbox.tsx | TypeScript |
TypeAliasDeclaration |
export type DownloadIconTypes = IconType; | rui-org/rummy-react-ui | packages/rummy-react-ui-icons/src/Download/Download.types.d.ts | TypeScript |
ArrowFunction |
(c) => onEnd((contents) => contents.push({
type: 'rect',
x: (c[0].x + c[1].x) / 2,
y: (c[0].y + c[1].y) / 2,
width: Math.abs(c[0].x - c[1].x),
height: Math.abs(c[0].y - c[1].y),
angle: 0,
} as RectContent)) | plantain-00/composable-editor-canvas | dev/commands/create-rect.tsx | TypeScript |
ArrowFunction |
(contents) => contents.push({
type: 'rect',
x: (c[0].x + c[1].x) / 2,
y: (c[0].y + c[1].y) / 2,
width: Math.abs(c[0].x - c[1].x),
height: Math.abs(c[0].y - c[1].y),
angle: 0,
} as RectContent) | plantain-00/composable-editor-canvas | dev/commands/create-rect.tsx | TypeScript |
MethodDeclaration |
useCommand({ onEnd, getAngleSnap, type }) {
const { line, onClick, onMove, input } = useLineClickCreate(
type === 'create rect',
(c) => onEnd((contents) => contents.push({
type: 'rect',
x: (c[0].x + c[1].x) / 2,
y: (c[0].y + c[1].y) / 2,
width: Math.abs(c[0].x - c[1].x),
height: Math.abs(c[0].y - c[1].y),
angle: 0,
} as RectContent)),
{
once: true,
getAngleSnap,
},
)
const assistentContents: (RectContent)[] = []
if (line) {
assistentContents.push({
type: 'rect',
x: (line[0].x + line[1].x) / 2,
y: (line[0].y + line[1].y) / 2,
width: Math.abs(line[0].x - line[1].x),
height: Math.abs(line[0].y - line[1].y),
angle: 0,
})
}
return {
onStart: onClick,
input,
onMove,
assistentContents,
}
} | plantain-00/composable-editor-canvas | dev/commands/create-rect.tsx | TypeScript |
ArrowFunction |
(info) => {
const newWxOutFiles = {}
let {appJSON} = info.entryInfo
// ๅขๅ ๅฏน weixin็ฎๅฝไธ็app.json ๆไปถๅค็
const userAppJSONPath = path.resolve(configure.inputFullpath, 'weixin', 'app.json')
if (fse.existsSync(userAppJSONPath)) {
const userAppJSON = require(userAppJSONPath)
appJSON = merge(appJSON, userAppJSON)
// ็งป้ค่พๅบ็ฎๅฝ็app.json
fse.unlinkSync(path.resolve(configure.outputFullpath, 'weixin', 'app.json'))
}
const appJSONPath = path.resolve(configure.outputFullpath, 'app.json')
newWxOutFiles[appJSONPath] = JSON.stringify(appJSON, null, '\t')
return newWxOutFiles
} | Kelin-Hong/alita | packages/alita-core/src/extractWxCompFiles/extractEntryFile.ts | TypeScript |
ArrowFunction |
(): RepositoryModel[] => [
{
title: 'Featured work',
subtitle: 'Some projects that Iโve finally finished... almost',
seeMore: 'I might have more',
url: 'https://www.linkedin.com/in/wikz87/',
collection: [
{
icon: '๐ค',
companyLogo: 'logo-achieve',
name: 'Achieve Test Prep',
url: 'https://prep.achievetestprep.com/',
description:
'A learning management system to help the students to achieve more in less time and using less money.',
status: 'done'
},
{
icon: '๐ค',
companyLogo: 'logo-kp',
name: '1on1 Quiz',
url: 'https://1on1quiz.com',
description: '1on1 Quiz - Competitive gaming platform',
status: 'done'
},
{
icon: '๐ค',
companyLogo: 'logo-kp',
name: 'Content Management System',
url: 'https://rcms.beaconhouse.net/',
description: 'A multi platforms(LMS) supported content management system',
status: 'done'
},
{
icon: '๐ค',
companyLogo: 'logo-git',
name: 'Portfolio Website',
url: 'https://github.com/wikz/Portfolio-Website',
description: "This one. Yep, you can check the cool stuff that I've used to build it",
status: 'in-progress'
},
{
icon: '๐ค',
companyLogo: 'logo-git',
name: 'Resource Preloader',
url: 'https://github.com/wikz/Resource-Preloader',
description:
'A JavaScript based powerful resource pre-loader with concurrent download and dependency resolving feature.',
status: 'done'
}
]
},
{
title: 'Mobile Applications',
subtitle: 'Some apps that I built',
seeMore: 'I might have more',
url: 'https://www.linkedin.com/in/wikz87/',
collection: [
{
icon: '๐ค',
companyLogo: 'logo-kp',
name: 'Learn Smart Pakistan',
url: 'https://play.google.com/store/apps/details?id=com.knowledgeplatform.lsp',
description:
'A cross-platform mobile application for Ultrabot(Learning Management System) with data storing and synching capability. Currently serving 250k+ students.',
status: 'done'
},
{
icon: '๐ค',
companyLogo: 'logo-kp',
name: 'Ultrabot Prime',
url: 'https://play.google.com/store/apps/details?id=com.knowledgeplatform.ultrabotprime',
description: 'A cross-platform mobile LMS App created for M1 Singapore.',
status: 'done'
},
{
icon: '๐ค',
companyLogo: 'logo-kp',
name: 'Literacy & Numeracy Placement',
url: '',
description: 'A multilingual app built in collaboration with World bank and used by 50k+ individual users.',
status: 'done'
}
]
},
{
title: 'Applications',
subtitle: "Some Web & desktop Applications I've worked on",
seeMore: 'I might have more',
url: 'https://www.linkedin.com/in/wikz87/',
collection: [
{
icon: '๐ค',
companyLogo: 'logo-achieve',
name: 'Achieve Test Prep',
url: 'https://prep.achievetestprep.com/',
description:
'A learning management system to help the students to achieve more in less time and using less money.',
status: 'done'
},
{
icon: '๐ค',
companyLogo: 'logo-kp',
name: '1on1 Quiz',
url: 'https://1on1quiz.com',
description: '1on1 Quiz - Competitive gaming platform',
status: 'done'
},
{
icon: '๐ค',
companyLogo: 'logo-kp',
name: 'Content Management System',
url: 'https://rcms.beaconhouse.net/',
description: 'A multi platforms(LMS) supported content management system',
status: 'done'
},
{
icon: '๐ค',
companyLogo: 'logo-ewi',
name: 'Voice Activated FM Audio Broadcast Logger',
url: '#',
description: 'An Audio logging software for Radio transmissions. Logs audio transmission in mp3 audio clips.',
status: 'done'
},
{
icon: '๐ค',
companyLogo: 'logo-ewi',
name: 'Audio Broadcast Profanity Delay System',
url: '#',
description: 'A software being used in Radio transmission broadcasting industry.',
status: 'done'
}
]
},
{
title: 'CrossPlatform Games',
subtitle: 'Some games that Iโve launched successfully',
seeMore: 'I might have more',
url: 'https://www.linkedin.com/in/wikz87/',
collection: [
{
icon: '๐ค',
companyLogo: 'logo-kp',
name: 'Dino Eggs',
url: 'http://gamesdemo.knowledgeplatform.com/demos/dino-eggs/',
description:
'A multi-level online game covering 120+ mastery topics of mathematics for middle school students.',
status: 'done'
},
{
icon: '๐ค',
companyLogo: 'logo-kp',
name: 'Factor Monsters',
url: 'https://apps.apple.com/pk/app/factor-monsters/id987903121',
description: 'A drill to master different skills pertaining to factorization.',
status: 'done'
},
{
icon: '๐ค',
companyLogo: 'logo-kp',
name: 'Mind Tussle',
url: 'https://apps.apple.com/pk/app/mind-tussle/id1052659847',
description: 'Improve mental math in an online 1-on-1, time-bound 3 levels game.',
status: 'done'
},
{
icon: '๐ค',
companyLogo: 'logo-kp',
name: 'Martian Multiples',
url: 'https://apps.apple.com/pk/app/martian-multiples/id1101691574',
description: 'A game to master skills of finding Least common multiples and Highest common factors.',
status: 'done'
},
{
icon: '๐ค',
companyLogo: 'logo-kp',
name: 'Kampong',
url: 'http://gamesdemo.knowledgeplatform.com/demos/kampong/',
description: 'A card game based on adaptive templates for primary content.',
status: 'done'
}
]
}
] | toadeelali/Portfolio-Website | src/containers/repositories/RepositoriesData.ts | TypeScript |
InterfaceDeclaration |
export interface SingleProjectModel {
icon: '๐ค'
companyLogo: string
name: string
url: string
description: string
status: 'done' | 'in-progress' | 'to-do'
} | toadeelali/Portfolio-Website | src/containers/repositories/RepositoriesData.ts | TypeScript |
InterfaceDeclaration |
export interface RepositoryModel {
title: String
subtitle: String
seeMore: String
url: String
collection: SingleProjectModel[]
} | toadeelali/Portfolio-Website | src/containers/repositories/RepositoriesData.ts | TypeScript |
TypeAliasDeclaration |
export type HeaderModelName = 'default' | 'headphones' | 'drawing' | 'dude' | toadeelali/Portfolio-Website | src/containers/repositories/RepositoriesData.ts | TypeScript |
ArrowFunction |
() => {
return (
<StateManagerProvider stateManager={stateManager}>
<h1 style={{padding: "1rem"}}>
For multiple queries with the same variables but different shapes,
queries with smaller shapes will not send out HTTP requests,
they will borrow the HTTP request of the query with the largest shape.
</h1>
<Row gutter={10}>
<Col span={12}>
<Filter/>
<SmallestShape/>
<BiggestShape/>
<MiddleShape/>
</Col>
<Col span={12}>
<HttpLogList/>
</Col>
</Row>
</StateManagerProvider> | babyfish-ct/graph-state | example/client/src/graph/http/shape/App.tsx | TypeScript |
ArrowFunction |
(
center: IPosition,
current: IPosition,
angle: number
): IPosition => {
const radians = (Math.PI / 180) * angle;
const cos = Math.cos(radians);
const sin = Math.sin(radians);
const x =
cos * (current.x - center.x) + sin * (current.y - center.y) + center.x;
const y =
cos * (current.y - center.y) - sin * (current.x - center.x) + center.y;
return { x, y };
} | christianalfoni/reactive-app | editor/src/client/flow-chart/container/utils/rotate.ts | TypeScript |
InterfaceDeclaration |
export interface ThemeState {
theme: Theme;
muiTheme: any;
themeSelection: string;
themeList: string[];
changeTheme?: (value: string) => void;
} | FirmaChain/FirmaChain-Explorer | src/contexts/settings/types.ts | TypeScript |
InterfaceDeclaration |
export interface DateFormatState {
dateFormat: 'locale' | 'utc';
changeDateFormat?: (value: string) => void;
dateFormatList: string[];
} | FirmaChain/FirmaChain-Explorer | src/contexts/settings/types.ts | TypeScript |
TypeAliasDeclaration |
export type Theme = 'light' | 'dark' | 'device' | 'deuteranopia' | 'tritanopia' | 'achromatopsia'; | FirmaChain/FirmaChain-Explorer | src/contexts/settings/types.ts | TypeScript |
TypeAliasDeclaration |
export type SettingsState = ThemeState & DateFormatState; | FirmaChain/FirmaChain-Explorer | src/contexts/settings/types.ts | TypeScript |
ClassDeclaration |
class Footer extends React.Component {
render() {
return (
<Fragment>
<footer className="footer">
<Row className="align-items-center justify-content-xl-between">
<Col xl="6">
<div className="copyright text-center text-xl-left text-muted">
ยฉ 2018{" "}
<a
className="font-weight-bold ml-1"
href="https://www.creative-tim.com?ref=adr-admin-footer"
rel="noopener noreferrer"
target="_blank"
>
Creative Tim
</a>
</div>
</Col>
<Col xl="6">
<Nav className="nav-footer justify-content-center justify-content-xl-end">
<NavItem>
<NavLink
href="https://www.creative-tim.com?ref=adr-admin-footer"
rel="noopener noreferrer"
target="_blank"
>
Creative Tim
</NavLink>
</NavItem>
<NavItem>
<NavLink
href="https://www.creative-tim.com/presentation?ref=adr-admin-footer"
rel="noopener noreferrer"
target="_blank"
>
About Us
</NavLink>
</NavItem>
<NavItem>
<NavLink
href="http://blog.creative-tim.com?ref=adr-admin-footer"
rel="noopener noreferrer"
target="_blank"
>
Blog
</NavLink>
</NavItem>
<NavItem>
<NavLink
href="https://github.com/creativetimofficial/argon-dashboard/blob/master/LICENSE.md?ref=adr-admin-footer"
rel="noopener noreferrer"
target="_blank"
>
MIT License
</NavLink>
</NavItem>
</Nav>
</Col>
</Row>
</footer>
</Fragment>
);
}
} | dilsonjlrjr/argon-dashboard-react-typescript | src/components/Footers/AdminFooter.tsx | TypeScript |
MethodDeclaration |
render() {
return (
<Fragment>
<footer className="footer">
<Row className="align-items-center justify-content-xl-between">
<Col xl="6">
<div className="copyright text-center text-xl-left text-muted">
ยฉ 2018{" "}
<a
className="font-weight-bold ml-1"
href="https://www.creative-tim.com?ref=adr-admin-footer"
rel="noopener noreferrer"
target="_blank"
>
Creative Tim
</a>
</div>
</Col>
<Col xl="6">
<Nav className="nav-footer justify-content-center justify-content-xl-end">
<NavItem>
<NavLink
href="https://www.creative-tim.com?ref=adr-admin-footer"
rel="noopener noreferrer"
target="_blank"
>
Creative Tim
</NavLink>
</NavItem>
<NavItem>
<NavLink
href="https://www.creative-tim.com/presentation?ref=adr-admin-footer"
rel="noopener noreferrer"
target="_blank"
>
About Us
</NavLink>
</NavItem>
<NavItem>
<NavLink
href="http://blog.creative-tim.com?ref=adr-admin-footer"
rel="noopener noreferrer"
target="_blank"
>
Blog
</NavLink>
</NavItem>
<NavItem>
<NavLink
href="https://github.com/creativetimofficial/argon-dashboard/blob/master/LICENSE.md?ref=adr-admin-footer"
rel="noopener noreferrer"
target="_blank"
>
MIT License
</NavLink>
</NavItem>
</Nav>
</Col>
</Row>
</footer>
</Fragment>
);
} | dilsonjlrjr/argon-dashboard-react-typescript | src/components/Footers/AdminFooter.tsx | TypeScript |
ArrowFunction |
() => {
return (
<div>
<div className="text-center mb-20">
<h1 className="sm:text-3xl text-2xl font-medium text-center title-font text-gray-900 mb-4">
Frequently Asked Question
</h1>
<p className="text-base leading-relaxed xl:w-2/4 lg:w-3/4 mx-auto">
The most common questions about how our business works and what can do
for you.
</p>
</div>
<div className="flex flex-wrap lg:w-4/5 sm:mx-auto sm:mb-2 -mx-2">
<div className="w-full lg:w-1/2 px-4 py-2">
<details className="mb-4">
<summary className="font-semibold bg-gray-200 rounded py-2 px-4">
How Long is this site live?
</summary>
<span>
Laboris qui labore cillum culpa in sunt quis sint veniam. Dolore
ex aute deserunt esse ipsum elit aliqua. Aute quis minim velit
nostrud pariatur culpa magna in aute.
</span>
</details>
<details className="mb-4">
<summary className="font-semibold bg-gray-200 rounded py-2 px-4">
Can I install/upload anything I want on there?
</summary>
<span>
Laboris qui labore cillum culpa in sunt quis sint veniam. Dolore
ex aute deserunt esse ipsum elit aliqua. Aute quis minim velit
nostrud pariatur culpa magna in aute.
</span>
</details>
<details className="mb-4">
<summary className="font-semibold bg-gray-200 rounded py-2 px-4">
How can I migrate to another site?
</summary>
<span>
Laboris qui labore cillum culpa in sunt quis sint veniam. Dolore
ex aute deserunt esse ipsum elit aliqua. Aute quis minim velit
nostrud pariatur culpa magna in aute.
</span>
</details>
</div>
<div className="w-full lg:w-1/2 px-4 py-2">
<details className="mb-4">
<summary className="font-semibold bg-gray-200 rounded py-2 px-4">
Can I change the domain you give me?
</summary>
<span className="px-4 py-2">
Laboris qui labore cillum culpa in sunt quis sint veniam. Dolore
ex aute deserunt esse ipsum elit aliqua. Aute quis minim velit
nostrud pariatur culpa magna in aute.
</span>
</details>
<details className="mb-4">
<summary className="font-semibold bg-gray-200 rounded py-2 px-4">
How many sites I can create at once?
</summary>
<span className="px-4 py-2">
Laboris qui labore cillum culpa in sunt quis sint veniam. Dolore
ex aute deserunt esse ipsum elit aliqua. Aute quis minim velit
nostrud pariatur culpa magna in aute.
</span>
</details>
<details className="mb-4">
<summary className="font-semibold bg-gray-200 rounded py-2 px-4">
How can I communicate with you?
</summary>
<span className="px-4 py-2">
Laboris qui labore cillum culpa in sunt quis sint veniam. Dolore
ex aute deserunt esse ipsum elit aliqua. Aute quis minim velit
nostrud pariatur culpa magna in aute.
</span>
</details>
</div>
</div>
</div> | tomstagl/tomstagl.com | src/components/FrequentlyAskedQuestions/FrequentlyAskedQuestions.tsx | TypeScript |
FunctionDeclaration |
export function PlantCardSecondary({ data, handleRemove, ...rest }: PlantProps) {
return (
<Swipeable
overshootRight={false}
renderRightActions={() => (
<Animated.View>
<View>
<RectButton style={styles.buttonRemove} onPress={handleRemove}>
<Feather name="trash" size={32} color={colors.white} />
</RectButton>
</View>
</Animated.View>
)} | lukkanog/plant-manager | src/components/PlantCardSecondary.tsx | TypeScript |
InterfaceDeclaration |
interface PlantProps extends RectButtonProps {
data: {
name: string;
photo: string;
hour: string;
};
handleRemove: () => void;
} | lukkanog/plant-manager | src/components/PlantCardSecondary.tsx | TypeScript |
ArrowFunction |
() => {
let component: OutOfStockWindowComponent;
let fixture: ComponentFixture<OutOfStockWindowComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ OutOfStockWindowComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(OutOfStockWindowComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
} | AJEETX/Pharmacy-Mangment-System | src/app/mainwindow/a-exp-outofstock-window/out-of-stock-window/out-of-stock-window.component.spec.ts | TypeScript |
ArrowFunction |
() => {
TestBed.configureTestingModule({
declarations: [ OutOfStockWindowComponent ]
})
.compileComponents();
} | AJEETX/Pharmacy-Mangment-System | src/app/mainwindow/a-exp-outofstock-window/out-of-stock-window/out-of-stock-window.component.spec.ts | TypeScript |
ArrowFunction |
() => {
fixture = TestBed.createComponent(OutOfStockWindowComponent);
component = fixture.componentInstance;
fixture.detectChanges();
} | AJEETX/Pharmacy-Mangment-System | src/app/mainwindow/a-exp-outofstock-window/out-of-stock-window/out-of-stock-window.component.spec.ts | TypeScript |
ClassDeclaration |
@NgModule({
declarations: [],
imports: [
SharedModule
],
providers: [
{
provide: HTTP_INTERCEPTORS,
useClass: HttpInterceptorService,
multi: true
},
AuthService,
AuthGuard,
]
})
export class CoreModule { } | nirajkarki12/leader-registration | src/app/modules/core/core.module.ts | TypeScript |
ArrowFunction |
() => {
test('all changes when total amount is below limit', () => {
const summary = createSummary(
[
{
type: ChangeType.FieldRemoved,
message: 'breaking-1',
criticality: {
level: CriticalityLevel.Breaking,
},
},
{
type: ChangeType.FieldRemoved,
message: 'breaking-2',
criticality: {
level: CriticalityLevel.Breaking,
},
},
{
type: ChangeType.FieldAdded,
message: 'safe-3',
criticality: {
level: CriticalityLevel.NonBreaking,
},
},
],
3,
);
expect(summary).toContain('- breaking-1');
expect(summary).toContain('- breaking-2');
expect(summary).toContain('- safe-3');
expect(summary).not.toContain('summaryLimit');
});
test('only breaking changes when total is above limit and breaking is below or equal', () => {
const summary = createSummary(
[
{
type: ChangeType.FieldRemoved,
message: 'breaking-1',
criticality: {
level: CriticalityLevel.Breaking,
},
},
{
type: ChangeType.FieldRemoved,
message: 'breaking-2',
criticality: {
level: CriticalityLevel.Breaking,
},
},
{
type: ChangeType.FieldRemoved,
message: 'breaking-3',
criticality: {
level: CriticalityLevel.Breaking,
},
},
{
type: ChangeType.FieldAdded,
message: 'safe-4',
criticality: {
level: CriticalityLevel.NonBreaking,
},
},
],
3,
);
expect(summary).toContain('- breaking-1');
expect(summary).toContain('- breaking-2');
expect(summary).toContain('- breaking-3');
expect(summary).not.toContain('- safe-4');
expect(summary).toContain('summaryLimit');
});
test('empty when total and breaking are above limit', () => {
const summary = createSummary(
[
{
type: ChangeType.FieldRemoved,
message: 'breaking-1',
criticality: {
level: CriticalityLevel.Breaking,
},
},
{
type: ChangeType.FieldRemoved,
message: 'breaking-2',
criticality: {
level: CriticalityLevel.Breaking,
},
},
{
type: ChangeType.FieldRemoved,
message: 'breaking-3',
criticality: {
level: CriticalityLevel.Breaking,
},
},
{
type: ChangeType.FieldAdded,
message: 'safe-4',
criticality: {
level: CriticalityLevel.NonBreaking,
},
},
],
2,
);
expect(summary).not.toContain('- breaking-1');
expect(summary).not.toContain('- breaking-2');
expect(summary).not.toContain('- breaking-3');
expect(summary).not.toContain('- safe-4');
expect(summary).toContain('summaryLimit');
});
} | kamilkisiela/graphql-schema-comparator | packages/github/__tests__/utils.ts | TypeScript |
ArrowFunction |
() => {
const summary = createSummary(
[
{
type: ChangeType.FieldRemoved,
message: 'breaking-1',
criticality: {
level: CriticalityLevel.Breaking,
},
},
{
type: ChangeType.FieldRemoved,
message: 'breaking-2',
criticality: {
level: CriticalityLevel.Breaking,
},
},
{
type: ChangeType.FieldAdded,
message: 'safe-3',
criticality: {
level: CriticalityLevel.NonBreaking,
},
},
],
3,
);
expect(summary).toContain('- breaking-1');
expect(summary).toContain('- breaking-2');
expect(summary).toContain('- safe-3');
expect(summary).not.toContain('summaryLimit');
} | kamilkisiela/graphql-schema-comparator | packages/github/__tests__/utils.ts | TypeScript |
ArrowFunction |
() => {
const summary = createSummary(
[
{
type: ChangeType.FieldRemoved,
message: 'breaking-1',
criticality: {
level: CriticalityLevel.Breaking,
},
},
{
type: ChangeType.FieldRemoved,
message: 'breaking-2',
criticality: {
level: CriticalityLevel.Breaking,
},
},
{
type: ChangeType.FieldRemoved,
message: 'breaking-3',
criticality: {
level: CriticalityLevel.Breaking,
},
},
{
type: ChangeType.FieldAdded,
message: 'safe-4',
criticality: {
level: CriticalityLevel.NonBreaking,
},
},
],
3,
);
expect(summary).toContain('- breaking-1');
expect(summary).toContain('- breaking-2');
expect(summary).toContain('- breaking-3');
expect(summary).not.toContain('- safe-4');
expect(summary).toContain('summaryLimit');
} | kamilkisiela/graphql-schema-comparator | packages/github/__tests__/utils.ts | TypeScript |
ArrowFunction |
() => {
const summary = createSummary(
[
{
type: ChangeType.FieldRemoved,
message: 'breaking-1',
criticality: {
level: CriticalityLevel.Breaking,
},
},
{
type: ChangeType.FieldRemoved,
message: 'breaking-2',
criticality: {
level: CriticalityLevel.Breaking,
},
},
{
type: ChangeType.FieldRemoved,
message: 'breaking-3',
criticality: {
level: CriticalityLevel.Breaking,
},
},
{
type: ChangeType.FieldAdded,
message: 'safe-4',
criticality: {
level: CriticalityLevel.NonBreaking,
},
},
],
2,
);
expect(summary).not.toContain('- breaking-1');
expect(summary).not.toContain('- breaking-2');
expect(summary).not.toContain('- breaking-3');
expect(summary).not.toContain('- safe-4');
expect(summary).toContain('summaryLimit');
} | kamilkisiela/graphql-schema-comparator | packages/github/__tests__/utils.ts | TypeScript |
ClassDeclaration | /*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* ๋์๋ณด๋ ์ต์
๊ตฌ์กฐ์ฒด
*/
export class BoardGlobalOptions {
public layout?: BoardLayoutOptions; // ๋์๋ณด๋ ๋ ์ด์์ ์ ๋ณด
public widget?: BoardWidgetOptions; // ์ฐจํธ ํํ ๋ฐฉ์ ์ค์
public sync?: BoardSyncOptions; // ๋์๋ณด๋ ์ค์๊ฐ ์ต์
์ ๋ณด
constructor() {
this.layout = new BoardLayoutOptions();
this.widget = new BoardWidgetOptions();
}
} | 0xflotus/metatron-discovery | discovery-frontend/src/app/domain/dashboard/dashboard.globalOptions.ts | TypeScript |
ClassDeclaration | /**
* ๋์๋ณด๋ ์ต์
- ๋ ์ด์์ ํํ ์ ์ ์ต์
๊ตฌ์กฐ์ฒด
*/
export class BoardLayoutOptions {
public layoutType:BoardLayoutType; // Layout Type
public layoutHeight:number; // height value, if layoutType set FIT_TO_HEIGHT
public widgetPadding:number; // widget ๊ฐ ๊ฐ๊ฒฉ
constructor() {
this.layoutType = BoardLayoutType.FIT_TO_SCREEN;
this.widgetPadding = 5;
}
} | 0xflotus/metatron-discovery | discovery-frontend/src/app/domain/dashboard/dashboard.globalOptions.ts | TypeScript |
ClassDeclaration | /**
* ๋์๋ณด๋ ์ต์
- ์ฐจํธ ์์ฑ ํ์ ์ต์
๊ตฌ์กฐ์ฒด
*/
export class BoardWidgetOptions {
public showTitle: WidgetShowType;
public showLegend: WidgetShowType;
public showMinimap: WidgetShowType;
constructor() {
this.showTitle = WidgetShowType.BY_WIDGET;
this.showLegend = WidgetShowType.BY_WIDGET;
this.showMinimap = WidgetShowType.BY_WIDGET;
}
} | 0xflotus/metatron-discovery | discovery-frontend/src/app/domain/dashboard/dashboard.globalOptions.ts | TypeScript |
ClassDeclaration | /**
* ๋์๋ณด๋ ์ต์
- ์ค์๊ฐ ์ต์
๊ตฌ์กฐ์ฒด
*/
export class BoardSyncOptions {
public enabled: boolean = false;
public interval: number;
constructor(interval?: number) {
if (interval) {
this.enabled = true;
this.interval = interval;
}
}
} | 0xflotus/metatron-discovery | discovery-frontend/src/app/domain/dashboard/dashboard.globalOptions.ts | TypeScript |
EnumDeclaration | /**
* ๋ ์ด์์ ํ์
*/
export enum BoardLayoutType {
FIT_TO_SCREEN = <any>'FIT_TO_SCREEN',
FIT_TO_HEIGHT = <any>'FIT_TO_HEIGHT'
} | 0xflotus/metatron-discovery | discovery-frontend/src/app/domain/dashboard/dashboard.globalOptions.ts | TypeScript |
EnumDeclaration | /**
* ์์ ฏ ํ์ ์ฌ๋ถ
*/
export enum WidgetShowType {
ON = <any>'ON',
OFF = <any>'OFF',
BY_WIDGET = <any>'BY_WIDGET'
} | 0xflotus/metatron-discovery | discovery-frontend/src/app/domain/dashboard/dashboard.globalOptions.ts | TypeScript |
ArrowFunction |
loader => this.updateNotification(loader ? NotificationTypeEnum.Loader : NotificationTypeEnum.None) | TopWebGhost/Yahoo-API-Angular | src/client/app/core/api-notification.ts | TypeScript |
ArrowFunction |
error => this.updateNotification(error ? NotificationTypeEnum.Error : NotificationTypeEnum.None, error) | TopWebGhost/Yahoo-API-Angular | src/client/app/core/api-notification.ts | TypeScript |
ClassDeclaration |
export class CoreApiNotification extends Subscriptions {
notification:string;
notificationType:NotificationTypeEnum;
button:NotificationButtonInterface;
constructor(private state:CoreApiStateService,
private apiService:any) {
super();
this.subscriptions.push(state.loader$.subscribe(
loader => this.updateNotification(loader ? NotificationTypeEnum.Loader : NotificationTypeEnum.None)
));
this.subscriptions.push(state.error$.subscribe(
error => this.updateNotification(error ? NotificationTypeEnum.Error : NotificationTypeEnum.None, error)
));
}
notificationAction(type:string) {
if (type === NotificationActions.Reload) {
this.apiService.reload();
}
}
updateNotification(type:NotificationTypeEnum, value:any = null, button:NotificationButtonInterface = null) {
this.notificationType = type;
if (type === NotificationTypeEnum.Error) {
this.notification = value.value;
this.button = {
icon: 'refresh',
text: 'Try Again',
action: NotificationActions.Reload
};
} else {
this.button = button;
this.notification = value;
}
}
} | TopWebGhost/Yahoo-API-Angular | src/client/app/core/api-notification.ts | TypeScript |
ClassDeclaration |
export class NotificationActions {
static Reload = 'reload';
} | TopWebGhost/Yahoo-API-Angular | src/client/app/core/api-notification.ts | TypeScript |
MethodDeclaration |
notificationAction(type:string) {
if (type === NotificationActions.Reload) {
this.apiService.reload();
}
} | TopWebGhost/Yahoo-API-Angular | src/client/app/core/api-notification.ts | TypeScript |
MethodDeclaration |
updateNotification(type:NotificationTypeEnum, value:any = null, button:NotificationButtonInterface = null) {
this.notificationType = type;
if (type === NotificationTypeEnum.Error) {
this.notification = value.value;
this.button = {
icon: 'refresh',
text: 'Try Again',
action: NotificationActions.Reload
};
} else {
this.button = button;
this.notification = value;
}
} | TopWebGhost/Yahoo-API-Angular | src/client/app/core/api-notification.ts | TypeScript |
ClassDeclaration |
export default class PriceInput extends DecimalInput {
decimals(): number {
return app.forum.attribute('priceDecimals');
}
} | flamarkt/core | js/src/common/components/PriceInput.ts | TypeScript |
MethodDeclaration |
decimals(): number {
return app.forum.attribute('priceDecimals');
} | flamarkt/core | js/src/common/components/PriceInput.ts | TypeScript |
FunctionDeclaration |
export function getLab(args: GetLabArgs, opts?: pulumi.InvokeOptions): Promise<GetLabResult> {
if (!opts) {
opts = {}
}
if (!opts.version) {
opts.version = utilities.getVersion();
}
return pulumi.runtime.invoke("azure-nextgen:labservices/latest:getLab", {
"expand": args.expand,
"labAccountName": args.labAccountName,
"labName": args.labName,
"resourceGroupName": args.resourceGroupName,
}, opts);
} | test-wiz-sec/pulumi-azure-nextgen | sdk/nodejs/labservices/latest/getLab.ts | TypeScript |
InterfaceDeclaration |
export interface GetLabArgs {
/**
* Specify the $expand query. Example: 'properties($select=maxUsersInLab)'
*/
readonly expand?: string;
/**
* The name of the lab Account.
*/
readonly labAccountName: string;
/**
* The name of the lab.
*/
readonly labName: string;
/**
* The name of the resource group.
*/
readonly resourceGroupName: string;
} | test-wiz-sec/pulumi-azure-nextgen | sdk/nodejs/labservices/latest/getLab.ts | TypeScript |
InterfaceDeclaration | /**
* Represents a lab.
*/
export interface GetLabResult {
/**
* Object id of the user that created the lab.
*/
readonly createdByObjectId: string;
/**
* Lab creator name
*/
readonly createdByUserPrincipalName: string;
/**
* Creation date for the lab
*/
readonly createdDate: string;
/**
* Invitation code that users can use to join a lab.
*/
readonly invitationCode: string;
/**
* The details of the latest operation. ex: status, error
*/
readonly latestOperationResult: outputs.labservices.latest.LatestOperationResultResponse;
/**
* The location of the resource.
*/
readonly location?: string;
/**
* Maximum number of users allowed in the lab.
*/
readonly maxUsersInLab?: number;
/**
* The name of the resource.
*/
readonly name: string;
/**
* The provisioning status of the resource.
*/
readonly provisioningState?: string;
/**
* The tags of the resource.
*/
readonly tags?: {[key: string]: string};
/**
* The type of the resource.
*/
readonly type: string;
/**
* The unique immutable identifier of a resource (Guid).
*/
readonly uniqueIdentifier?: string;
/**
* Maximum duration a user can use an environment for in the lab.
*/
readonly usageQuota?: string;
/**
* Lab user access mode (open to all vs. restricted to those listed on the lab).
*/
readonly userAccessMode?: string;
/**
* Maximum value MaxUsersInLab can be set to, as specified by the service
*/
readonly userQuota: number;
} | test-wiz-sec/pulumi-azure-nextgen | sdk/nodejs/labservices/latest/getLab.ts | TypeScript |
TypeAliasDeclaration |
export type IDataColumn = Column & {
title?: string;
disableHidden?: boolean;
disableSortBy?: boolean;
filterValue?: any;
preFilteredRows?: any;
setFilter?: any;
}; | RFXTechnologies/fleet | frontend/interfaces/datatable_config.ts | TypeScript |
InterfaceDeclaration | /**
* tasks
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* OpenAPI spec version: 2.13
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface TasksEnqueueManyResponseSucceeded {
/**
* ID of the succeeded entity
*/
id?: string;
/**
* Number of tasks updated (0 or 1)
*/
updated?: number;
/**
* Updated fields names and values
*/
fields?: object;
/**
* Indicates whether the task was queued
*/
queued?: boolean;
} | allegroai/clearml-web | src/app/business-logic/model/tasks/tasksEnqueueManyResponseSucceeded.ts | TypeScript |
ClassDeclaration |
export abstract class Source {
size(): number;
map(options?: any): any;
sourceAndMap(options?: any): {
source: string;
map: RawSourceMap;
};
updateHash(hash: Hash): void;
source(options?: any): string;
node(options?: any): any;
listNode(options?: any): any;
listMap(options?: any): any;
} | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
ClassDeclaration |
export class CachedSource {
_source: Source;
_cachedSource: string;
_cachedSize: number;
_cachedMaps: {
[prop: string]: RawSourceMap
};
node: (options: any) => SourceNode;
listMap: (options: any) => SourceListMap;
constructor(source: Source);
source(): string;
size(): number;
sourceAndMap(options: any): {
source: string;
map: RawSourceMap;
};
map(options: any): RawSourceMap;
updateHash(hash: Hash): void;
} | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
ClassDeclaration |
export class ConcatSource extends Source implements SourceAndMapMixin {
children: Array<(string | Source)>;
constructor(...args: Array<(string | Source)>);
add(item: string | Source): void;
source(): string;
size(): number;
node(options: any): SourceNode;
listMap(options: any): SourceListMap;
updateHash(hash: Hash): void;
} | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
ClassDeclaration |
export class LineToLineMappedSource extends Source implements SourceAndMapMixin {
_value: string;
_name: string;
_originalSource: string;
constructor(value: string, name: string, originalSource: string);
source(): string;
node(options: any): SourceNode;
listMap(options: any): SourceListMap;
updateHash(hash: Hash): void;
} | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
ClassDeclaration |
export class OriginalSource extends Source implements SourceAndMapMixin {
_value: string;
_name: string;
constructor(value: string, name: string);
source(): string;
node(
options?: {
columns?: boolean;
}
): SourceNode;
listMap(options: any): SourceListMap;
updateHash(hash: Hash): void;
} | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
ClassDeclaration |
export class PrefixSource extends Source implements SourceAndMapMixin {
_source: Source | string;
_prefix: Source | string;
constructor(prefix: Source | string, source: Source | string);
source(): string;
node(options: any): SourceNode;
listMap(options: any): SourceListMap;
updateHash(hash: Hash): void;
} | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
ClassDeclaration |
export class RawSource extends Source {
_value: string;
constructor(value: string);
source(): string;
map(options: any): null;
node(options: any): SourceNode;
listMap(options: any): SourceListMap;
updateHash(hash: Hash): void;
} | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
ClassDeclaration |
export class ReplaceSource extends Source implements SourceAndMapMixin {
_source: Source;
_name: string;
replacements: any[][];
constructor(source: Source, name: string);
replace(start: number, end: number, newValue: string): void;
insert(pos: number, newValue: string): void;
source(): string;
_sortReplacements(): void;
_replaceString(str: string): string;
node(options: any): SourceNode;
listMap(options: any): SourceListMap;
_replacementToSourceNode(oldNode: SourceNode, newString: string): string | SourceNode;
_splitSourceNode(node: SourceNode, position: SourceNode[]): SourceNode[];
_splitSourceNode(node: string, position: number): number;
_splitString(str: string, position: number): string[];
} | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
ClassDeclaration |
export class SourceMapSource extends Source implements SourceAndMapMixin {
_value: string;
_name: string;
_sourceMap: SourceMapGenerator | RawSourceMap;
_originalSource: string;
_innerSourceMap: RawSourceMap;
constructor(
value: string,
name: string,
sourceMap: SourceMapGenerator | RawSourceMap,
originalSource?: string,
innerSourceMap?: RawSourceMap
);
source(): string;
node(): SourceNode;
listMap(
options: {
module?: boolean;
}
): SourceListMap;
updateHash(hash: Hash): void;
} | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
InterfaceDeclaration |
export interface SourceAndMapMixin {
map(options: { columns?: boolean }): RawSourceMap;
sourceAndMap(options: { columns?: boolean }): {
source: string;
map: RawSourceMap;
};
} | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
MethodDeclaration |
size(): number; | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
MethodDeclaration |
map(options?: any): any; | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
MethodDeclaration |
sourceAndMap(options?: any): {
source: string;
map: RawSourceMap;
}; | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
MethodDeclaration |
updateHash(hash: Hash): void; | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
MethodDeclaration |
source(options?: any): string; | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
MethodDeclaration |
node(options?: any): any; | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
MethodDeclaration |
listNode(options?: any): any; | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
MethodDeclaration |
listMap(options?: any): any; | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
MethodDeclaration |
source(): string; | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
MethodDeclaration |
sourceAndMap(options: any): {
source: string;
map: RawSourceMap;
}; | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
MethodDeclaration |
map(options: any): RawSourceMap; | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
MethodDeclaration |
add(item: string | Source): void; | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
MethodDeclaration |
node(options: any): SourceNode; | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
MethodDeclaration |
listMap(options: any): SourceListMap; | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
MethodDeclaration |
node(
options?: {
columns?: boolean;
}
): SourceNode; | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
MethodDeclaration |
map(options: any): null; | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
MethodDeclaration |
replace(start: number, end: number, newValue: string): void; | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
MethodDeclaration |
insert(pos: number, newValue: string): void; | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
MethodDeclaration |
_sortReplacements(): void; | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
MethodDeclaration |
_replaceString(str: string): string; | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
MethodDeclaration |
_replacementToSourceNode(oldNode: SourceNode, newString: string): string | SourceNode; | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
MethodDeclaration |
_splitSourceNode(node: SourceNode, position: SourceNode[]): SourceNode[]; | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
MethodDeclaration |
_splitSourceNode(node: string, position: number): number; | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
MethodDeclaration |
_splitString(str: string, position: number): string[]; | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
MethodDeclaration |
node(): SourceNode; | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
MethodDeclaration |
listMap(
options: {
module?: boolean;
}
): SourceListMap; | Danlock/DefinitelyTyped | types/webpack-sources/index.d.ts | TypeScript |
ArrowFunction |
(res, rej) =>
ctx.req.session!.destroy((err) => {
if (err) return rej(false);
ctx.res.clearCookie('qid');
return res(true);
}) | JustineLicuanan/create-graphql-starter | public/auth-template/src/resolvers/AuthResolver.ts | TypeScript |
ArrowFunction |
(err) => {
if (err) return rej(false);
ctx.res.clearCookie('qid');
return res(true);
} | JustineLicuanan/create-graphql-starter | public/auth-template/src/resolvers/AuthResolver.ts | TypeScript |
ClassDeclaration |
@Resolver()
export class AuthResolver {
@Mutation(() => User)
async register(
@Arg('input') input: ResolverTypes.RegisterInput
): Promise<User> {
return await User.create(input).save();
}
@Mutation(() => User)
async login(
@Arg('input') input: ResolverTypes.LoginInput,
@Ctx() { req }: MyContext
): Promise<User> {
const user = await User.findOne({ email: input.email });
if (!user) {
throw new ArgumentValidationError([
{
target: {
email: input.email,
},
value: input.email,
property: 'email',
constraints: {
isEmailCorrect: 'email, or password is incorrect',
},
},
]);
}
const isMatch = await bcrypt.compare(input.password, user.password);
if (!isMatch) {
throw new ArgumentValidationError([
{
target: {
email: input.email,
},
value: input.email,
property: 'email',
constraints: {
isEmailCorrect: 'email, or password is incorrect',
},
},
]);
}
(req.session as any).user = user;
return user;
}
@Query(() => User, { nullable: true })
async me(@Ctx() { req }: MyContext): Promise<User | undefined> {
return (req.session as any).user;
}
@Mutation(() => Boolean)
logout(@Ctx() ctx: MyContext): Promise<boolean> {
return new Promise((res, rej) =>
ctx.req.session!.destroy((err) => {
if (err) return rej(false);
ctx.res.clearCookie('qid');
return res(true);
})
);
}
} | JustineLicuanan/create-graphql-starter | public/auth-template/src/resolvers/AuthResolver.ts | TypeScript |
MethodDeclaration |
@Mutation(() => User)
async register(
@Arg('input') input: ResolverTypes.RegisterInput
): Promise<User> {
return await User.create(input).save();
} | JustineLicuanan/create-graphql-starter | public/auth-template/src/resolvers/AuthResolver.ts | TypeScript |
MethodDeclaration |
@Mutation(() => User)
async login(
@Arg('input') input: ResolverTypes.LoginInput,
@Ctx() { req }: MyContext
): Promise<User> {
const user = await User.findOne({ email: input.email });
if (!user) {
throw new ArgumentValidationError([
{
target: {
email: input.email,
},
value: input.email,
property: 'email',
constraints: {
isEmailCorrect: 'email, or password is incorrect',
},
},
]);
}
const isMatch = await bcrypt.compare(input.password, user.password);
if (!isMatch) {
throw new ArgumentValidationError([
{
target: {
email: input.email,
},
value: input.email,
property: 'email',
constraints: {
isEmailCorrect: 'email, or password is incorrect',
},
},
]);
}
(req.session as any).user = user;
return user;
} | JustineLicuanan/create-graphql-starter | public/auth-template/src/resolvers/AuthResolver.ts | TypeScript |
MethodDeclaration |
@Query(() => User, { nullable: true })
async me(@Ctx() { req }: MyContext): Promise<User | undefined> {
return (req.session as any).user;
} | JustineLicuanan/create-graphql-starter | public/auth-template/src/resolvers/AuthResolver.ts | TypeScript |
MethodDeclaration |
@Mutation(() => Boolean)
logout(@Ctx() ctx: MyContext): Promise<boolean> {
return new Promise((res, rej) =>
ctx.req.session!.destroy((err) => {
if (err) return rej(false);
ctx.res.clearCookie('qid');
return res(true);
})
);
} | JustineLicuanan/create-graphql-starter | public/auth-template/src/resolvers/AuthResolver.ts | TypeScript |
FunctionDeclaration |
export default function GetScriptLanguagesApi(this: That, params?: T.GetScriptLanguagesRequest | TB.GetScriptLanguagesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.GetScriptLanguagesResponse>; | Vasenti/viewgames_api_v2 | node_modules/@elastic/elasticsearch/lib/api/api/get_script_languages.d.ts | TypeScript |
FunctionDeclaration |
export default function GetScriptLanguagesApi(this: That, params?: T.GetScriptLanguagesRequest | TB.GetScriptLanguagesRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.GetScriptLanguagesResponse, unknown>>; | Vasenti/viewgames_api_v2 | node_modules/@elastic/elasticsearch/lib/api/api/get_script_languages.d.ts | TypeScript |
FunctionDeclaration |
export default function GetScriptLanguagesApi(this: That, params?: T.GetScriptLanguagesRequest | TB.GetScriptLanguagesRequest, options?: TransportRequestOptions): Promise<T.GetScriptLanguagesResponse>; | Vasenti/viewgames_api_v2 | node_modules/@elastic/elasticsearch/lib/api/api/get_script_languages.d.ts | TypeScript |
InterfaceDeclaration |
interface That {
transport: Transport;
} | Vasenti/viewgames_api_v2 | node_modules/@elastic/elasticsearch/lib/api/api/get_script_languages.d.ts | TypeScript |
FunctionDeclaration | /**
* Creates a {@link vscode.Task Task} to build all targets in this package.
*/
function createBuildAllTask(folder: vscode.WorkspaceFolder): vscode.Task {
const additionalArgs: string[] = [];
if (process.platform !== "darwin") {
additionalArgs.push("--enable-test-discovery");
}
if (process.platform === "win32") {
additionalArgs.push("-Xlinker", "-debug:dwarf");
}
return createSwiftTask(
["build", "--build-tests", ...additionalArgs, ...configuration.buildArguments],
SwiftTaskProvider.buildAllName,
{ group: vscode.TaskGroup.Build, scope: folder }
);
} | compnerd/vscode-swift | src/SwiftTaskProvider.ts | TypeScript |
FunctionDeclaration | /**
* Creates a {@link vscode.Task Task} to run an executable target.
*/
function createBuildTasks(product: Product, folder: vscode.WorkspaceFolder): vscode.Task[] {
const debugArguments = process.platform === "win32" ? ["-Xlinker", "-debug:dwarf"] : [];
return [
createSwiftTask(
[
"build",
"--product",
product.name,
...debugArguments,
...configuration.buildArguments,
],
`Build Debug ${product.name}`,
{ group: vscode.TaskGroup.Build, scope: folder }
),
createSwiftTask(
["build", "-c", "release", "--product", product.name, ...configuration.buildArguments],
`Build Release ${product.name}`,
{ group: vscode.TaskGroup.Build, scope: folder }
),
];
} | compnerd/vscode-swift | src/SwiftTaskProvider.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.