type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
MethodDeclaration |
updateEvent(id: string,
title: string,
content: string,
image: File | string,
startDate: string,
endDate: string,
category: string,
is_private: Boolean,
max_users: Number,
eventFee: Number,
... | sonusourav/instigo-webapp | src/app/events/events.service.ts | TypeScript |
MethodDeclaration |
deleteEvent(eventId: string) {
return this.http.delete(BACKEND_URL + eventId);
} | sonusourav/instigo-webapp | src/app/events/events.service.ts | TypeScript |
MethodDeclaration |
deleteEventTBA(eventTBA: any, eventId: string) {
return this.http.delete<{message: string}>(BACKEND_URL + 'tba?eventId=' + eventId + '&eventTBAId=' + eventTBA._id )
.subscribe(response => {
console.log(response.message);
this.eventTBA.announcements.splice(this.eventTBA.announcements.indexOf(e... | sonusourav/instigo-webapp | src/app/events/events.service.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'dashboard',
template: `
<h1>Another Component</h1>
<h3>name from input : {{name}} </h3>
`
})
export class AnotherComponent {
// @Input()
name: string;
constructor() {
console.log(this.name);
}
} | yishaiz/Angular2-Tour-of-Heroes-RC6 | app/Another/another.component.ts | TypeScript |
FunctionDeclaration |
export function FixtureSearchHeader({ onOpen }: Props) {
React.useEffect(() => {
function handleWindowKeyDown(e: KeyboardEvent) {
const metaKey = e.metaKey || e.ctrlKey;
if (metaKey && e.keyCode === KEY_P) {
e.preventDefault();
onOpen();
}
}
window.addEventListener('keyd... | roth1002/react-cosmos | packages/react-cosmos-playground2/src/plugins/FixtureSearch/FixtureSearchHeader.tsx | TypeScript |
FunctionDeclaration |
function handleWindowKeyDown(e: KeyboardEvent) {
const metaKey = e.metaKey || e.ctrlKey;
if (metaKey && e.keyCode === KEY_P) {
e.preventDefault();
onOpen();
}
} | roth1002/react-cosmos | packages/react-cosmos-playground2/src/plugins/FixtureSearch/FixtureSearchHeader.tsx | TypeScript |
ArrowFunction |
() => {
function handleWindowKeyDown(e: KeyboardEvent) {
const metaKey = e.metaKey || e.ctrlKey;
if (metaKey && e.keyCode === KEY_P) {
e.preventDefault();
onOpen();
}
}
window.addEventListener('keydown', handleWindowKeyDown);
return () => window.removeEventListener('ke... | roth1002/react-cosmos | packages/react-cosmos-playground2/src/plugins/FixtureSearch/FixtureSearchHeader.tsx | TypeScript |
ArrowFunction |
() => window.removeEventListener('keydown', handleWindowKeyDown) | roth1002/react-cosmos | packages/react-cosmos-playground2/src/plugins/FixtureSearch/FixtureSearchHeader.tsx | TypeScript |
TypeAliasDeclaration |
type Props = {
onOpen: () => unknown;
}; | roth1002/react-cosmos | packages/react-cosmos-playground2/src/plugins/FixtureSearch/FixtureSearchHeader.tsx | TypeScript |
ArrowFunction |
(props: NavProps) => {
return (
<nav {...props} className={["Nav", props.className].join(" ")}>
{props.children}
</nav> | azu/dynamic-css-component-example | src/component/Nav.tsx | TypeScript |
TypeAliasDeclaration |
export type NavProps = {
children: ReactNode;
} & HTMLAttributes<HTMLElement>; | azu/dynamic-css-component-example | src/component/Nav.tsx | TypeScript |
ArrowFunction |
async ({ traceId, data }: GetByClientIdParams): Promise<WebComponentConfig> => {
try {
logger.info('Getting config by customerId...', { traceId, data })
const itemToGet = generateSchemaItem(data)
const result = await dynamoDBMapper.get(itemToGet)
logger.info('Get config by customerId successfully', {... | BobinMathew/foundations | packages/web-components-config-server/src/routes/web-components-config/api.ts | TypeScript |
ArrowFunction |
async ({ traceId, data }: CreateParams): Promise<WebComponentConfig> => {
try {
const itemToCreate = generateSchemaItem(data)
const result = await dynamoDBMapper.put(itemToCreate, {
condition: {
type: 'And',
conditions: [
new FunctionExpression('attribute_not_exists', new Attr... | BobinMathew/foundations | packages/web-components-config-server/src/routes/web-components-config/api.ts | TypeScript |
ArrowFunction |
async ({ traceId, data }: UpdateParams): Promise<WebComponentConfig> => {
try {
logger.info('Patching config...', { traceId, data })
const { customerId, appId, ...rest } = data
const oldItem = await getConfigByClientId({ traceId, data: { customerId, appId } })
const itemToUpdate = generateSchemaItem(... | BobinMathew/foundations | packages/web-components-config-server/src/routes/web-components-config/api.ts | TypeScript |
ArrowFunction |
async ({ traceId, data }): Promise<WebComponentConfig> => {
try {
logger.info('Updating config...', { traceId, data })
const itemToUpdate = generateSchemaItem(data)
const result = await dynamoDBMapper.put(itemToUpdate)
logger.info('Update config successfully', { traceId, result })
return result
... | BobinMathew/foundations | packages/web-components-config-server/src/routes/web-components-config/api.ts | TypeScript |
ArrowFunction |
async ({ traceId, data }: DeleteParams): Promise<WebComponentConfig> => {
try {
logger.info('Deleting config...', { traceId, data })
const itemToDelete = generateSchemaItem(data)
const result = await dynamoDBMapper.delete(itemToDelete)
logger.info('Delete config successfully', { traceId, result })
... | BobinMathew/foundations | packages/web-components-config-server/src/routes/web-components-config/api.ts | TypeScript |
ArrowFunction |
(): void => {
const { exprInputValue: expr } = this.state;
const queryStart = Date.now();
this.props.onExecuteQuery(expr);
if (this.props.options.expr !== expr) {
this.setOptions({ expr });
}
if (expr === '') {
return;
}
if (this.abortInFlightFetch) {
this.abortInFlig... | 4linux/prometheus | web/ui/react-app/src/pages/graph/Panel.tsx | TypeScript |
ArrowFunction |
() => abortController.abort() | 4linux/prometheus | web/ui/react-app/src/pages/graph/Panel.tsx | TypeScript |
ArrowFunction |
resp => resp.json() | 4linux/prometheus | web/ui/react-app/src/pages/graph/Panel.tsx | TypeScript |
ArrowFunction |
json => {
if (json.status !== 'success') {
throw new Error(json.error || 'invalid response JSON');
}
let resultSeries = 0;
if (json.data) {
const { resultType, result } = json.data;
if (resultType === 'scalar') {
resultSeries = 1;
} e... | 4linux/prometheus | web/ui/react-app/src/pages/graph/Panel.tsx | TypeScript |
ArrowFunction |
error => {
if (error.name === 'AbortError') {
// Aborts are expected, don't show an error for them.
return;
}
this.setState({
error: 'Error executing query: ' + error.message,
loading: false,
});
} | 4linux/prometheus | web/ui/react-app/src/pages/graph/Panel.tsx | TypeScript |
ArrowFunction |
(expr: string): void => {
this.setState({ exprInputValue: expr });
} | 4linux/prometheus | web/ui/react-app/src/pages/graph/Panel.tsx | TypeScript |
ArrowFunction |
(range: number): void => {
this.setOptions({ range: range });
} | 4linux/prometheus | web/ui/react-app/src/pages/graph/Panel.tsx | TypeScript |
ArrowFunction |
(): number | moment.Moment => {
if (this.props.options.endTime === null) {
return moment();
}
return this.props.options.endTime;
} | 4linux/prometheus | web/ui/react-app/src/pages/graph/Panel.tsx | TypeScript |
ArrowFunction |
(endTime: number | null) => {
this.setOptions({ endTime: endTime });
} | 4linux/prometheus | web/ui/react-app/src/pages/graph/Panel.tsx | TypeScript |
ArrowFunction |
(resolution: number | null) => {
this.setOptions({ resolution: resolution });
} | 4linux/prometheus | web/ui/react-app/src/pages/graph/Panel.tsx | TypeScript |
ArrowFunction |
(type: PanelType) => {
if (this.props.options.type === type) {
return;
}
this.setState({ data: null });
this.setOptions({ type: type });
} | 4linux/prometheus | web/ui/react-app/src/pages/graph/Panel.tsx | TypeScript |
ArrowFunction |
(stacked: boolean) => {
this.setOptions({ stacked: stacked });
} | 4linux/prometheus | web/ui/react-app/src/pages/graph/Panel.tsx | TypeScript |
ArrowFunction |
(warning, index) => (
<Row key={index}>
<Col>{warning && <Alert color | 4linux/prometheus | web/ui/react-app/src/pages/graph/Panel.tsx | TypeScript |
ClassDeclaration |
class Panel extends Component<PanelProps, PanelState> {
private abortInFlightFetch: (() => void) | null = null;
constructor(props: PanelProps) {
super(props);
this.state = {
data: null,
lastQueryParams: null,
loading: false,
warnings: null,
error: null,
stats: null,
... | 4linux/prometheus | web/ui/react-app/src/pages/graph/Panel.tsx | TypeScript |
InterfaceDeclaration |
interface PanelProps {
options: PanelOptions;
onOptionsChanged: (opts: PanelOptions) => void;
useLocalTime: boolean;
pastQueries: string[];
metricNames: string[];
removePanel: () => void;
onExecuteQuery: (query: string) => void;
pathPrefix: string;
enableAutocomplete: boolean;
} | 4linux/prometheus | web/ui/react-app/src/pages/graph/Panel.tsx | TypeScript |
InterfaceDeclaration |
interface PanelState {
data: any; // TODO: Type data.
lastQueryParams: QueryParams | null;
loading: boolean;
warnings: string[] | null;
error: string | null;
stats: QueryStats | null;
exprInputValue: string;
} | 4linux/prometheus | web/ui/react-app/src/pages/graph/Panel.tsx | TypeScript |
InterfaceDeclaration |
export interface PanelOptions {
expr: string;
type: PanelType;
range: number; // Range in milliseconds.
endTime: number | null; // Timestamp in milliseconds.
resolution: number | null; // Resolution in seconds.
stacked: boolean;
} | 4linux/prometheus | web/ui/react-app/src/pages/graph/Panel.tsx | TypeScript |
EnumDeclaration |
export enum PanelType {
Graph = 'graph',
Table = 'table',
} | 4linux/prometheus | web/ui/react-app/src/pages/graph/Panel.tsx | TypeScript |
MethodDeclaration |
componentDidUpdate({ options: prevOpts }: PanelProps) {
const { endTime, range, resolution, type } = this.props.options;
if (
prevOpts.endTime !== endTime ||
prevOpts.range !== range ||
prevOpts.resolution !== resolution ||
prevOpts.type !== type
) {
this.executeQuery();
}... | 4linux/prometheus | web/ui/react-app/src/pages/graph/Panel.tsx | TypeScript |
MethodDeclaration |
componentDidMount() {
this.executeQuery();
} | 4linux/prometheus | web/ui/react-app/src/pages/graph/Panel.tsx | TypeScript |
MethodDeclaration |
setOptions(opts: object): void {
const newOpts = { ...this.props.options, ...opts };
this.props.onOptionsChanged(newOpts);
} | 4linux/prometheus | web/ui/react-app/src/pages/graph/Panel.tsx | TypeScript |
MethodDeclaration |
render() {
const { pastQueries, metricNames, options } = this.props;
return (
<div className="panel">
<Row>
<Col>
<ExpressionInput
value={this.state.exprInputValue}
onExpressionChange={this.handleExpressionChange}
executeQuery={this.... | 4linux/prometheus | web/ui/react-app/src/pages/graph/Panel.tsx | TypeScript |
FunctionDeclaration |
export function useRoom(roomId: string) {
const { user } = useAuth();
const [questions, setQuestions] = useState<Question[]>([]);
const [title, setTitle] = useState('');
useEffect(() => {
const roomRef = database.ref(`rooms/${roomId}`);
roomRef.on('value', room => {
const databaseRoom = room.va... | cunhaedu/letmeask | src/hooks/useRoom.ts | TypeScript |
ArrowFunction |
() => {
const roomRef = database.ref(`rooms/${roomId}`);
roomRef.on('value', room => {
const databaseRoom = room.val();
const firebaseQuestions: FirebaseQuestions = databaseRoom.questions;
const parsedQuestions = Object.entries(firebaseQuestions ?? {}).map(([key, value]) => {
return ... | cunhaedu/letmeask | src/hooks/useRoom.ts | TypeScript |
ArrowFunction |
room => {
const databaseRoom = room.val();
const firebaseQuestions: FirebaseQuestions = databaseRoom.questions;
const parsedQuestions = Object.entries(firebaseQuestions ?? {}).map(([key, value]) => {
return {
id: key,
content: value.content,
author: value.author,... | cunhaedu/letmeask | src/hooks/useRoom.ts | TypeScript |
ArrowFunction |
([key, value]) => {
return {
id: key,
content: value.content,
author: value.author,
isHighlighted: value.isHighlighted,
isAnswered: value.isAnswered,
likeCount: Object.values(value.likes ?? {}).length,
likeId: Object.entries(value.likes ?? {... | cunhaedu/letmeask | src/hooks/useRoom.ts | TypeScript |
ArrowFunction |
([key, like]) => like.authorId === user?.id | cunhaedu/letmeask | src/hooks/useRoom.ts | TypeScript |
ArrowFunction |
() => {
roomRef.off('value')
} | cunhaedu/letmeask | src/hooks/useRoom.ts | TypeScript |
TypeAliasDeclaration |
type FirebaseQuestions = Record<string, {
author: {
name: string;
avatar: string;
};
content: string;
isAnswered: boolean;
isHighlighted: boolean;
likes: Record<string, {
authorId: string;
}>
}> | cunhaedu/letmeask | src/hooks/useRoom.ts | TypeScript |
TypeAliasDeclaration |
type Question = {
id: string;
author: {
name: string;
avatar: string;
};
content: string;
isAnswered: boolean;
isHighlighted: boolean;
likeCount: number;
likeId: string | undefined;
} | cunhaedu/letmeask | src/hooks/useRoom.ts | TypeScript |
ClassDeclaration |
@Component({
selector: "app",
templateUrl: `client/views/app.component.html`
})
export class AppComponent {
appName: string = "Angular 2 Express"
} | swapnilpatil427/Angular2-express-starter | client/app.component.ts | TypeScript |
FunctionDeclaration |
export default function CardView({ tasks }: CardViewProps) {
return (
<>
<Grid container spacing={3}>
<AddTask />
{tasks.map((task) => (
<TaskItemCard key={task.id} task={task} />
))}
</Grid>
</>
);
} | kintaro335-sp/mytodotasks | client/src/components/tasks/cardview/CardView.tsx | TypeScript |
ArrowFunction |
(task) => (
<TaskItemCard key={task.id} | kintaro335-sp/mytodotasks | client/src/components/tasks/cardview/CardView.tsx | TypeScript |
InterfaceDeclaration |
export interface App {
name: string;
contributors: string[];
version: number;
apdex: number;
host: string[];
} | gagle/apdex-board | src/app/board/models/app.interface.ts | TypeScript |
ClassDeclaration |
@ApiTags('评论/留言')
@Controller('comments')
export class CommentsController {
constructor(private commentsService: CommentsService) {}
@ApiOperation({ summary: '留言列表' })
@Get('/list')
getComments(
@Query() query: GetCommentsDto,
): Promise<{ data: Comment[]; total: number }> {
return this.commentsServ... | Fengfengfeng-up/Nest-personal-website | apps/web/src/comments/comments.controller.ts | TypeScript |
MethodDeclaration |
@ApiOperation({ summary: '留言列表' })
@Get('/list')
getComments(
@Query() query: GetCommentsDto,
): Promise<{ data: Comment[]; total: number }> {
return this.commentsService.getComments(query);
} | Fengfengfeng-up/Nest-personal-website | apps/web/src/comments/comments.controller.ts | TypeScript |
MethodDeclaration |
@ApiOperation({ summary: '写评论/写留言' })
@Post('/create')
@UseGuards(AuthGuard('jwt'))
@ApiBearerAuth()
createComment(
@Body() data: CreateCommentDto,
@GetUser() visitor: Visitor,
): Promise<{ data: Object }> {
return this.commentsService.createComment(data, visitor);
} | Fengfengfeng-up/Nest-personal-website | apps/web/src/comments/comments.controller.ts | TypeScript |
MethodDeclaration |
@ApiOperation({ summary: '点赞评论/留言' })
@Patch('/like/:id')
likeComment(
@Param('id', ParseIntPipe) id: number,
): Promise<{ data: Comment }> {
return this.commentsService.likeComment(id);
} | Fengfengfeng-up/Nest-personal-website | apps/web/src/comments/comments.controller.ts | TypeScript |
ClassDeclaration |
export default class Application {
constructor(private metadata: Metadata,
private pages: Map<string, Page>,
private styles?: Array<StyleProperty>,
private scripts?: Array<ScriptResource>) {
this.metadata = metadata;
this.pages = pages;
this.styles = styles;
... | juancancela/turbo-hub | src/lib/models/Application.ts | TypeScript |
MethodDeclaration |
getMetadata(): Metadata {
return this.metadata;
} | juancancela/turbo-hub | src/lib/models/Application.ts | TypeScript |
MethodDeclaration |
getPages(): Map<string, Page> {
return this.pages;
} | juancancela/turbo-hub | src/lib/models/Application.ts | TypeScript |
MethodDeclaration |
getStyles(): Array<StyleProperty> {
return this.styles;
} | juancancela/turbo-hub | src/lib/models/Application.ts | TypeScript |
MethodDeclaration |
getScripts(): Array<ScriptResource> {
return this.scripts;
} | juancancela/turbo-hub | src/lib/models/Application.ts | TypeScript |
ArrowFunction |
async (_parent: any, _args: any, context: any) => await getTenantBoundSubjectModel(context).find({}).exec() | zilurrane/fbapp-api | src/graphql/resolvers/subject.resolver.ts | TypeScript |
ArrowFunction |
async (_parent: any, { id }: any, context: any) => await getTenantBoundSubjectModel(context).findById(id).exec() | zilurrane/fbapp-api | src/graphql/resolvers/subject.resolver.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'gml-time-instant',
templateUrl: './TimeInstantComponent.html'
})
export class TimeInstantComponent extends EditorComponent<TimeInstant> {
@Input()
public model: TimeInstant;
constructor(componentFactoryResolver: ComponentFactoryResolver, viewContainerRef: ViewContainerRef) ... | 52North/smle | src/app/editor/components/gml/TimeInstantComponent.ts | TypeScript |
MethodDeclaration |
protected createModel() {
return undefined;
} | 52North/smle | src/app/editor/components/gml/TimeInstantComponent.ts | TypeScript |
ArrowFunction |
({
name,
children,
className,
onMouseDown,
onClick,
}) => {
const { delayedStatus, animationSpeed } = useContext(ValidationContext)
const [previousStatus, setPreviousStatus] = useState(LoadingStatus.Normal)
const [animation, setAnimation] = useState(baseCss)
useEffect(() => {
const delayToNormal... | philscott-dev/stagg-ekg-plus-scheduler | src/components/FormElements/FormButton.tsx | TypeScript |
ArrowFunction |
() => {
const delayToNormal = () => {
setTimeout(() => {
setAnimation(baseCss)
}, animationSpeed)
}
if (previousStatus !== delayedStatus) {
if (
previousStatus === LoadingStatus.Error &&
delayedStatus === LoadingStatus.Normal
) {
setAnimation(errorTo... | philscott-dev/stagg-ekg-plus-scheduler | src/components/FormElements/FormButton.tsx | TypeScript |
ArrowFunction |
() => {
setTimeout(() => {
setAnimation(baseCss)
}, animationSpeed)
} | philscott-dev/stagg-ekg-plus-scheduler | src/components/FormElements/FormButton.tsx | TypeScript |
ArrowFunction |
() => {
setAnimation(baseCss)
} | philscott-dev/stagg-ekg-plus-scheduler | src/components/FormElements/FormButton.tsx | TypeScript |
ArrowFunction |
({ theme }) => theme.transition.all | philscott-dev/stagg-ekg-plus-scheduler | src/components/FormElements/FormButton.tsx | TypeScript |
ArrowFunction |
({ theme }) => theme.breakpoint.small | philscott-dev/stagg-ekg-plus-scheduler | src/components/FormElements/FormButton.tsx | TypeScript |
ArrowFunction |
({ theme }) => theme.font.family | philscott-dev/stagg-ekg-plus-scheduler | src/components/FormElements/FormButton.tsx | TypeScript |
ArrowFunction |
({ theme }) => theme.color.black[700] | philscott-dev/stagg-ekg-plus-scheduler | src/components/FormElements/FormButton.tsx | TypeScript |
ArrowFunction |
({ theme }) => theme.color.peach[300] | philscott-dev/stagg-ekg-plus-scheduler | src/components/FormElements/FormButton.tsx | TypeScript |
ArrowFunction |
({ theme }) => theme.color.peach[200] | philscott-dev/stagg-ekg-plus-scheduler | src/components/FormElements/FormButton.tsx | TypeScript |
InterfaceDeclaration |
export interface ButtonProps {
className?: string
name?: string
onMouseDown?: (e: MouseEvent<HTMLButtonElement>) => void
onClick?: (e: MouseEvent<HTMLButtonElement>) => void
} | philscott-dev/stagg-ekg-plus-scheduler | src/components/FormElements/FormButton.tsx | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-address-dialog',
templateUrl: './address-dialog.component.html',
styleUrls: ['./address-dialog.component.scss']
})
export class AddressDialogComponent implements OnInit {
action: string;
item: any = {};
formValid: boolean;
listTipoDireccion: any[] = [
{ value: '', label: '... | ks-proyects/giflo | src/app/pages/private/home/address-dialog/address-dialog.component.ts | TypeScript |
MethodDeclaration |
doAction(isValid: boolean) {
if (isValid) {
this.dialogRef.close({ event: this.action, data: this.item });
}
} | ks-proyects/giflo | src/app/pages/private/home/address-dialog/address-dialog.component.ts | TypeScript |
MethodDeclaration |
closeDialog() {
this.dialogRef.close({ event: 'Cancelar' });
} | ks-proyects/giflo | src/app/pages/private/home/address-dialog/address-dialog.component.ts | TypeScript |
ArrowFunction |
({ color = 'currentColor', title, ...props }, svgRef) => {
const titleId = useMemo(
() =>
title
? 'title-' + Math.random().toString(36).substr(2, 9)
: undefined,
[title]
);
return (
<svg
... | hashicorp/design-system | packages/flight-icons/svg-react/download-16.tsx | TypeScript |
ArrowFunction |
() =>
title
? 'title-' + Math.random().toString(36).substr(2, 9)
: undefined | hashicorp/design-system | packages/flight-icons/svg-react/download-16.tsx | TypeScript |
MethodDeclaration |
title ? <title id={titleId}>{title} | hashicorp/design-system | packages/flight-icons/svg-react/download-16.tsx | TypeScript |
ArrowFunction |
(specularLayer) => {
gsap.to(specularLayer, {
y: top - 0.075 * height,
x: left - 0.075 * width,
width: width * 1.15,
height: height * 1.15,
borderRadius: radius,
duration: 0.15,
});
} | VoloshchenkoAl/custom-pointer | src/pointers/Lift/LiftPointer.ts | TypeScript |
ArrowFunction |
(specularLayer) => {
gsap.to(specularLayer, {
x: newX,
y: newY,
duration: 0.15,
backgroundImage: `radial-gradient(circle at ${Math.abs(
left - pointerX
)}px ${Math.abs(
top - pointerY
... | VoloshchenkoAl/custom-pointer | src/pointers/Lift/LiftPointer.ts | TypeScript |
ClassDeclaration |
export class LiftPointer implements Pointer {
private specularLayer: SpecularLayer;
private targetElement: Element;
private targetElementValues: {
top: number;
left: number;
width: number;
height: number;
zIndex: number;
};
private cssLiftClass: string;
p... | VoloshchenkoAl/custom-pointer | src/pointers/Lift/LiftPointer.ts | TypeScript |
MethodDeclaration |
public init(): void {
const { width, height, top, left } = this.targetElement.getBoundingClientRect();
const targetStyles = window.getComputedStyle(this.targetElement);
const radius: number = parseFloat(targetStyles.borderRadius);
const zIndex: number = parseFloat(targetStyles.zIndex);
... | VoloshchenkoAl/custom-pointer | src/pointers/Lift/LiftPointer.ts | TypeScript |
MethodDeclaration |
public onUpdate(pointerX: number, pointerY: number): void {
const scale = 1.15;
const { top, left, width, height } = this.targetElementValues;
const scaledWidth = width * scale;
const scaledHeight = height * scale;
const deltaX =
-(left - 0.075 * width - pointerX + s... | VoloshchenkoAl/custom-pointer | src/pointers/Lift/LiftPointer.ts | TypeScript |
MethodDeclaration |
public onReset(): void {
this.removeLiftStyle();
this.specularLayer.destroy();
this.pointerElement.classList.remove(this.cssLiftClass);
gsap.to(this.pointerElement, {
duration: 0.15,
filter: 'none',
});
gsap.to(this.targetElement, {
... | VoloshchenkoAl/custom-pointer | src/pointers/Lift/LiftPointer.ts | TypeScript |
MethodDeclaration |
private removeLiftStyle(): void {
this.liftStyle.parentElement.removeChild(this.liftStyle);
} | VoloshchenkoAl/custom-pointer | src/pointers/Lift/LiftPointer.ts | TypeScript |
MethodDeclaration |
private addLiftStyle(): void {
const style = document.createElement('style');
style.innerHTML = `
.${this.cssLiftClass} {
background-color: rgba(0,0,0,0.05);
z-index: ${this.targetElementValues.zIndex - 1};
}
`;
this.liftStyle = ... | VoloshchenkoAl/custom-pointer | src/pointers/Lift/LiftPointer.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'cmp-471',
template: '<strong>471</strong> ',
})
export class Cmp471Component {
add471(x: number) {
return x + 471;
}
} | thelgevold/remote-builder | angular-demo/src/airplane/team4/mod7/cmp1/cmp.ts | TypeScript |
MethodDeclaration |
add471(x: number) {
return x + 471;
} | thelgevold/remote-builder | angular-demo/src/airplane/team4/mod7/cmp1/cmp.ts | TypeScript |
ArrowFunction |
() => {
let component: SafariComponent;
let fixture: ComponentFixture<SafariComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ SafariComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(SafariComponent);
... | gderick-1/laitayo | src/app/safari/safari.component.spec.ts | TypeScript |
ArrowFunction |
() => {
TestBed.configureTestingModule({
declarations: [ SafariComponent ]
})
.compileComponents();
} | gderick-1/laitayo | src/app/safari/safari.component.spec.ts | TypeScript |
ArrowFunction |
() => {
fixture = TestBed.createComponent(SafariComponent);
component = fixture.componentInstance;
fixture.detectChanges();
} | gderick-1/laitayo | src/app/safari/safari.component.spec.ts | TypeScript |
FunctionDeclaration |
function isNumeric(baseIngredientWeight) {
return !isNaN(baseIngredientWeight)
} | stuartleaver/seasons-of-serverless | 03-the-longest-kebab/api/KebabCalculator/index.ts | TypeScript |
InterfaceDeclaration |
export interface LocalMove {
mark: MarkType;
markIndex: number;
} | Ian-Gilbert/uttt-angular | angular/src/app/data/local-move.model.ts | TypeScript |
ClassDeclaration |
export declare class MoveColumnController {
private loggerFactory;
private columnController;
private gridPanel;
private dragAndDropService;
private gridOptionsWrapper;
private needToMoveLeft;
private needToMoveRight;
private movingIntervalId;
private intervalCount;
private logge... | contata-dennemeyer/ag-grid | dist/lib/headerRendering/moveColumnController.d.ts | TypeScript |
MethodDeclaration |
getIconName(): string; | contata-dennemeyer/ag-grid | dist/lib/headerRendering/moveColumnController.d.ts | TypeScript |
MethodDeclaration |
onDragEnter(draggingEvent: DraggingEvent): void; | contata-dennemeyer/ag-grid | dist/lib/headerRendering/moveColumnController.d.ts | TypeScript |
MethodDeclaration |
onDragLeave(draggingEvent: DraggingEvent): void; | contata-dennemeyer/ag-grid | dist/lib/headerRendering/moveColumnController.d.ts | TypeScript |
MethodDeclaration |
onDragStop(): void; | contata-dennemeyer/ag-grid | dist/lib/headerRendering/moveColumnController.d.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.