type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
EnumDeclaration |
export enum BatchContext { } | lu4/rocksdb-ts | src/binding.ts | TypeScript |
EnumDeclaration |
export enum SliceContext { } | lu4/rocksdb-ts | src/binding.ts | TypeScript |
EnumDeclaration |
export enum SnapshotContext { } | lu4/rocksdb-ts | src/binding.ts | TypeScript |
EnumDeclaration |
export enum IteratorContext { } | lu4/rocksdb-ts | src/binding.ts | TypeScript |
EnumDeclaration |
export enum DatabaseContext { } | lu4/rocksdb-ts | src/binding.ts | TypeScript |
EnumDeclaration |
export enum OptionsContext { } | lu4/rocksdb-ts | src/binding.ts | TypeScript |
EnumDeclaration |
export enum ReadOptionsContext { } | lu4/rocksdb-ts | src/binding.ts | TypeScript |
EnumDeclaration |
export enum WriteOptionsContext { } | lu4/rocksdb-ts | src/binding.ts | TypeScript |
EnumDeclaration |
export enum IteratorStatusCode {
Ok = 0,
NotFound = 1,
Corruption = 2,
NotSupported = 3,
InvalidArgument = 4,
IOError = 5,
MergeInProgress = 6,
Incomplete = 7,
ShutdownInProgress = 8,
TimedOut = 9,
Aborted = 10,
Busy = 11,
Expired = 12,
TryAgain = 13,
Compact... | lu4/rocksdb-ts | src/binding.ts | TypeScript |
EnumDeclaration |
export enum IteratorStatusSubcode {
None = 0,
MutexTimeout = 1,
LockTimeout = 2,
LockLimit = 3,
NoSpace = 4,
Deadlock = 5,
StaleFile = 6,
MemoryLimit = 7,
MaxSubCode
} | lu4/rocksdb-ts | src/binding.ts | TypeScript |
EnumDeclaration |
export enum ReadOptionsReadTier {
ReadAllTier = 0x0,
BlockCacheTier = 0x1,
PersistedTier = 0x2,
MemtableTier = 0x3
} | lu4/rocksdb-ts | src/binding.ts | TypeScript |
TypeAliasDeclaration |
export type Callback = (error: Error) => void; | lu4/rocksdb-ts | src/binding.ts | TypeScript |
TypeAliasDeclaration |
export type CallbackWithValue<V> = (error: Error, value: V) => void; | lu4/rocksdb-ts | src/binding.ts | TypeScript |
TypeAliasDeclaration |
export type CallbackWithKeyValue<K, V> = (error: Error, key: K, value: V) => void; | lu4/rocksdb-ts | src/binding.ts | TypeScript |
TypeAliasDeclaration |
export type Unique<T> = T & { readonly '': unique symbol }; | lu4/rocksdb-ts | src/binding.ts | TypeScript |
ClassDeclaration |
export default class PraiseGraduationCapHC extends BaseIllustration {
public render() {
return (
<svg
viewBox="0 0 72 72"
height="72"
width="72"
className={this.getClassName()}
aria-hidden="true"
tabIndex={-1}
focusable="false"
>
<circle... | Bhaskers-Blu-Org2/YamUI | src/components/Illustration/illustrations/PraiseGraduationCapHC72.tsx | TypeScript |
MethodDeclaration |
public render() {
return (
<svg
viewBox="0 0 72 72"
height="72"
width="72"
className={this.getClassName()}
aria-hidden="true"
tabIndex={-1} | Bhaskers-Blu-Org2/YamUI | src/components/Illustration/illustrations/PraiseGraduationCapHC72.tsx | TypeScript |
ArrowFunction |
() => {
return domReady.version;
} | 0-Captain/DefinitelyTyped | types/requirejs-domready/requirejs-domready-tests.ts | TypeScript |
ArrowFunction |
(): void => {
while (argv.length > 0) {
let currentArgument: string = argv.shift()!;
// When an flag appears, the corresponding option will be true.
// Unless the flag comes with the "--table=false" form
let currentValue = true;
const indexOfEqualSign: number = currentArgument.indexOf('=');
... | gonza7aav/engines-lookup | src/bin/engines-lookup.ts | TypeScript |
ArrowFunction |
(x) => ({
package: `${x.name}@${x.version}`,
engines: x.engines,
}) | gonza7aav/engines-lookup | src/bin/engines-lookup.ts | TypeScript |
ArrowFunction |
(): void => console.log(
`engines-lookup v${version}
A tool to check what engines are advised by the dependencies
Usage: engines-lookup [options] [path]
If a path isn't provided, the program will use "."
Options:
-t, --table
Shows a table of package's name and advised engines. Default: false
-s, --sort <engin... | gonza7aav/engines-lookup | src/bin/engines-lookup.ts | TypeScript |
FunctionDeclaration |
export function useOnCommentAddedSubscription<TData = OnCommentAddedSubscription>(
options: Omit<Urql.UseSubscriptionArgs<OnCommentAddedSubscriptionVariables>, 'query'> = {},
handler?: Urql.SubscriptionHandler<OnCommentAddedSubscription, TData>
) {
return Urql.useSubscription<OnCommentAddedSubscription, TData, O... | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
FunctionDeclaration |
export function useCommentQuery(options: Omit<Urql.UseQueryArgs<CommentQueryVariables>, 'query'> = {}) {
return Urql.useQuery<CommentQuery>({ query: CommentDocument, ...options });
} | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
FunctionDeclaration |
export function useCurrentUserForProfileQuery(
options: Omit<Urql.UseQueryArgs<CurrentUserForProfileQueryVariables>, 'query'> = {}
) {
return Urql.useQuery<CurrentUserForProfileQuery>({ query: CurrentUserForProfileDocument, ...options });
} | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
FunctionDeclaration |
export function useFeedQuery(options: Omit<Urql.UseQueryArgs<FeedQueryVariables>, 'query'> = {}) {
return Urql.useQuery<FeedQuery>({ query: FeedDocument, ...options });
} | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
FunctionDeclaration |
export function useSubmitRepositoryMutation() {
return Urql.useMutation<SubmitRepositoryMutation, SubmitRepositoryMutationVariables>(SubmitRepositoryDocument);
} | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
FunctionDeclaration |
export function useSubmitCommentMutation() {
return Urql.useMutation<SubmitCommentMutation, SubmitCommentMutationVariables>(SubmitCommentDocument);
} | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
FunctionDeclaration |
export function useVoteMutation() {
return Urql.useMutation<VoteMutation, VoteMutationVariables>(VoteDocument);
} | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
EnumDeclaration | /** A list of options for the sort order of the feed */
export enum FeedType {
/** Sort by a combination of freshness and score, using Reddit's algorithm */
Hot = 'HOT',
/** Newest entries first */
New = 'NEW',
/** Highest score entries first */
Top = 'TOP',
} | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
EnumDeclaration | /** The type of vote to record, when submitting a vote */
export enum VoteType {
Cancel = 'CANCEL',
Down = 'DOWN',
Up = 'UP',
} | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type Maybe<T> = T | null; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] }; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> }; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> }; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration | /** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: string;
String: string;
Boolean: boolean;
Int: number;
Float: number;
}; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration | /** A comment about an entry, submitted by a user */
export type Comment = {
__typename?: 'Comment';
/** The text of the comment */
content: Scalars['String'];
/** A timestamp of when the comment was posted */
createdAt: Scalars['Float'];
/** The SQL ID of this entry */
id: Scalars['Int'];
/** The GitHu... | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration | /** Information about a GitHub repository submitted to GitHunt */
export type Entry = {
__typename?: 'Entry';
/** The number of comments posted about this repository */
commentCount: Scalars['Int'];
/** Comments posted about this repository */
comments: Array<Maybe<Comment>>;
/** A timestamp of when the ent... | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration | /** Information about a GitHub repository submitted to GitHunt */
export type EntryCommentsArgs = {
limit?: Maybe<Scalars['Int']>;
offset?: Maybe<Scalars['Int']>;
}; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type Mutation = {
__typename?: 'Mutation';
/** Comment on a repository, returns the new comment */
submitComment?: Maybe<Comment>;
/** Submit a new repository, returns the new submission */
submitRepository?: Maybe<Entry>;
/** Vote on a repository submission, returns the submission that was voted on... | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type MutationSubmitCommentArgs = {
commentContent: Scalars['String'];
repoFullName: Scalars['String'];
}; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type MutationSubmitRepositoryArgs = {
repoFullName: Scalars['String'];
}; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type MutationVoteArgs = {
repoFullName: Scalars['String'];
type: VoteType;
}; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type Query = {
__typename?: 'Query';
/** Return the currently logged in user, or null if nobody is logged in */
currentUser?: Maybe<User>;
/** A single entry */
entry?: Maybe<Entry>;
/** A feed of repository submissions */
feed?: Maybe<Array<Maybe<Entry>>>;
}; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type QueryEntryArgs = {
repoFullName: Scalars['String'];
}; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type QueryFeedArgs = {
limit?: Maybe<Scalars['Int']>;
offset?: Maybe<Scalars['Int']>;
type: FeedType;
}; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration | /**
* A repository object from the GitHub API. This uses the exact field names returned by the
* GitHub API for simplicity, even though the convention for GraphQL is usually to camel case.
*/
export type Repository = {
__typename?: 'Repository';
/** The description of the repository */
description?: Maybe<Scal... | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type Subscription = {
__typename?: 'Subscription';
/** Subscription fires on every comment added */
commentAdded?: Maybe<Comment>;
}; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type SubscriptionCommentAddedArgs = {
repoFullName: Scalars['String'];
}; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration | /** A user object from the GitHub API. This uses the exact field names returned from the GitHub API. */
export type User = {
__typename?: 'User';
/** The URL to a directly embeddable image for this user's avatar */
avatar_url: Scalars['String'];
/** The URL of this user's GitHub page */
html_url: Scalars['Str... | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration | /** XXX to be removed */
export type Vote = {
__typename?: 'Vote';
vote_value: Scalars['Int'];
}; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type OnCommentAddedSubscriptionVariables = Exact<{
repoFullName: Scalars['String'];
}>; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type OnCommentAddedSubscription = {
__typename?: 'Subscription';
commentAdded?: Maybe<{
__typename?: 'Comment';
id: number;
createdAt: number;
content: string;
postedBy: { __typename?: 'User'; login: string; html_url: string };
}>;
}; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type CommentQueryVariables = Exact<{
repoFullName: Scalars['String'];
limit?: Maybe<Scalars['Int']>;
offset?: Maybe<Scalars['Int']>;
}>; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type CommentQuery = {
__typename?: 'Query';
currentUser?: Maybe<{ __typename?: 'User'; login: string; html_url: string }>;
entry?: Maybe<{
__typename?: 'Entry';
id: number;
createdAt: number;
commentCount: number;
postedBy: { __typename?: 'User'; login: string; html_url: string };
... | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type CommentsPageCommentFragment = {
__typename?: 'Comment';
id: number;
createdAt: number;
content: string;
postedBy: { __typename?: 'User'; login: string; html_url: string };
}; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type CurrentUserForProfileQueryVariables = Exact<{ [key: string]: never }>; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type CurrentUserForProfileQuery = {
__typename?: 'Query';
currentUser?: Maybe<{ __typename?: 'User'; login: string; avatar_url: string }>;
}; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type FeedEntryFragment = {
__typename?: 'Entry';
id: number;
commentCount: number;
score: number;
createdAt: number;
repository: {
__typename?: 'Repository';
full_name: string;
html_url: string;
description?: Maybe<string>;
stargazers_count: number;
open_issues_count?: Maybe<... | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type FeedQueryVariables = Exact<{
type: FeedType;
offset?: Maybe<Scalars['Int']>;
limit?: Maybe<Scalars['Int']>;
}>; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type FeedQuery = {
__typename?: 'Query';
currentUser?: Maybe<{ __typename?: 'User'; login: string }>;
feed?: Maybe<
Array<
Maybe<{
__typename?: 'Entry';
id: number;
commentCount: number;
score: number;
createdAt: number;
repository: {
__t... | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type SubmitRepositoryMutationVariables = Exact<{
repoFullName: Scalars['String'];
}>; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type SubmitRepositoryMutation = {
__typename?: 'Mutation';
submitRepository?: Maybe<{ __typename?: 'Entry'; createdAt: number }>;
}; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type RepoInfoFragment = {
__typename?: 'Entry';
createdAt: number;
repository: {
__typename?: 'Repository';
description?: Maybe<string>;
stargazers_count: number;
open_issues_count?: Maybe<number>;
};
postedBy: { __typename?: 'User'; html_url: string; login: string };
}; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type SubmitCommentMutationVariables = Exact<{
repoFullName: Scalars['String'];
commentContent: Scalars['String'];
}>; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type SubmitCommentMutation = {
__typename?: 'Mutation';
submitComment?: Maybe<{
__typename?: 'Comment';
id: number;
createdAt: number;
content: string;
postedBy: { __typename?: 'User'; login: string; html_url: string };
}>;
}; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type VoteButtonsFragment = {
__typename?: 'Entry';
score: number;
vote: { __typename?: 'Vote'; vote_value: number };
}; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type VoteMutationVariables = Exact<{
repoFullName: Scalars['String'];
type: VoteType;
}>; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type VoteMutation = {
__typename?: 'Mutation';
vote?: Maybe<{ __typename?: 'Entry'; score: number; id: number; vote: { __typename?: 'Vote'; vote_value: number } }>;
}; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type WithTypename<T extends { __typename?: any }> = { [K in Exclude<keyof T, '__typename'>]?: T[K] } & {
__typename: NonNullable<T['__typename']>;
}; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type GraphCacheKeysConfig = {
Comment?: (data: WithTypename<Comment>) => null | string;
Entry?: (data: WithTypename<Entry>) => null | string;
Repository?: (data: WithTypename<Repository>) => null | string;
User?: (data: WithTypename<User>) => null | string;
Vote?: (data: WithTypename<Vote>) => null | ... | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type GraphCacheResolvers = {
Query?: {
feed?: GraphCacheResolver<WithTypename<Query>, QueryFeedArgs, Array<WithTypename<Entry> | string>>;
entry?: GraphCacheResolver<WithTypename<Query>, QueryEntryArgs, WithTypename<Entry> | string>;
currentUser?: GraphCacheResolver<WithTypename<Query>, Record<str... | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type GraphCacheOptimisticUpdaters = {
submitRepository?: GraphCacheOptimisticMutationResolver<MutationSubmitRepositoryArgs, Maybe<WithTypename<Entry>>>;
vote?: GraphCacheOptimisticMutationResolver<MutationVoteArgs, Maybe<WithTypename<Entry>>>;
submitComment?: GraphCacheOptimisticMutationResolver<MutationS... | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type GraphCacheUpdaters = {
Mutation?: {
submitRepository?: GraphCacheUpdateResolver<
{ submitRepository: Maybe<WithTypename<Entry>> },
MutationSubmitRepositoryArgs
>;
vote?: GraphCacheUpdateResolver<{ vote: Maybe<WithTypename<Entry>> }, MutationVoteArgs>;
submitComment?: GraphCach... | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
TypeAliasDeclaration |
export type GraphCacheConfig = {
schema?: IntrospectionData;
updates?: GraphCacheUpdaters;
keys?: GraphCacheKeysConfig;
optimistic?: GraphCacheOptimisticUpdaters;
resolvers?: GraphCacheResolvers;
storage?: GraphCacheStorageAdapter;
}; | PabloSzx/graphql-code-generator | dev-test/githunt/types.urql.tsx | TypeScript |
ArrowFunction |
() => {
const tempStyleCode = `.test-demo-logo {
height: 32px;
margin: 16px;
background: rgba(255, 255, 255, 0.2);
}
.test-demo-site-layout .test-demo-site-layout-background {
background: #fff;
}`;
return (
<>
<style dangerouslySetInnerHTML={{ __html: tempStyleCode }} | foxpage/foxpage-component-antd | packages/antd-layout/stories/index.stories.tsx | TypeScript |
ArrowFunction |
() => {
const props = mountEditor(Editor, {
attrs: {
hasSider: true,
},
});
return (
<AntdLayout {...props}>
<TestContent />
</AntdLayout>
);
} | foxpage/foxpage-component-antd | packages/antd-layout/stories/index.stories.tsx | TypeScript |
FunctionDeclaration | /**
* Top Root Level Wallet State to control what screen to show
*/
export function RootNavigator (): JSX.Element {
const {
wallets,
isLoaded
} = useWalletPersistenceContext()
// To prevent flicker on start of app, while API is not yet called
if (!isLoaded) {
return <></>
}
if (wallets.lengt... | AndiyNW/andiynwios | mobile-app/app/screens/RootNavigator.tsx | TypeScript |
ArrowFunction |
() => {
const component = create(<Emg src={ExampleImg} />);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
} | wayou/emg | __tests__/emg.test.tsx | TypeScript |
ArrowFunction |
(value): string => _.get(value, 'requests.storage') | JPinkney/console | frontend/packages/kubevirt-plugin/src/selectors/selectors.ts | TypeScript |
ArrowFunction |
(vmLikeEntity: VMLikeEntityKind): boolean =>
vmLikeEntity && vmLikeEntity.kind === VirtualMachineModel.kind | JPinkney/console | frontend/packages/kubevirt-plugin/src/selectors/selectors.ts | TypeScript |
ArrowFunction |
(vmLikeEntity: VMLikeEntityKind): VMKind => {
if (!vmLikeEntity) {
return null;
}
if (isVm(vmLikeEntity)) {
return vmLikeEntity as VMKind;
}
return selectVm(vmLikeEntity as TemplateKind);
} | JPinkney/console | frontend/packages/kubevirt-plugin/src/selectors/selectors.ts | TypeScript |
ArrowFunction |
() => {
getSubById(this.sub)
.then(({ data, statusCode }) => {
if (statusCode === STATUS_SUCCESS) {
this.setState({
subData: data as ISubData
});
} else {
this.props.history.push(RouteNames.notFound);
}
})
.catch(() => this.props.h... | Pradeep-selva/breaddit | client/src/Pages/Subreaddit/container.tsx | TypeScript |
ArrowFunction |
({ data, statusCode }) => {
if (statusCode === STATUS_SUCCESS) {
this.setState({
subData: data as ISubData
});
} else {
this.props.history.push(RouteNames.notFound);
}
} | Pradeep-selva/breaddit | client/src/Pages/Subreaddit/container.tsx | TypeScript |
ArrowFunction |
() => this.props.history.push(RouteNames.notFound) | Pradeep-selva/breaddit | client/src/Pages/Subreaddit/container.tsx | TypeScript |
ArrowFunction |
({ data, statusCode }) => {
if (statusCode === STATUS_SUCCESS) {
this.setState(
{
posts: data as Array<IPost>,
hasFetched: true
},
() => {
if (data?.length < this.limit) {
this.setState({ hasMoreToFetch: fal... | Pradeep-selva/breaddit | client/src/Pages/Subreaddit/container.tsx | TypeScript |
ArrowFunction |
() => {
if (data?.length < this.limit) {
this.setState({ hasMoreToFetch: false });
}
} | Pradeep-selva/breaddit | client/src/Pages/Subreaddit/container.tsx | TypeScript |
ArrowFunction |
() => {
if (this.state.hasMoreToFetch) {
getSubPosts(this.sub, this.state.offset + this.limit).then(
({ data, statusCode }) => {
if (statusCode === STATUS_SUCCESS) {
this.setState(
(state) => ({
posts: [...state.posts, ...data],
offs... | Pradeep-selva/breaddit | client/src/Pages/Subreaddit/container.tsx | TypeScript |
ArrowFunction |
({ data, statusCode }) => {
if (statusCode === STATUS_SUCCESS) {
this.setState(
(state) => ({
posts: [...state.posts, ...data],
offset: state.offset + this.limit
}),
() => {
if (data?.length < this.limit) {
... | Pradeep-selva/breaddit | client/src/Pages/Subreaddit/container.tsx | TypeScript |
ArrowFunction |
(state) => ({
posts: [...state.posts, ...data],
offset: state.offset + this.limit
}) | Pradeep-selva/breaddit | client/src/Pages/Subreaddit/container.tsx | TypeScript |
ArrowFunction |
() => {
if (data?.length < this.limit) {
this.setState((state) => ({ hasMoreToFetch: false }));
}
} | Pradeep-selva/breaddit | client/src/Pages/Subreaddit/container.tsx | TypeScript |
ArrowFunction |
(state) => ({ hasMoreToFetch: false }) | Pradeep-selva/breaddit | client/src/Pages/Subreaddit/container.tsx | TypeScript |
ArrowFunction |
() => {
if (this.props.isAuthenticated) {
this.props.joinSub(this.sub);
} else {
this.props.history.push({
pathname: RouteNames.login,
state: { heading: "Login to join subreaddits you like!" }
});
}
} | Pradeep-selva/breaddit | client/src/Pages/Subreaddit/container.tsx | TypeScript |
ArrowFunction |
() => {
this.props.leaveSub(this.sub);
} | Pradeep-selva/breaddit | client/src/Pages/Subreaddit/container.tsx | TypeScript |
ArrowFunction |
(item, index) => (
<PostCard
{...item} | Pradeep-selva/breaddit | client/src/Pages/Subreaddit/container.tsx | TypeScript |
ArrowFunction |
(_, index) => (
<PostSkeleton key={index} /> | Pradeep-selva/breaddit | client/src/Pages/Subreaddit/container.tsx | TypeScript |
ClassDeclaration |
class Subreaddit extends Component<IProps, IState> {
limit: number;
sub: string;
constructor(props: IProps) {
super(props);
this.limit = 15;
this.sub = this.props.match?.params?.id || "";
this.state = {
offset: 0,
posts: [],
hasMoreToFetch: true,
hasFetched: false,
... | Pradeep-selva/breaddit | client/src/Pages/Subreaddit/container.tsx | TypeScript |
InterfaceDeclaration |
interface SelfProps {
match: {
params: {
[x: string]: string;
};
};
history: any;
} | Pradeep-selva/breaddit | client/src/Pages/Subreaddit/container.tsx | TypeScript |
InterfaceDeclaration |
interface IState {
offset: number;
posts: Array<IPost>;
hasMoreToFetch: boolean;
hasFetched: boolean;
subData: ISubData | null;
} | Pradeep-selva/breaddit | client/src/Pages/Subreaddit/container.tsx | TypeScript |
TypeAliasDeclaration |
type IProps = SelfProps & IClass & ReduxProps & { width: string }; | Pradeep-selva/breaddit | client/src/Pages/Subreaddit/container.tsx | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.