type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
InterfaceDeclaration | /**
* A flattened tree representing the nodes in a resolver graph.
*/
export interface ResolverTree {
/**
* Origin of the tree. This is in the middle of the tree. Typically this would be the same
* process node that generated an alert.
*/
entityID: string;
children: ResolverChildren;
relatedEvents: O... | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
InterfaceDeclaration | /**
* Safe version of `ResolverTree`.
*/
export interface SafeResolverTree {
/**
* Origin of the tree. This is in the middle of the tree. Typically this would be the same
* process node that generated an alert.
*/
entityID: string;
children: SafeResolverChildren;
relatedAlerts: Omit<ResolverRelatedAl... | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
InterfaceDeclaration | /**
* The lifecycle events (start, end etc) for a node.
*/
export interface ResolverLifecycleNode {
entityID: string;
lifecycle: SafeResolverEvent[];
/**
* stats are only set when the entire tree is being fetched
*/
stats?: ResolverNodeStats;
} | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
InterfaceDeclaration | /**
* Safe version of `ResolverLifecycleNode`.
*/
export interface SafeResolverLifecycleNode {
entityID: string;
lifecycle: SafeResolverEvent[];
/**
* stats are only set when the entire tree is being fetched
*/
stats?: ResolverNodeStats;
} | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
InterfaceDeclaration | /**
* The response structure when searching for ancestors of a node.
*/
export interface ResolverAncestry {
/**
* An array of ancestors with the lifecycle events grouped together
*/
ancestors: ResolverLifecycleNode[];
/**
* A cursor for retrieving additional ancestors for a particular node. `null` indi... | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
InterfaceDeclaration | /**
* Safe version of `ResolverAncestry`.
*/
export interface SafeResolverAncestry {
/**
* An array of ancestors with the lifecycle events grouped together
*/
ancestors: SafeResolverLifecycleNode[];
/**
* A cursor for retrieving additional ancestors for a particular node. `null` indicates that there we... | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
InterfaceDeclaration | /**
* Response structure for the related events route.
*/
export interface ResolverRelatedEvents {
entityID: string;
events: SafeResolverEvent[];
nextEvent: string | null;
} | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
InterfaceDeclaration | /**
* Response structure for the events route.
* `nextEvent` will be set to null when at the time of querying there were no more results to retrieve from ES.
*/
export interface ResolverPaginatedEvents {
events: SafeResolverEvent[];
nextEvent: string | null;
} | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
InterfaceDeclaration | /**
* Response structure for the alerts route.
*/
export interface ResolverRelatedAlerts {
entityID: string;
alerts: SafeResolverEvent[];
nextAlert: string | null;
} | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
InterfaceDeclaration | /**
* Returned by the server via /api/endpoint/metadata
*/
export interface HostResultList {
/* the hosts restricted by the page size */
hosts: HostInfo[];
/* the total number of unique hosts in the index */
total: number;
/* the page size requested */
request_page_size: number;
/* the page index reques... | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
InterfaceDeclaration | /**
* The data_stream fields in an elasticsearch document.
*/
export interface DataStream {
dataset: string;
namespace: string;
type: string;
} | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
InterfaceDeclaration | /**
* Operating System metadata.
*/
export interface OSFields {
full: string;
name: string;
version: string;
platform: string;
family: string;
Ext: OSFieldsExt;
} | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
InterfaceDeclaration | /**
* Extended Operating System metadata.
*/
export interface OSFieldsExt {
variant: string;
} | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
InterfaceDeclaration | /**
* Host metadata. Describes an endpoint host.
*/
export interface Host {
id: string;
hostname: string;
name: string;
ip: string[];
mac: string[];
architecture: string;
os: OSFields;
} | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
InterfaceDeclaration |
export interface LegacyEndpointEvent {
'@timestamp': number;
endgame: {
pid?: number;
ppid?: number;
event_type_full?: string;
event_subtype_full?: string;
event_timestamp?: number;
event_type?: number;
unique_pid: number;
unique_ppid?: number;
machine_id?: string;
process_n... | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
InterfaceDeclaration |
export interface EndpointEvent {
'@timestamp': number;
agent: {
id: string;
version: string;
type: string;
};
ecs: {
version: string;
};
// A legacy has `endgame` and an `EndpointEvent` (AKA ECS event) will never have it. This helps TS narrow `SafeResolverEvent`.
endgame?: never;
event:... | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
InterfaceDeclaration |
export interface SafeLegacyEndpointEvent {
'@timestamp'?: ECSField<number>;
/**
* 'legacy' events must have an `endgame` key.
*/
endgame: Partial<{
pid: ECSField<number>;
ppid: ECSField<number>;
event_type_full: ECSField<string>;
event_subtype_full: ECSField<string>;
event_timestamp: EC... | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
InterfaceDeclaration | /**
* Endpoint Policy configuration
*/
export interface PolicyConfig {
windows: {
advanced?: {};
events: {
dll_and_driver_load: boolean;
dns: boolean;
file: boolean;
network: boolean;
process: boolean;
registry: boolean;
security: boolean;
};
malware: Malwar... | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
InterfaceDeclaration | /**
* The set of Policy configuration settings that are show/edited via the UI
*/
export interface UIPolicyConfig {
/**
* Windows-specific policy configuration that is supported via the UI
*/
windows: Pick<PolicyConfig['windows'], 'events' | 'malware' | 'popup' | 'advanced'>;
/**
* Mac-specific policy ... | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
InterfaceDeclaration | /** Policy: Malware protection fields */
export interface MalwareFields {
mode: ProtectionModes;
} | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
InterfaceDeclaration | /**
* Host Policy Response Applied Action
*/
export interface HostPolicyResponseAppliedAction {
name: HostPolicyActionName;
status: HostPolicyResponseActionStatus;
message: string;
} | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
InterfaceDeclaration |
interface HostPolicyResponseConfigurationStatus {
status: HostPolicyResponseActionStatus;
concerned_actions: HostPolicyActionName[];
} | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
InterfaceDeclaration | /**
* Host Policy Response Applied Artifact
*/
interface HostPolicyResponseAppliedArtifact {
name: string;
sha256: string;
} | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
InterfaceDeclaration | /**
* Information about the applying of a policy to a given host
*/
export interface HostPolicyResponse {
'@timestamp': number;
data_stream: DataStream;
elastic: {
agent: {
id: string;
};
};
ecs: {
version: string;
};
host: {
id: string;
};
event: {
created: number;
kin... | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
InterfaceDeclaration | /**
* REST API response for retrieving a host's Policy Response status
*/
export interface GetHostPolicyResponse {
policy_response: HostPolicyResponse;
} | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
EnumDeclaration | /**
* The status of the Endpoint Agent as reported by the Agent or the
* Security Solution app using events from Fleet.
*/
export enum EndpointStatus {
/**
* Agent is enrolled with Fleet
*/
enrolled = 'enrolled',
/**
* Agent is unenrrolled from Fleet
*/
unenrolled = 'unenrolled',
} | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
EnumDeclaration | /**
* The status of the host, which is mapped to the Elastic Agent status in Fleet
*/
export enum HostStatus {
/**
* Default state of the host when no host information is present or host information cannot
* be retrieved. e.g. API error
*/
ERROR = 'error',
/**
* Host is online as indicated by its c... | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
EnumDeclaration |
export enum MetadataQueryStrategyVersions {
VERSION_1 = 'v1',
VERSION_2 = 'v2',
} | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
EnumDeclaration | /** Policy protection mode options */
export enum ProtectionModes {
detect = 'detect',
prevent = 'prevent',
off = 'off',
} | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
EnumDeclaration | /**
* the possible status for actions, configurations and overall Policy Response
*/
export enum HostPolicyResponseActionStatus {
success = 'success',
failure = 'failure',
warning = 'warning',
} | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
TypeAliasDeclaration | /**
* A deep readonly type that will make all children of a given object readonly recursively
*/
export type Immutable<T> = T extends undefined | null | boolean | string | number
? T
: unknown extends T
? unknown
: T extends Array<infer U>
? ImmutableArray<U>
: T extends Map<infer K, infer V>
? Immutabl... | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
TypeAliasDeclaration |
export type ImmutableArray<T> = ReadonlyArray<Immutable<T>>; | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
TypeAliasDeclaration |
type ImmutableMap<K, V> = ReadonlyMap<Immutable<K>, Immutable<V>>; | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
TypeAliasDeclaration |
type ImmutableSet<T> = ReadonlySet<Immutable<T>>; | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
TypeAliasDeclaration |
type ImmutableObject<T> = { readonly [K in keyof T]: Immutable<T[K]> }; | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
TypeAliasDeclaration | /**
* A record of hashes for something. Provides hashes in multiple formats. A favorite structure of the Elastic Endpoint.
*/
type Hashes = Partial<{
/**
* A hash in MD5 format.
*/
md5: ECSField<string>;
/**
* A hash in SHA-1 format.
*/
sha1: ECSField<string>;
/**
* A hash in SHA-256 format.
... | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
TypeAliasDeclaration |
type MalwareClassification = Partial<{
identifier: ECSField<string>;
score: ECSField<number>;
threshold: ECSField<number>;
version: ECSField<string>;
}>; | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
TypeAliasDeclaration |
type ThreadFields = Partial<{
id: ECSField<number>;
Ext: Partial<{
service_name: ECSField<string>;
start: ECSField<number>;
start_address: ECSField<number>;
start_address_module: ECSField<string>;
}>;
}>; | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
TypeAliasDeclaration |
type DllFields = Partial<{
hash: Hashes;
path: ECSField<string>;
pe: Partial<{
architecture: ECSField<string>;
}>;
code_signature: Partial<{
subject_name: ECSField<string>;
trusted: ECSField<boolean>;
}>;
Ext: Partial<{
compile_time: ECSField<number>;
malware_classification: MalwareCl... | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
TypeAliasDeclaration | /**
* Describes an Alert Event.
*/
export type AlertEvent = Partial<{
event: Partial<{
action: ECSField<string>;
dataset: ECSField<string>;
module: ECSField<string>;
}>;
Endpoint: Partial<{
policy: Partial<{
applied: Partial<{
id: ECSField<string>;
status: ECSField<HostPoli... | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
TypeAliasDeclaration |
export type HostInfo = Immutable<{
metadata: HostMetadata;
host_status: HostStatus;
/* the version of the query strategy */
query_strategy_version: MetadataQueryStrategyVersions;
}>; | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
TypeAliasDeclaration |
export type HostMetadataDetails = Immutable<{
agent: {
id: string;
};
HostDetails: HostMetadata;
}>; | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
TypeAliasDeclaration |
export type HostMetadata = Immutable<{
'@timestamp': number;
event: {
created: number;
kind: string;
id: string;
category: string[];
type: string[];
module: string;
action: string;
dataset: string;
};
elastic: {
agent: {
id: string;
};
};
Endpoint: {
status... | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
TypeAliasDeclaration |
export type ResolverEvent = EndpointEvent | LegacyEndpointEvent; | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
TypeAliasDeclaration | /**
* All mappings in Elasticsearch support arrays. They can also return null values or be missing. For example, a `keyword` mapping could return `null` or `[null]` or `[]` or `'hi'`, or `['hi', 'there']`. We need to handle these cases in order to avoid throwing an error.
* When dealing with an value that comes from ... | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
TypeAliasDeclaration | /**
* A more conservative version of `ResolverEvent` that treats fields as optional and use `ECSField` to type all ECS fields.
* Prefer this over `ResolverEvent`.
*/
export type SafeResolverEvent = SafeEndpointEvent | SafeLegacyEndpointEvent; | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
TypeAliasDeclaration | /**
* Safer version of ResolverEvent. Please use this going forward.
*/
export type SafeEndpointEvent = Partial<{
'@timestamp': ECSField<number>;
agent: Partial<{
id: ECSField<string>;
version: ECSField<string>;
type: ECSField<string>;
}>;
data_stream: Partial<{
type: ECSField<string>;
dat... | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
TypeAliasDeclaration | /**
* The response body for the resolver '/entity' index API
*/
export type ResolverEntityIndex = Array<{ entity_id: string }>; | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
TypeAliasDeclaration | /**
* Takes a @kbn/config-schema 'schema' type and returns a type that represents valid inputs.
* Similar to `TypeOf`, but allows strings as input for `schema.number()` (which is inline
* with the behavior of the validator.) Also, for `schema.object`, when a value is a `schema.maybe`
* the key will be marked option... | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
TypeAliasDeclaration | /**
* Works like ObjectResultType, except that 'maybe' schema will create an optional key.
* This allows us to avoid passing 'maybeKey: undefined' when constructing such an object.
*
* Instead of using this directly, use `InputTypeOf`.
*/
type KbnConfigSchemaInputObjectTypeOf<P extends Record<string, unknown>> = {... | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
TypeAliasDeclaration | /**
* Takes the props of a schema.object type, and returns a version that excludes
* optional values. Used by `InputObjectTypeOf`.
*
* Instead of using this directly, use `InputTypeOf`.
*/
type KbnConfigSchemaNonOptionalProps<Props extends Record<string, unknown>> = Pick<
Props,
{
[Key in keyof Props]: und... | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
TypeAliasDeclaration | /**
* Endpoint Policy data, which extends Ingest's `PackagePolicy` type
*/
export type PolicyData = PackagePolicy & NewPolicyData; | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
TypeAliasDeclaration | /**
* New policy data. Used when updating the policy record via ingest APIs
*/
export type NewPolicyData = NewPackagePolicy & {
inputs: [
{
type: 'endpoint';
enabled: boolean;
streams: [];
config: {
artifact_manifest: {
value: ManifestSchema;
};
policy: ... | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
TypeAliasDeclaration | /**
* The name of actions that can be applied during the processing of a policy
*/
type HostPolicyActionName =
| 'download_model'
| 'ingest_events_config'
| 'workflow'
| 'configure_elasticsearch_connection'
| 'configure_kernel'
| 'configure_logging'
| 'configure_malware'
| 'connect_kernel'
| 'detect... | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
TypeAliasDeclaration |
export type HostPolicyResponseConfiguration = HostPolicyResponse['Endpoint']['policy']['applied']['response']['configurations']; | jchakravarty/kibana | x-pack/plugins/security_solution/common/endpoint/types/index.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-navigation',
template: `
<div class="layout-nav">
<a href="{{ path }}#/home/"
[class.active]="navSelected === navOptions.home"
(click)="activeNav(navOptions.home)">Home</a>
<a href="{{ path }}#/user-centric-metrics/"
[class.active]="navSelected === navO... | webdevinci/perfume.js | docs/src/app/navigation/navigation.component.ts | TypeScript |
MethodDeclaration |
ngAfterViewInit() {} | webdevinci/perfume.js | docs/src/app/navigation/navigation.component.ts | TypeScript |
MethodDeclaration |
activeNav(selected) {
this.navSelected = selected;
} | webdevinci/perfume.js | docs/src/app/navigation/navigation.component.ts | TypeScript |
ArrowFunction |
() => {
it("tree <> cartesian3 fuzz", function () {
this.timeout(10000);
const M = 1 << 11;
const $ = () => (1 + Math.random() * M) | 0;
for (let i = 0; i < 1e5; i++) {
const p = [$(), $(), $()];
const tree = cartesianToTree(p);
const morton = tre... | Ashyam90/umbrella | packages/morton/test/index.ts | TypeScript |
ArrowFunction |
() => (1 + Math.random() * M) | 0 | Ashyam90/umbrella | packages/morton/test/index.ts | TypeScript |
ArrowFunction |
() => this.setState({ redirect: true }) | justbartlett/intermediate-react | src/ErrorBoundary.tsx | TypeScript |
ClassDeclaration |
class ErrorBoundary extends Component {
public state = { hasError: false, redirect: false };
public static getDerivedStateFromError() {
return { hasError: true };
}
public componentDidCatch(error: Error, info: ErrorInfo) {
console.error("ErrorBoundary caught an error", error, info);
}
public compo... | justbartlett/intermediate-react | src/ErrorBoundary.tsx | TypeScript |
MethodDeclaration |
public static getDerivedStateFromError() {
return { hasError: true };
} | justbartlett/intermediate-react | src/ErrorBoundary.tsx | TypeScript |
MethodDeclaration |
public componentDidCatch(error: Error, info: ErrorInfo) {
console.error("ErrorBoundary caught an error", error, info);
} | justbartlett/intermediate-react | src/ErrorBoundary.tsx | TypeScript |
MethodDeclaration |
public componentDidUpdate() {
if (this.state.hasError) {
setTimeout(() => this.setState({ redirect: true }), 5000);
}
} | justbartlett/intermediate-react | src/ErrorBoundary.tsx | TypeScript |
MethodDeclaration |
public render() {
if (this.state.redirect) {
return <Redirect to="/" noThrow />;
}
if (this.state.hasError) {
return (
<h1>
There was an error with this listing. <Link to="/">Click here</Link>{" "}
to back to the home page or wait five seconds
</h1>
);... | justbartlett/intermediate-react | src/ErrorBoundary.tsx | TypeScript |
ClassDeclaration |
@Resolver('Country')
export class CountryEntityResolver {
constructor(private localeStringHydrator: LocaleStringHydrator) {}
@ResolveField()
name(@Ctx() ctx: RequestContext, @Parent() country: Country): Promise<string> {
return this.localeStringHydrator.hydrateLocaleStringField(ctx, country, 'name... | AneBLucena/vendure | packages/core/src/api/resolvers/entity/country-entity.resolver.ts | TypeScript |
MethodDeclaration |
@ResolveField()
name(@Ctx() ctx: RequestContext, @Parent() country: Country): Promise<string> {
return this.localeStringHydrator.hydrateLocaleStringField(ctx, country, 'name');
} | AneBLucena/vendure | packages/core/src/api/resolvers/entity/country-entity.resolver.ts | TypeScript |
ArrowFunction |
() => {
const { result } = useContactsQuery({ search: "" });
return (
<ContactListContainer>
{result?.data.contacts.map((contact) => (
<div key={contact.id}>{contact.name}</div>
))} | ekron/phonelessapp | src/ContactList.tsx | TypeScript |
ArrowFunction |
(contact) => (
<div key={contact.id}>{contact.name}</div> | ekron/phonelessapp | src/ContactList.tsx | TypeScript |
FunctionDeclaration | /**
* Hook to access the navigation prop of the parent screen anywhere.
*
* @returns Navigation prop of the parent screen.
*/
export default function useNavigation<
T extends NavigationProp<ParamListBase>
>(): T {
const navigation = React.useContext(NavigationContext);
if (navigation === undefined) {
thr... | 23lab/react-navigation | packages/core/src/useNavigation.tsx | TypeScript |
FunctionDeclaration | // @declaration: true
// @declaration: true
function g() {
var x = class C {
public prop1 = 1;
private foo() { }
static prop2 = 43;
}
} | 0xe/swc | crates/swc_ecma_parser/tests/tsc/modifierOnClassExpressionMemberInFunction.ts | TypeScript |
MethodDeclaration |
private foo() { } | 0xe/swc | crates/swc_ecma_parser/tests/tsc/modifierOnClassExpressionMemberInFunction.ts | TypeScript |
InterfaceDeclaration |
export interface Ad {
id: number;
type: 'ad';
name: string;
adType: 'VIDEO' | 'IMAGE';
filename: string;
duration: string;
order: number;
suborder: number;
sponsorName: string;
state: {
canStart: boolean;
started: boolean;
canComplete: boolean;
completed: boolean;
durationFrames: number;
framesLe... | effintoast/GDQ18-MGSR | src/types/Intermission.d.ts | TypeScript |
InterfaceDeclaration |
export interface AdBreak {
id: number;
type: 'adBreak';
ads: Ad[];
state: AdBreakState;
} | effintoast/GDQ18-MGSR | src/types/Intermission.d.ts | TypeScript |
InterfaceDeclaration |
export interface AdBreakState {
canStart: boolean;
cantStartReason: string;
started: boolean;
canComplete: boolean;
completed: boolean;
} | effintoast/GDQ18-MGSR | src/types/Intermission.d.ts | TypeScript |
InterfaceDeclaration |
export interface Interview {
id: number;
interviewees: string[];
interviewers: string[];
duration: string;
order: number;
subject: string;
suborder: number;
type: 'interview';
} | effintoast/GDQ18-MGSR | src/types/Intermission.d.ts | TypeScript |
EnumDeclaration |
export const enum CantStartReasonsEnum {
ALREADY_STARTED = 'already started',
ALREADY_COMPLETED = 'already completed',
RUN_ACTIVE = 'run in progress',
PRIOR_BREAK_INCOMPLETE = 'a prior ad break is not complete',
MUST_ADVANCE_SCHEDULE = 'stream tech must go to next run',
MISSING_FILES = 'one or more ad files are ... | effintoast/GDQ18-MGSR | src/types/Intermission.d.ts | TypeScript |
TypeAliasDeclaration |
export type IntermissionContentItem = Interview | AdBreak; | effintoast/GDQ18-MGSR | src/types/Intermission.d.ts | TypeScript |
FunctionDeclaration |
export function handleNull(errors: ReadonlyArray<GraphQLError>) {
if (errors.length) {
if (errors.some(error => !error.path || error.path.length < 2)) {
if (errors.length > 1) {
const combinedError = new CombinedError(errors);
return combinedError;
}
const error = errors[0];
... | MichaelDeBoey/graphql-tools | packages/delegate/src/results/handleNull.ts | TypeScript |
ArrowFunction |
error => !error.path || error.path.length < 2 | MichaelDeBoey/graphql-tools | packages/delegate/src/results/handleNull.ts | TypeScript |
ArrowFunction |
error => typeof error.path[1] === 'string' | MichaelDeBoey/graphql-tools | packages/delegate/src/results/handleNull.ts | TypeScript |
ArrowFunction |
pathSegment => {
result[pathSegment] = handleNull(childErrors[pathSegment]);
} | MichaelDeBoey/graphql-tools | packages/delegate/src/results/handleNull.ts | TypeScript |
ArrowFunction |
pathSegment => {
result.push(handleNull(childErrors[pathSegment]));
} | MichaelDeBoey/graphql-tools | packages/delegate/src/results/handleNull.ts | TypeScript |
ArrowFunction |
async (): Promise<any> => {
const password: string = "R1oJgqud0GGqe9nhip49N"
const endpoints: string[] = ["*"]
const token: string = await auth.newToken(password, endpoints)
console.log(token)
} | Alex-Werner/avalanchejs | examples/auth/newToken.ts | TypeScript |
ArrowFunction |
(alert) => {
if (alert) {
this.alertService.addAlert(alert);
this.workerService.alert = null;
}
} | NMDSdevopsServiceAdm/SopraSteria-SFC | src/app/features/workers/training-qualifications-record/training-and-qualifications-record.component.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-training-and-qualifications-record',
templateUrl: './training-and-qualifications-record.component.html',
})
export class TrainingAndQualificationsRecordComponent implements OnInit, OnDestroy {
public canEditWorker: boolean;
public canViewWorker: boolean;
public worker: Worker;
p... | NMDSdevopsServiceAdm/SopraSteria-SFC | src/app/features/workers/training-qualifications-record/training-and-qualifications-record.component.ts | TypeScript |
MethodDeclaration |
ngOnInit() {
this.workplace = this.route.parent.snapshot.data.establishment;
this.worker = this.route.snapshot.data.worker;
const journey = this.establishmentService.isOwnWorkplace() ? JourneyType.MY_WORKPLACE : JourneyType.ALL_WORKPLACES;
this.breadcrumbService.show(journey);
this.setTrainingAndQu... | NMDSdevopsServiceAdm/SopraSteria-SFC | src/app/features/workers/training-qualifications-record/training-and-qualifications-record.component.ts | TypeScript |
MethodDeclaration | // This method is used to set training & qualifications list and their counts and alert flag
public setTrainingAndQualifications() {
this.qualificationsCount = this.route.snapshot.data.qualifications.count;
this.trainingCount = this.route.snapshot.data.trainingRecords.count;
this.trainingAlert = this.traini... | NMDSdevopsServiceAdm/SopraSteria-SFC | src/app/features/workers/training-qualifications-record/training-and-qualifications-record.component.ts | TypeScript |
MethodDeclaration | //event handler from training and qualification component.
public trainingAndQualificationsChangedHandler(refresh) {
if (refresh) {
this.setTrainingAndQualifications();
}
} | NMDSdevopsServiceAdm/SopraSteria-SFC | src/app/features/workers/training-qualifications-record/training-and-qualifications-record.component.ts | TypeScript |
MethodDeclaration |
private setReturnTo(): void {
const returnToRecord = {
url: ['/workplace', this.workplace.uid, 'training-and-qualifications-record', this.worker.uid, 'training'],
};
this.workerService.setReturnTo(returnToRecord);
} | NMDSdevopsServiceAdm/SopraSteria-SFC | src/app/features/workers/training-qualifications-record/training-and-qualifications-record.component.ts | TypeScript |
MethodDeclaration |
ngOnDestroy() {
this.subscriptions.unsubscribe();
} | NMDSdevopsServiceAdm/SopraSteria-SFC | src/app/features/workers/training-qualifications-record/training-and-qualifications-record.component.ts | TypeScript |
ArrowFunction |
({
source,
containerStyle,
style: styleOverride,
resizeMode = 'cover',
}: LocalImageProps) => {
// render
return (
<View style={containerStyle}>
<FastImage
style={[styles.img, styleOverride]}
resizeMode={resizeMode}
source={images[source ?? 'default']}
/>
</View> | hngocl/StructReactNative | template/src/app/library/components/local-image/index.tsx | TypeScript |
ArrowFunction |
(result) => {
if (!result.errorCode) {
this.reviews = result.reviews;
this.total = result.total;
}
} | ntnhan2266/helper_admin_web | src/app/reviews/reviews.component.ts | TypeScript |
ArrowFunction |
(result) => {
if (result.completed) {
this._utilService.showNotification(
'top', 'right',
'Deleted successfully',
this._utilService.type.success);
this.reviews.splice(index, 1);
}
} | ntnhan2266/helper_admin_web | src/app/reviews/reviews.component.ts | TypeScript |
ArrowFunction |
dialogResult => {
const result = dialogResult;
if (result) {
this.deleteReview(id, index);
}
} | ntnhan2266/helper_admin_web | src/app/reviews/reviews.component.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-reviews',
templateUrl: './reviews.component.html',
styleUrls: ['./reviews.component.scss']
})
export class ReviewsComponent implements OnInit {
reviews = [];
total = 0;
pageSize = 10;
pageEvent: PageEvent;
query = '';
filterBy = '';
constructor(priv... | ntnhan2266/helper_admin_web | src/app/reviews/reviews.component.ts | TypeScript |
MethodDeclaration |
ngOnInit() {
this.getData(null);
} | ntnhan2266/helper_admin_web | src/app/reviews/reviews.component.ts | TypeScript |
MethodDeclaration |
public getData(event?: PageEvent) {
this._reviewservice.list({
pageIndex: event ? event.pageIndex : 0,
pageSize: this.pageSize,
query: this.query,
filterBy: this.filterBy,
})
.subscribe((result) => {
if (!result.errorCode) {
... | ntnhan2266/helper_admin_web | src/app/reviews/reviews.component.ts | TypeScript |
MethodDeclaration |
private deleteReview(id: string, index: number) {
this._reviewservice.delete(id).subscribe((result) => {
if (result.completed) {
this._utilService.showNotification(
'top', 'right',
'Deleted successfully',
this._utilService.... | ntnhan2266/helper_admin_web | src/app/reviews/reviews.component.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.