type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ArrowFunction |
()=>{
expect(completedAssignmentComponent).toBeTruthy();
} | CohesionForce/kohese-server | kohese-portal/client/src/components/dashboard/assignment-dashboard/completed-assignment/completed-assignment.component.spec.ts | TypeScript |
FunctionDeclaration |
function sleep(ms: number) {
return new Promise((resolve) => setTimeout(resolve, ms));
} | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
FunctionDeclaration |
function setSession(sessionId: string, update: Partial<EditorSession>) {
const { editorSessions } = getState();
const session = getState().getSession(sessionId);
if (!session) {
return setState({
editorSessions: {
...editorSessions,
[sessionId]: { ...INITIAL_SESSION, ...update },
... | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
FunctionDeclaration |
function setBatch(sessionId: string, batchId: string, batch: Batch) {
const { batches, statements } = getState();
const { selectedStatementId } = getState().getSession(sessionId) || {};
const updatedStatements = {
...statements,
};
if (batch?.statements) {
for (const statement of batch.statements) ... | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
FunctionDeclaration |
export function toggleShowQueryModal() {
const { showQueryModal } = getState();
setState({ showQueryModal: !showQueryModal });
} | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
FunctionDeclaration |
export function setMouseOverResultPane(mouseOverResultPane: boolean) {
setState({ mouseOverResultPane });
} | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
FunctionDeclaration | /**
* Reset state (on signout for example)
*/
export async function resetState() {
setState({ ...INITIAL_STATE });
} | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
FunctionDeclaration | /**
* Open a connection client for the currently selected connection if supported
*/
export async function connectConnectionClient() {
const { focusedSessionId } = getState();
const { connectionClient, connectionId } = getState().getFocusedSession();
// If a connectionClient is already open or selected connect... | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
FunctionDeclaration | /**
* Disconnect the current connection client if one exists
*/
export async function disconnectConnectionClient() {
const { focusedSessionId } = getState();
const { connectionClient } = getState().getFocusedSession();
if (connectionClient) {
api
.delete(`/api/connection-clients/${connectionClient.id... | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
FunctionDeclaration |
function cleanupConnectionClient(connectionClient?: ConnectionClient) {
// Close connection client but do not wait for this to complete
if (connectionClient) {
api
.delete(`/api/connection-clients/${connectionClient.id}`)
.then((json) => {
if (json.error) {
message.error(json.erro... | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
FunctionDeclaration | /**
* Select connection and disconnect connectionClient if it exists
* @param connectionId
*/
export function selectConnectionId(connectionId: string) {
const { focusedSessionId } = getState();
const { connectionClient } = getState().getFocusedSession();
localforage
.setItem('selectedConnectionId', connec... | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
FunctionDeclaration |
export function toggleSchema() {
const { focusedSessionId } = getState();
const { showSchema } = getState().getFocusedSession();
setSession(focusedSessionId, { showSchema: !showSchema });
} | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
FunctionDeclaration |
export function toggleVisProperties() {
const { focusedSessionId } = getState();
const { showVisProperties } = getState().getFocusedSession();
setSession(focusedSessionId, { showVisProperties: !showVisProperties });
} | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
FunctionDeclaration |
export function setSchemaState(connectionId: string, schemaState: SchemaState) {
const { schemaStates } = getState();
const update = {
...schemaStates,
[connectionId]: schemaState,
};
setState({ schemaStates: update });
} | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
FunctionDeclaration | /**
* Get schema via API and store into editor store
* @param connectionId - connection id to get schema for
* @param reload - force cache refresh for schema
*/
export async function loadSchema(connectionId: string, reload?: boolean) {
const { schemaStates, focusedSessionId } = getState();
const { showSchema, s... | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
FunctionDeclaration |
export function toggleSchemaItem(connectionId: string, item: { id: string }) {
const { focusedSessionId } = getState();
const { schemaExpansions } = getState().getFocusedSession();
const expanded = { ...schemaExpansions[connectionId] };
expanded[item.id] = !expanded[item.id];
setSession(focusedSessionId, {... | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
FunctionDeclaration | /**
* Sets the state for an asynchronous driver that will enable cancel queries
* @param {boolean} setAsynchronousDriver
*/
export function setAsynchronousDriver(asynchronous?: boolean) {
const { focusedSessionId } = getState();
const isAsync = asynchronous ? true : false;
setSession(focusedSessionId, {
i... | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
async () => {
const { editorSessions } = getState();
for (const sessionId of Object.keys(editorSessions)) {
const { connectionClient } = getState().getSession(sessionId) || {};
if (connectionClient) {
const updateJson = await api.put(
`/api/connection-clients/${connectionClient.id}`,
... | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
async (
config: AppInfo['config'],
connections: Connection[]
) => {
try {
let [selectedConnectionId] = await Promise.all([
localforage.getItem('selectedConnectionId'),
]);
let initialConnectionId = '';
if (connections.length === 1) {
initialConnectionId = connections[0].id;
} el... | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
(c) => c.id === defaultConnectionId | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
(c) => c.id === selectedConnectionId | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
(c) => c.name === qsConnectionName | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
(c) => c.id === qsConnectionId | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
(connection) => connection.id === connectionId | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
(json) => {
if (json.error) {
message.error(json.error);
}
} | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
(error) => message.error(error) | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
async () => {
const { focusedSessionId } = getState();
const { queryText, queryId } = getState().getFocusedSession();
const json = await api.post('/api/format-sql', {
query: queryText,
});
if (json.error) {
message.error(json.error);
return;
}
if (!json.data || !json.data.query) {
cons... | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
async (queryId: string) => {
const response = await api.getQuery(queryId);
const { error, data } = response;
if (error || !data) {
return response;
}
const { focusedSessionId } = getState();
const { connectionClient, ...restOfCurrentSession } =
getState().getFocusedSession();
// Cleanup existi... | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
async () => {
const { focusedSessionId } = getState();
const {
queryId,
queryName,
queryText,
chartType,
chartFields,
connectionId,
connectionClient,
selectedText,
isDriverAsynchronous,
} = getState().getFocusedSession();
if (!connectionId) {
return setSession(focusedSe... | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
async () => {
const { focusedSessionId } = getState();
const { connectionId, isDriverAsynchronous, batchId } =
getState().getFocusedSession();
if (!isDriverAsynchronous) {
return setSession(focusedSessionId, {
queryError: 'Driver does not support cancellation',
selectedStatementId: '',
}... | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
async (
batchHistoryItem: BatchHistoryItem
) => {
const { focusedSessionId } = getState();
// Statements might not exist if query result data is purged
// In that case, just restore the SQL and chart config and similar
// clear out batchId/selectedStatementId
const hasStatements = batchHistoryItem.stateme... | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
async (additionalUpdates?: Partial<EditorSession>) => {
const { focusedSessionId } = getState();
const session = getState().getFocusedSession();
// If can't write, bail early
if (!session.canWrite) {
setSession(focusedSessionId, { showValidation: false });
setState({ showQueryModal: false });
retu... | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
(json) => {
const { error, data } = json;
if (error) {
// If there was an error, show the save dialog.
// It might be closed and it is where the error is placed.
// This should be rare, and not sure what might trigger it at this point, but just in case
setSession(focusedSess... | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
(json) => {
const { error, data } = json;
if (error) {
// If there was an error, show the save dialog.
// It might be closed and it is where the error is placed.
// This should be rare, and not sure what might trigger it at this point, but just in case
setSession(focusedSess... | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
() => {
const { focusedSessionId } = getState();
const { queryName } = getState().getFocusedSession();
const history = getHistory();
setSession(focusedSessionId, {
queryId: '',
queryName: `Copy of ${queryName}`,
unsavedChanges: true,
canDelete: true,
canWrite: true,
canRead: true,
});... | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
() => {
const { focusedSessionId } = getState();
// Get some editor state from current session and carry that on to new session
const {
showSchema,
showVisProperties,
schemaExpansions,
connectionId,
connectionClient,
} = getState().getFocusedSession();
const session = {
...INITIAL_S... | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
(selectedStatementId: string) => {
const { focusedSessionId } = getState();
setSession(focusedSessionId, { selectedStatementId });
} | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
(queryText: string) => {
const { focusedSessionId } = getState();
const { queryId } = getState().getFocusedSession();
setLocalQueryText(queryId, queryText);
setSession(focusedSessionId, { queryText, unsavedChanges: true });
} | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
(queryName: string) => {
const { focusedSessionId } = getState();
setSession(focusedSessionId, { queryName, unsavedChanges: true });
} | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
(tags: string[]) => {
const { focusedSessionId } = getState();
setSession(focusedSessionId, { tags, unsavedChanges: true });
} | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
(acl: Partial<ACLRecord>[]) => {
const { focusedSessionId } = getState();
setSession(focusedSessionId, { acl, unsavedChanges: true });
} | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
(chartType: string) => {
const { focusedSessionId } = getState();
setSession(focusedSessionId, { chartType, unsavedChanges: true });
} | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
(chartFields: ChartFields) => {
const { focusedSessionId } = getState();
setSession(focusedSessionId, { chartFields, unsavedChanges: true });
} | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
(
chartFieldId: string,
queryResultField: string | boolean | number
) => {
const { focusedSessionId } = getState();
const { chartFields } = getState().getFocusedSession();
setSession(focusedSessionId, {
chartFields: { ...chartFields, [chartFieldId]: queryResultField },
unsavedChanges: true,
});
} | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
(selectedText: string) => {
const { focusedSessionId } = getState();
setSession(focusedSessionId, { selectedText });
} | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
(schema) => {
expanded[schema.name] = true;
} | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
(a, b) => stringCompare.compare(a.name, b.name) | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
(schema) => {
schema.tables.sort(nameCompare);
// NOTE: we do not sort columns that can be annoying with regards to creation order.
} | ExternalRepositories/sqlpad | client/src/stores/editor-actions.ts | TypeScript |
ArrowFunction |
() => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [
AppComponent
],
}).compileComponents();
});
it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app... | jmhummel/get-stream-url | src/app/app.component.spec.ts | TypeScript |
ArrowFunction |
() => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('get-stream-url');
} | jmhummel/get-stream-url | src/app/app.component.spec.ts | TypeScript |
ArrowFunction |
() => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement;
expect(compiled.querySelector('.content span').textContent).toContain('get-stream-url app is running!');
} | jmhummel/get-stream-url | src/app/app.component.spec.ts | TypeScript |
ArrowFunction |
projectData => {
this.projects = projectData;
this.select.emit(this.projects[0].id);
} | beemsoft/techytax-ng2 | src/client/app/shared/selectors/project.selector.ts | TypeScript |
ArrowFunction |
error => {
alert(error);
console.log(error);
} | beemsoft/techytax-ng2 | src/client/app/shared/selectors/project.selector.ts | TypeScript |
ArrowFunction |
() => console.log('Projects retrieved: ' + this.projects.length) | beemsoft/techytax-ng2 | src/client/app/shared/selectors/project.selector.ts | TypeScript |
ClassDeclaration |
@Component({
moduleId: module.id,
selector: 'project-selector',
template: `<div>
<select #sel (change)="select.emit(sel.value)">
<option *ngFor="let item of projects" [value]="item.id">{{item.code}}
</option>
</select>
</div>`
})
export class ProjectSelector implements OnInit {
private pr... | beemsoft/techytax-ng2 | src/client/app/shared/selectors/project.selector.ts | TypeScript |
MethodDeclaration |
ngOnInit() {
this.projectService.getProjects()
.subscribe(
projectData => {
this.projects = projectData;
this.select.emit(this.projects[0].id);
},
error => {
alert(error);
console.log(error);
},
... | beemsoft/techytax-ng2 | src/client/app/shared/selectors/project.selector.ts | TypeScript |
ArrowFunction |
(a: any[], b: any[]) =>
a.length === b.length && a.every((it, index) => it === b[index]) | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
ArrowFunction |
(it, index) => it === b[index] | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
ArrowFunction |
(r) => r.key | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
ArrowFunction |
(acc, route) => {
acc[route.key] =
props.descriptors[route.key] || state.descriptors[route.key];
return acc;
} | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
ArrowFunction |
(acc, route) => {
acc[route.key] = route;
return acc;
} | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
ArrowFunction |
(route) => map[route.key] || route | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
ArrowFunction |
(key: string) => {
const descriptor = props.descriptors[key] || state.descriptors[key];
return descriptor ? descriptor.options.animationEnabled !== false : true;
} | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
ArrowFunction |
(key: string) => {
const descriptor = props.descriptors[key] || state.descriptors[key];
return descriptor.options.animationTypeForReplace ?? 'push';
} | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
ArrowFunction |
(r) => r.key === nextFocusedRoute.key | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
ArrowFunction |
(key) => key !== nextFocusedRoute.key | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
ArrowFunction |
(r) => r.key === previousFocusedRoute.key | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
ArrowFunction |
(key) => key !== previousFocusedRoute.key | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
ArrowFunction |
({ key }) =>
isAnimationEnabled(key)
? replacingRouteKeys.includes(key) || closingRouteKeys.includes(key)
: false | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
ArrowFunction |
(acc, route) => {
acc[route.key] =
props.descriptors[route.key] || state.descriptors[route.key];
return acc;
} | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
ArrowFunction |
({ route }: { route: Route<string> }) => {
const descriptor = this.state.descriptors[route.key];
if (descriptor) {
const { gestureEnabled, animationEnabled } = descriptor.options;
if (animationEnabled === false) {
// When animation is disabled, also disable gestures
// The gesture... | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
ArrowFunction |
({ route }: { route: Route<string> }) => {
const { closingRouteKeys, replacingRouteKeys } = this.state;
const routes = this.state.routes.filter(
(r) =>
r.key === route.key ||
(!closingRouteKeys.includes(r.key) &&
!replacingRouteKeys.includes(r.key))
);
const index = rou... | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
ArrowFunction |
(r) =>
r.key === route.key ||
(!closingRouteKeys.includes(r.key) &&
!replacingRouteKeys.includes(r.key)) | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
ArrowFunction |
(r) => r.key === route.key | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
ArrowFunction |
({ route }: { route: Route<string> }) => {
const descriptor =
this.state.descriptors[route.key] || this.props.descriptors[route.key];
if (!descriptor) {
return null;
}
const { navigation, getComponent } = descriptor;
const SceneComponent = getComponent();
return (
<SceneVie... | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
ArrowFunction |
(props: HeaderContainerProps) => {
return <HeaderContainer {...props} />;
} | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
ArrowFunction |
() => {
const { state, navigation } = this.props;
if (state.isTransitioning) {
navigation.dispatch(
StackActions.completeTransition({
key: navigation.state.key,
toChildKey: state.routes[state.index].key,
})
);
}
} | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
ArrowFunction |
({ route }: { route: Route<string> }) => {
const { state, navigation } = this.props;
const { closingRouteKeys, replacingRouteKeys } = this.state;
this.handleTransitionComplete();
if (
closingRouteKeys.some((key) => key === route.key) &&
replacingRouteKeys.every((key) => key !== route.key)... | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
ArrowFunction |
(key) => key === route.key | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
ArrowFunction |
(key) => key !== route.key | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
ArrowFunction |
(state) => ({
routes: state.replacingRouteKeys.length
? state.routes.filter(
(r) => !state.replacingRouteKeys.includes(r.key)
)
: state.routes,
openingRouteKeys: state.openingRouteKeys.filter(
(key) => key !== route.key
),
closingR... | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
ArrowFunction |
(r) => !state.replacingRouteKeys.includes(r.key) | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
ArrowFunction |
({ route }: { route: Route<string> }) => {
const { state, navigation } = this.props;
if (state.routes.some((r) => r.key === route.key)) {
// If a route exists in state, trigger a pop
// This will happen in when the route was closed from the card component
// e.g. When the close animation tri... | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
ArrowFunction |
(state) => ({
routes: state.routes.filter((r) => r.key !== route.key),
openingRouteKeys: state.openingRouteKeys.filter(
(key) => key !== route.key
),
closingRouteKeys: state.closingRouteKeys.filter(
(key) => key !== route.key
),
}) | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
ArrowFunction |
(r) => r.key !== route.key | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
ArrowFunction |
(
{ route }: { route: Route<string> },
closing: boolean
) => {
const { descriptors } = this.props;
const descriptor =
descriptors[route.key] || this.state.descriptors[route.key];
descriptor?.options.onTransitionStart?.({ closing });
} | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
ArrowFunction |
() => {
// Do nothing
} | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
TypeAliasDeclaration |
type Props = StackNavigationConfig & {
state: StackNavigationState;
navigation: StackNavigationHelpers;
descriptors: StackDescriptorMap;
screenProps: unknown;
}; | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
TypeAliasDeclaration |
type State = {
// Local copy of the routes which are actually rendered
routes: Route<string>[];
// Previous routes, to compare whether routes have changed or not
previousRoutes: Route<string>[];
// Previous descriptors, to compare whether descriptors have changed or not
previousDescriptors: StackDescriptor... | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
MethodDeclaration |
render() {
const {
state,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
navigation,
keyboardHandlingEnabled,
mode = 'card',
headerMode = mode === 'card' && Platform.OS === 'ios'
? 'float'
: 'screen',
// eslint-disable-next-line @typescript-e... | Igor-Felipy/Dev-Radar | smartPhone/node_modules/react-navigation-stack/src/vendor/views/Stack/StackView.tsx | TypeScript |
InterfaceDeclaration |
export interface ITerminalCustomWebSocketProviderOptions extends IBaseProviderOptions {
customWebsocketProvider: WebsocketProvider;
web3Version?: Web3Versions;
} | dmerrill6/terminal-test-react-app | node_modules/@terminal-packages/sdk/dist/providers/websockets/models/iterminal-custom-websocket-provider-options.d.ts | TypeScript |
InterfaceDeclaration | /** @public */
export interface ModelObserver<M extends Model = Model> extends ComponentObserver<M> {
modelWillAttachParent?(parent: Model, model: M): void;
modelDidAttachParent?(parent: Model, model: M): void;
modelWillDetachParent?(parent: Model, model: M): void;
modelDidDetachParent?(parent: Model, model:... | swimos/swim | swim-js/swim-toolkit/swim-ui/swim-model/src/main/model/ModelObserver.ts | TypeScript |
FunctionDeclaration |
function main_func() {
let a = 10;
function f() {
assert(a == 10);
print(a);
}
f();
} | SamuraiCrow/TypeScriptCompiler | tsc/test/tester/tests/00funcs_capture.ts | TypeScript |
FunctionDeclaration |
function f() {
assert(a == 10);
print(a);
} | SamuraiCrow/TypeScriptCompiler | tsc/test/tester/tests/00funcs_capture.ts | TypeScript |
FunctionDeclaration |
function main_func2() {
let a = 10;
let m = function () {
assert(a == 10);
print(a);
}
m();
} | SamuraiCrow/TypeScriptCompiler | tsc/test/tester/tests/00funcs_capture.ts | TypeScript |
FunctionDeclaration |
function main_func_in_object() {
let a = 10;
const s = {
in: 20,
f() {
assert(this.in == 20);
assert(a == 10);
print(this.in, a);
},
};
s.f();
} | SamuraiCrow/TypeScriptCompiler | tsc/test/tester/tests/00funcs_capture.ts | TypeScript |
FunctionDeclaration |
function main_func_in_object2(a?: number) {
const s = {
f() {
assert(a == 11);
print(a);
},
};
s.f();
} | SamuraiCrow/TypeScriptCompiler | tsc/test/tester/tests/00funcs_capture.ts | TypeScript |
FunctionDeclaration |
function main_func_in_object3(a: number | undefined) {
const s = {
f() {
assert(a == 11);
print(a);
},
};
s.f();
} | SamuraiCrow/TypeScriptCompiler | tsc/test/tester/tests/00funcs_capture.ts | TypeScript |
FunctionDeclaration |
function main_func_in_object4(a?: number | undefined) {
const s = {
f() {
assert(a == 11);
print(a);
},
};
s.f();
} | SamuraiCrow/TypeScriptCompiler | tsc/test/tester/tests/00funcs_capture.ts | TypeScript |
FunctionDeclaration |
function lambda(k: number) {
function inner() {
print("inner inside", k);
}
print("inner");
inner()
print("exit inner");
} | SamuraiCrow/TypeScriptCompiler | tsc/test/tester/tests/00funcs_capture.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.