type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ArrowFunction |
(actionType: GistActionType) => {
this.setState({ actionType });
} | FAWLKTZ/fiddle | src/renderer/components/commands-action-button.tsx | TypeScript |
ArrowFunction |
(toast: IToastProps) => {
this.toaster.show(toast);
} | FAWLKTZ/fiddle | src/renderer/components/commands-action-button.tsx | TypeScript |
ArrowFunction |
(values: EditorValues) => {
return {
[INDEX_HTML_NAME]: {
content: values.html || EMPTY_EDITOR_CONTENT.html,
},
[MAIN_JS_NAME]: {
content: values.main || EMPTY_EDITOR_CONTENT.js,
},
[RENDERER_JS_NAME]: {
content: values.renderer || EMPTY_EDITOR_CONTENT.js,
... | FAWLKTZ/fiddle | src/renderer/components/commands-action-button.tsx | TypeScript |
InterfaceDeclaration |
export interface GistActionButtonProps {
appState: AppState;
} | FAWLKTZ/fiddle | src/renderer/components/commands-action-button.tsx | TypeScript |
InterfaceDeclaration |
interface IGistActionButtonState {
readonly isUpdating: boolean;
readonly isDeleting: boolean;
readonly actionType: GistActionType;
} | FAWLKTZ/fiddle | src/renderer/components/commands-action-button.tsx | TypeScript |
MethodDeclaration |
public componentDidMount() {
ipcRendererManager.on(IpcEvents.FS_SAVE_FIDDLE_GIST, this.handleClick);
} | FAWLKTZ/fiddle | src/renderer/components/commands-action-button.tsx | TypeScript |
MethodDeclaration |
public componentWillUnmount() {
ipcRendererManager.off(IpcEvents.FS_SAVE_FIDDLE_GIST, this.handleClick);
} | FAWLKTZ/fiddle | src/renderer/components/commands-action-button.tsx | TypeScript |
MethodDeclaration | /**
* When the user clicks the publish button, we either show the
* authentication dialog or publish right away.
*
* If we're showing the authentication dialog, we wait for it
* to be closed again (or a GitHub token to show up) before
* we publish
*
* @returns {Promise<void>}
* @memberof Gist... | FAWLKTZ/fiddle | src/renderer/components/commands-action-button.tsx | TypeScript |
MethodDeclaration |
public async getFiddleDescriptionFromUser(): Promise<string | null> {
const { appState } = this.props;
// Reset potentially non-null last description.
appState.genericDialogLastInput = null;
appState.setGenericDialogOptions({
type: GenericDialogType.confirm,
label: 'Please provide a brief... | FAWLKTZ/fiddle | src/renderer/components/commands-action-button.tsx | TypeScript |
MethodDeclaration |
private async publishGist(description: string) {
const { appState } = this.props;
const octo = await getOctokit(this.props.appState);
const { gitHubPublishAsPublic } = this.props.appState;
const options = { includeDependencies: true, includeElectron: true };
const values = await window.ElectronFid... | FAWLKTZ/fiddle | src/renderer/components/commands-action-button.tsx | TypeScript |
MethodDeclaration | /**
* Publish a new GitHub gist.
*/
public async handlePublish() {
const { appState } = this.props;
appState.activeGistAction = GistActionState.publishing;
const description = await this.getFiddleDescriptionFromUser();
if (description) {
await this.publishGist(description);
appState.... | FAWLKTZ/fiddle | src/renderer/components/commands-action-button.tsx | TypeScript |
MethodDeclaration | /**
* Update an existing GitHub gist.
*/
public async handleUpdate() {
const { appState } = this.props;
const octo = await getOctokit(this.props.appState);
const options = { includeDependencies: true, includeElectron: true };
const values = await window.ElectronFiddle.app.getEditorValues(options);... | FAWLKTZ/fiddle | src/renderer/components/commands-action-button.tsx | TypeScript |
MethodDeclaration | /**
* Delete an existing GitHub gist.
*/
public async handleDelete() {
const { appState } = this.props;
const octo = await getOctokit(this.props.appState);
appState.activeGistAction = GistActionState.deleting;
try {
const gist = await octo.gists.delete({
gist_id: appState.gistId!,
... | FAWLKTZ/fiddle | src/renderer/components/commands-action-button.tsx | TypeScript |
MethodDeclaration | /**
* Connect with GitHub, perform a publish/update/delete action,
* and update all related properties in the app state.
*/
public async performGistAction(): Promise<void> {
const { gistId } = this.props.appState;
const { actionType } = this.state;
if (gistId) {
switch (actionType) {
... | FAWLKTZ/fiddle | src/renderer/components/commands-action-button.tsx | TypeScript |
MethodDeclaration | /**
* Publish fiddles as private.
*
* @memberof GistActionButton
*/
public setPrivate() {
this.setPrivacy(false);
} | FAWLKTZ/fiddle | src/renderer/components/commands-action-button.tsx | TypeScript |
MethodDeclaration | /**
* Publish fiddles as public.
*
* @memberof GistActionButton
*/
public setPublic() {
this.setPrivacy(true);
} | FAWLKTZ/fiddle | src/renderer/components/commands-action-button.tsx | TypeScript |
MethodDeclaration |
public render() {
const { gistId, activeGistAction } = this.props.appState;
const { actionType } = this.state;
const getTextForButton = () => {
let text;
if (gistId) {
text = actionType;
} else if (activeGistAction === GistActionState.updating) {
text = 'Updating...';
... | FAWLKTZ/fiddle | src/renderer/components/commands-action-button.tsx | TypeScript |
MethodDeclaration |
getActionIcon() | FAWLKTZ/fiddle | src/renderer/components/commands-action-button.tsx | TypeScript |
MethodDeclaration |
getTextForButton() | FAWLKTZ/fiddle | src/renderer/components/commands-action-button.tsx | TypeScript |
ClassDeclaration |
export default class NewExpression extends NodeBase {
type: NodeType.NewExpression;
callee: ExpressionNode;
arguments: ExpressionNode[];
private callOptions: CallOptions;
hasEffects(options: ExecutionPathOptions): boolean {
for (const argument of this.arguments) {
if (argument.hasEffects(options)) return t... | GoJetty/rollup | src/ast/nodes/NewExpression.ts | TypeScript |
MethodDeclaration |
hasEffects(options: ExecutionPathOptions): boolean {
for (const argument of this.arguments) {
if (argument.hasEffects(options)) return true;
}
return this.callee.hasEffectsWhenCalledAtPath(
[],
this.callOptions,
options.getHasEffectsWhenCalledOptions()
);
} | GoJetty/rollup | src/ast/nodes/NewExpression.ts | TypeScript |
MethodDeclaration |
hasEffectsWhenAccessedAtPath(path: ObjectPath, _options: ExecutionPathOptions) {
return path.length > 1;
} | GoJetty/rollup | src/ast/nodes/NewExpression.ts | TypeScript |
MethodDeclaration |
initialise() {
this.included = false;
this.callOptions = CallOptions.create({
withNew: true,
args: this.arguments,
callIdentifier: this
});
} | GoJetty/rollup | src/ast/nodes/NewExpression.ts | TypeScript |
ArrowFunction |
({ name, schemaGroup, optionIndexes, selected, matchesFilter, onSelect, renderContent }): React.ReactElement => {
const hasNestedItems = hasSchemaGroupNestedItems(schemaGroup, optionIndexes);
return (
<div
className={classNames({
"jsonschema-inspector-item": true,
... | CarstenWickner/react-jsonschema-inspector | src/component/InspectorItem.tsx | TypeScript |
MethodDeclaration |
classNames({
"jsonschema-inspector-item": true,
"has-nested-items": hasNestedItems,
selected,
"matching-filter": matchesFilter,
"not-matching-filter": isDefined | CarstenWickner/react-jsonschema-inspector | src/component/InspectorItem.tsx | TypeScript |
ClassDeclaration |
export class UpdateAgentDto extends PartialType(CreateAgentDto) {} | SomphorsMB/find-dream-home-backend | src/agent/dto/update-agent.dto.ts | TypeScript |
InterfaceDeclaration | /**
* {@docCategory DetailsList}
*/
export interface IDetailsColumnProps extends React.ClassAttributes<DetailsColumnBase> {
/**
* The theme object to respect during render.
*/
theme?: ITheme;
/**
* The component styles to respect during render.
*/
styles?: IStyleFunctionOrObject<ID... | GhostMachineSoftware/SPFx_GetListItems | node_modules/office-ui-fabric-react/lib-amd/components/DetailsList/DetailsColumn.types.d.ts | TypeScript |
InterfaceDeclaration | /**
* {@docCategory DetailsList}
*/
export interface IDetailsColumnStyles {
/**
* Styleable root region.
*/
root: IStyle;
/**
* Styleable resize glyph region.
*/
gripperBarVerticalStyle: IStyle;
/**
* Styleable cell tooltip region.
*/
cellTooltip: IStyle;
/**
... | GhostMachineSoftware/SPFx_GetListItems | node_modules/office-ui-fabric-react/lib-amd/components/DetailsList/DetailsColumn.types.d.ts | TypeScript |
TypeAliasDeclaration | /**
* {@docCategory DetailsList}
*/
export declare type IDetailsColumnStyleProps = Required<Pick<IDetailsColumnProps, 'theme' | 'cellStyleProps'>> & {
/**
* Classname to provide for header region.
*/
headerClassName?: string;
/**
* Whether or not the column is actionable.
*/
isActi... | GhostMachineSoftware/SPFx_GetListItems | node_modules/office-ui-fabric-react/lib-amd/components/DetailsList/DetailsColumn.types.d.ts | TypeScript |
ClassDeclaration | // @FIXME ideally we want to update Item to be an abstract class
// so we don't have to typecast later on
// but unfortunately the specification/Goblin does not allow us
export class UpdateableItem extends Item {
protected minQuality = 0;
protected maxQuality = 50;
protected sellInLimit = 0; // @FIXME think of be... | timbakkum/GildedRose-TypeScript-Refactor | TypeScript/app/item/updateable-item.ts | TypeScript |
MethodDeclaration |
handleUpdate(): Item {
return this as Item;
} | timbakkum/GildedRose-TypeScript-Refactor | TypeScript/app/item/updateable-item.ts | TypeScript |
MethodDeclaration |
protected decreaseSellIn() {
this.sellIn = this.sellIn - 1;
} | timbakkum/GildedRose-TypeScript-Refactor | TypeScript/app/item/updateable-item.ts | TypeScript |
ArrowFunction |
(evt: any) => {
log.info("terminating on " + evt);
services.DATA.kill(evt); // Prozess wird automatisch beendet?
services.db.mongo.close().then((mesg) => {
log.info(mesg);
LoggerService.shutdown();
process.exit(0);
});
} | hb42/farc-server | src/server.ts | TypeScript |
ArrowFunction |
(mesg) => {
log.info(mesg);
LoggerService.shutdown();
process.exit(0);
} | hb42/farc-server | src/server.ts | TypeScript |
FunctionDeclaration |
export function Content() {
const {movies, handleClickButton, selectedGenre} = useMovies();
return (
<div className="container">
<header>
<span className="category">Categoria:<span> {selectedGenre.title}</span></span>
</header>
<main>
<div className="movies-list">... | Nikholau/componentizando-aplicacao | src/components/Content.tsx | TypeScript |
ArrowFunction |
movie => (
<MovieCard key = {movie.imdbID} | Nikholau/componentizando-aplicacao | src/components/Content.tsx | TypeScript |
ClassDeclaration |
@Controller('bookings')
export class BookingsController {
constructor(private readonly bookingService: BookingsService) {}
@Get()
async index() {}
@Post()
create(@Body() createBookingDto: CreateBookingDto) {
return this.bookingService.create(createBookingDto)
}
} | dliluashvili/booking-app | src/bookings/bookings.controller.ts | TypeScript |
MethodDeclaration |
@Get()
async index() {} | dliluashvili/booking-app | src/bookings/bookings.controller.ts | TypeScript |
MethodDeclaration |
@Post()
create(@Body() createBookingDto: CreateBookingDto) {
return this.bookingService.create(createBookingDto)
} | dliluashvili/booking-app | src/bookings/bookings.controller.ts | TypeScript |
FunctionDeclaration |
export function TaskList() {
const [tasks, setTasks] = useState<Task[]>([]);
const [newTaskTitle, setNewTaskTitle] = useState("");
function handleCreateNewTask() {
// Crie uma nova task com um id random, não permita criar caso o título seja vazio.
newTaskTitle &&
setTasks([
...tasks,
... | raihard/ignite-desafio-todo | src/components/TaskList.tsx | TypeScript |
FunctionDeclaration |
function handleCreateNewTask() {
// Crie uma nova task com um id random, não permita criar caso o título seja vazio.
newTaskTitle &&
setTasks([
...tasks,
{
id: new Date().getTime(),
isComplete: false,
title: newTaskTitle,
},
]);
} | raihard/ignite-desafio-todo | src/components/TaskList.tsx | TypeScript |
FunctionDeclaration |
function handleToggleTaskCompletion(id: number) {
// Altere entre `true` ou `false` o campo `isComplete` de uma task com dado ID
const tasksupdate = [...tasks];
const index = tasks.findIndex((task) => task.id === id);
tasksupdate[index].isComplete = !tasks[index].isComplete;
setTasks(tasksupdate);
... | raihard/ignite-desafio-todo | src/components/TaskList.tsx | TypeScript |
FunctionDeclaration |
function handleRemoveTask(id: number) {
// Remova uma task da listagem pelo ID
let tasksupdate = [...tasks];
const index = tasksupdate.findIndex((task) => task.id === id);
tasksupdate.splice(index, 1);
setTasks(tasksupdate);
} | raihard/ignite-desafio-todo | src/components/TaskList.tsx | TypeScript |
ArrowFunction |
(task) => task.id === id | raihard/ignite-desafio-todo | src/components/TaskList.tsx | TypeScript |
ArrowFunction |
(task) => (
<li key={task.id}>
<div
className | raihard/ignite-desafio-todo | src/components/TaskList.tsx | TypeScript |
InterfaceDeclaration |
interface Task {
id: number;
title: string;
isComplete: boolean;
} | raihard/ignite-desafio-todo | src/components/TaskList.tsx | TypeScript |
ArrowFunction |
() => {
beforeAll(() => {
fetchMock.enableMocks();
});
afterAll(() => {
fetchMock.disableMocks();
});
beforeEach(() => {
mockSubmitData = { ...MOCK_FORM_DATA };
mutationMock = mockUpdateExperimentAudienceMutation(
{ ...mockSubmitData, id: experiment.id },
{},
);
});
it(... | Exhorder6/experimenter | app/experimenter/nimbus-ui/src/components/PageEditAudience/index.test.tsx | TypeScript |
ArrowFunction |
() => {
fetchMock.enableMocks();
} | Exhorder6/experimenter | app/experimenter/nimbus-ui/src/components/PageEditAudience/index.test.tsx | TypeScript |
ArrowFunction |
() => {
fetchMock.disableMocks();
} | Exhorder6/experimenter | app/experimenter/nimbus-ui/src/components/PageEditAudience/index.test.tsx | TypeScript |
ArrowFunction |
() => {
mockSubmitData = { ...MOCK_FORM_DATA };
mutationMock = mockUpdateExperimentAudienceMutation(
{ ...mockSubmitData, id: experiment.id },
{},
);
} | Exhorder6/experimenter | app/experimenter/nimbus-ui/src/components/PageEditAudience/index.test.tsx | TypeScript |
ArrowFunction |
async () => {
render(<Subject />);
await waitFor(() => {
expect(screen.queryByTestId("PageEditAudience")).toBeInTheDocument();
});
} | Exhorder6/experimenter | app/experimenter/nimbus-ui/src/components/PageEditAudience/index.test.tsx | TypeScript |
ArrowFunction |
() => {
expect(screen.queryByTestId("PageEditAudience")).toBeInTheDocument();
} | Exhorder6/experimenter | app/experimenter/nimbus-ui/src/components/PageEditAudience/index.test.tsx | TypeScript |
ArrowFunction |
async () => {
render(<Subject mocks={[mock, mutationMock]} />);
await screen.findByTestId("PageEditAudience");
await act(async () => void fireEvent.click(screen.getByTestId("next")));
expect(mockSubmit).toHaveBeenCalled();
expect(navigate).toHaveBeenCalledWith("../request-review");
} | Exhorder6/experimenter | app/experimenter/nimbus-ui/src/components/PageEditAudience/index.test.tsx | TypeScript |
ArrowFunction |
async () => void fireEvent.click(screen.getByTestId("next")) | Exhorder6/experimenter | app/experimenter/nimbus-ui/src/components/PageEditAudience/index.test.tsx | TypeScript |
ArrowFunction |
async () => {
render(<Subject mocks={[mock, mutationMock]} />);
await screen.findByTestId("PageEditAudience");
await act(async () => void fireEvent.click(screen.getByTestId("submit")));
expect(mockSubmit).toHaveBeenCalled();
} | Exhorder6/experimenter | app/experimenter/nimbus-ui/src/components/PageEditAudience/index.test.tsx | TypeScript |
ArrowFunction |
async () => void fireEvent.click(screen.getByTestId("submit")) | Exhorder6/experimenter | app/experimenter/nimbus-ui/src/components/PageEditAudience/index.test.tsx | TypeScript |
ArrowFunction |
async () => {
const expectedErrors = {
channel: { message: "this is garbage" },
};
mutationMock.result.data.updateExperiment.message = expectedErrors;
render(<Subject mocks={[mock, mutationMock]} />);
let submitButton: HTMLButtonElement;
await waitFor(() => {
submitButton = screen.g... | Exhorder6/experimenter | app/experimenter/nimbus-ui/src/components/PageEditAudience/index.test.tsx | TypeScript |
ArrowFunction |
() => {
submitButton = screen.getByTestId("submit") as HTMLButtonElement;
} | Exhorder6/experimenter | app/experimenter/nimbus-ui/src/components/PageEditAudience/index.test.tsx | TypeScript |
ArrowFunction |
async () => {
fireEvent.click(submitButton);
} | Exhorder6/experimenter | app/experimenter/nimbus-ui/src/components/PageEditAudience/index.test.tsx | TypeScript |
ArrowFunction |
async () => {
// @ts-ignore - intentionally breaking this type for error handling
delete mutationMock.result.data.updateExperiment;
render(<Subject mocks={[mock, mutationMock]} />);
let submitButton: HTMLButtonElement;
await waitFor(() => {
submitButton = screen.getByTestId("submit") as HTMLB... | Exhorder6/experimenter | app/experimenter/nimbus-ui/src/components/PageEditAudience/index.test.tsx | TypeScript |
ArrowFunction |
({
mocks = [mock],
}: {
mocks?: MockedResponse<Record<string, any>>[];
}) => {
return (
<RouterSlugProvider {...{ mocks }}>
<PageEditAudience />
</RouterSlugProvider>
);
} | Exhorder6/experimenter | app/experimenter/nimbus-ui/src/components/PageEditAudience/index.test.tsx | TypeScript |
ArrowFunction |
() => ({
...(jest.requireActual("@reach/router") as any),
navigate: jest.fn(),
}) | Exhorder6/experimenter | app/experimenter/nimbus-ui/src/components/PageEditAudience/index.test.tsx | TypeScript |
ArrowFunction |
() => ({
__esModule: true,
default: (props: React.ComponentProps<typeof FormAudience>) => {
const handleSubmit = (ev: React.FormEvent) => {
ev.preventDefault();
mockSubmit();
props.onSubmit(mockSubmitData, false);
};
const handleNext = (ev: React.FormEvent) => {
ev.preventDefaul... | Exhorder6/experimenter | app/experimenter/nimbus-ui/src/components/PageEditAudience/index.test.tsx | TypeScript |
ArrowFunction |
(props: React.ComponentProps<typeof FormAudience>) => {
const handleSubmit = (ev: React.FormEvent) => {
ev.preventDefault();
mockSubmit();
props.onSubmit(mockSubmitData, false);
};
const handleNext = (ev: React.FormEvent) => {
ev.preventDefault();
mockSubmit();
props.onS... | Exhorder6/experimenter | app/experimenter/nimbus-ui/src/components/PageEditAudience/index.test.tsx | TypeScript |
ArrowFunction |
(ev: React.FormEvent) => {
ev.preventDefault();
mockSubmit();
props.onSubmit(mockSubmitData, false);
} | Exhorder6/experimenter | app/experimenter/nimbus-ui/src/components/PageEditAudience/index.test.tsx | TypeScript |
ArrowFunction |
(ev: React.FormEvent) => {
ev.preventDefault();
mockSubmit();
props.onSubmit(mockSubmitData, true);
} | Exhorder6/experimenter | app/experimenter/nimbus-ui/src/components/PageEditAudience/index.test.tsx | TypeScript |
ArrowFunction |
(
input: Partial<ExperimentInput>,
{
message = "success",
}: {
message?: string | Record<string, any>;
},
) => {
const updateExperiment: updateExperiment_updateExperiment = {
message,
};
return {
request: {
query: UPDATE_EXPERIMENT_MUTATION,
variables: {
input,
... | Exhorder6/experimenter | app/experimenter/nimbus-ui/src/components/PageEditAudience/index.test.tsx | TypeScript |
ArrowFunction |
(): void => {
const registry = new TypeRegistry();
const a = [new U32(registry, 123), new U32(registry, 456), new U32(registry, 789)];
it('returns false when second param is a non-array', (): void => {
expect(
compareArray(a, 123)
).toBe(false);
});
it('compares array of codec agains primitiv... | alfredgit220/darwinia-apps | packages/types/src/codec/utils/compareArray.spec.ts | TypeScript |
ArrowFunction |
(): void => {
expect(
compareArray(a, 123)
).toBe(false);
} | alfredgit220/darwinia-apps | packages/types/src/codec/utils/compareArray.spec.ts | TypeScript |
ArrowFunction |
(): void => {
expect(
compareArray(a, [123, 456, 789])
).toBe(true);
} | alfredgit220/darwinia-apps | packages/types/src/codec/utils/compareArray.spec.ts | TypeScript |
ArrowFunction |
(): void => {
expect(
compareArray(a, [new U32(registry, 123), new U32(registry, 456), new U32(registry, 789)])
).toBe(true);
} | alfredgit220/darwinia-apps | packages/types/src/codec/utils/compareArray.spec.ts | TypeScript |
ArrowFunction |
(): void => {
expect(
compareArray(
[123, 456], [123, 456]
)
).toBe(true);
} | alfredgit220/darwinia-apps | packages/types/src/codec/utils/compareArray.spec.ts | TypeScript |
ArrowFunction |
(): void => {
expect(
compareArray(a, [123])
).toBe(false);
} | alfredgit220/darwinia-apps | packages/types/src/codec/utils/compareArray.spec.ts | TypeScript |
ArrowFunction |
(): void => {
expect(
compareArray(a, [123, 456, 999])
).toBe(false);
} | alfredgit220/darwinia-apps | packages/types/src/codec/utils/compareArray.spec.ts | TypeScript |
ArrowFunction |
(name, scene) => {
return () => new VRDeviceOrientationFreeCamera(name, Vector3.Zero(), scene);
} | 10088/Babylon.js | src/Cameras/VR/vrDeviceOrientationFreeCamera.ts | TypeScript |
ArrowFunction |
() => new VRDeviceOrientationFreeCamera(name, Vector3.Zero(), scene) | 10088/Babylon.js | src/Cameras/VR/vrDeviceOrientationFreeCamera.ts | TypeScript |
ClassDeclaration | /**
* Camera used to simulate VR rendering (based on FreeCamera)
* @see https://doc.babylonjs.com/babylon101/cameras#vr-device-orientation-cameras
*/
export class VRDeviceOrientationFreeCamera extends DeviceOrientationCamera {
/**
* Creates a new VRDeviceOrientationFreeCamera
* @param name defi... | 10088/Babylon.js | src/Cameras/VR/vrDeviceOrientationFreeCamera.ts | TypeScript |
MethodDeclaration | /**
* Gets camera class name
* @returns VRDeviceOrientationFreeCamera
*/
public getClassName(): string {
return "VRDeviceOrientationFreeCamera";
} | 10088/Babylon.js | src/Cameras/VR/vrDeviceOrientationFreeCamera.ts | TypeScript |
ArrowFunction |
async () => {
resetCleanupScheduleForTests()
// Unfortunately, Jest fake timers don't mock out Date.now, so we fake
// that out in parallel to Jest useFakeTimers
let fakeNow = Date.now()
jest.useFakeTimers()
jest.spyOn(Date, "now").mockImplementation(() => fakeNow)
const store = mobx.obse... | 1mike12/mobx | packages/mobx-react-lite/__tests__/strictAndConcurrentModeUsingTimers.test.tsx | TypeScript |
ArrowFunction |
() => fakeNow | 1mike12/mobx | packages/mobx-react-lite/__tests__/strictAndConcurrentModeUsingTimers.test.tsx | TypeScript |
ArrowFunction |
() => (count1IsObserved = true) | 1mike12/mobx | packages/mobx-react-lite/__tests__/strictAndConcurrentModeUsingTimers.test.tsx | TypeScript |
ArrowFunction |
() => (count1IsObserved = false) | 1mike12/mobx | packages/mobx-react-lite/__tests__/strictAndConcurrentModeUsingTimers.test.tsx | TypeScript |
ArrowFunction |
() => (count2IsObserved = true) | 1mike12/mobx | packages/mobx-react-lite/__tests__/strictAndConcurrentModeUsingTimers.test.tsx | TypeScript |
ArrowFunction |
() => (count2IsObserved = false) | 1mike12/mobx | packages/mobx-react-lite/__tests__/strictAndConcurrentModeUsingTimers.test.tsx | TypeScript |
ArrowFunction |
() => useObserver(() => <div>{store.count1}</div>) | 1mike12/mobx | packages/mobx-react-lite/__tests__/strictAndConcurrentModeUsingTimers.test.tsx | TypeScript |
ArrowFunction |
() => <div>{store.count1}</div>) | 1mike12/mobx | packages/mobx-react-lite/__tests__/strictAndConcurrentModeUsingTimers.test.tsx | TypeScript |
ArrowFunction |
() => useObserver(() => <div>{store.count2}</div>) | 1mike12/mobx | packages/mobx-react-lite/__tests__/strictAndConcurrentModeUsingTimers.test.tsx | TypeScript |
ArrowFunction |
() => <div>{store.count2}</div>) | 1mike12/mobx | packages/mobx-react-lite/__tests__/strictAndConcurrentModeUsingTimers.test.tsx | TypeScript |
ArrowFunction |
() => {
// If we're not careful with timings, it's possible to get the
// following scenario:
// 1. Component instance A is being created; it renders, we put its reaction R1 into the cleanup list
// 2. Strict/Concurrent mode causes that render to be thrown away
// 3. Component instance A is being c... | 1mike12/mobx | packages/mobx-react-lite/__tests__/strictAndConcurrentModeUsingTimers.test.tsx | TypeScript |
ArrowFunction |
() => (countIsObserved = true) | 1mike12/mobx | packages/mobx-react-lite/__tests__/strictAndConcurrentModeUsingTimers.test.tsx | TypeScript |
ArrowFunction |
() => (countIsObserved = false) | 1mike12/mobx | packages/mobx-react-lite/__tests__/strictAndConcurrentModeUsingTimers.test.tsx | TypeScript |
ArrowFunction |
() => useObserver(() => <div>{store.count}</div>) | 1mike12/mobx | packages/mobx-react-lite/__tests__/strictAndConcurrentModeUsingTimers.test.tsx | TypeScript |
ArrowFunction |
() => <div>{store.count}</div>) | 1mike12/mobx | packages/mobx-react-lite/__tests__/strictAndConcurrentModeUsingTimers.test.tsx | TypeScript |
ArrowFunction |
() => {
// no-op, but triggers effect flushing
} | 1mike12/mobx | packages/mobx-react-lite/__tests__/strictAndConcurrentModeUsingTimers.test.tsx | TypeScript |
ArrowFunction |
() => {
// There _may_ be very strange cases where the reaction gets tidied up
// but is actually still needed. This _really_ shouldn't happen.
// e.g. if we're using Suspense and the component starts to render,
// but then gets paused for 60 seconds, and then comes back to life.
// With the imple... | 1mike12/mobx | packages/mobx-react-lite/__tests__/strictAndConcurrentModeUsingTimers.test.tsx | TypeScript |
ClassDeclaration |
class DeleteUserUseCase {
constructor(private userRepository: IUserRepository) {}
async execute(id: number) {
await this.userRepository.delete(id);
}
} | RobsonCrLira/crud-aws | src/useCase/DeleteUser/DeleteUserUseCase.ts | TypeScript |
MethodDeclaration |
async execute(id: number) {
await this.userRepository.delete(id);
} | RobsonCrLira/crud-aws | src/useCase/DeleteUser/DeleteUserUseCase.ts | TypeScript |
ArrowFunction |
async (name: string): Promise<string> => {
log.debug(`ssm.getParameter: name: ${name}`);
const result = await ssm
.getParameter({
Name: `/iidx-routine/production/${name}`,
WithDecryption: true,
})
.promise();
if (result.Parameter == undefined || result.Parameter.Value == undefined) {
... | shuymn/iidx-routine | src/lib/secrets.ts | TypeScript |
ArrowFunction |
(): Promise<string> => getParameter("konami-id") | shuymn/iidx-routine | src/lib/secrets.ts | TypeScript |
ArrowFunction |
(): Promise<string> => getParameter("konami-password") | shuymn/iidx-routine | src/lib/secrets.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.