type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ArrowFunction |
() => import("components/system/Files/FileEntry/RenameBox") | alphabreacher/wagmi-OS | components/system/Files/FileEntry/index.tsx | TypeScript |
ArrowFunction |
(
name: string,
fontSize: string,
fontFamily: string,
maxWidth: number
): string => {
const nonBreakingName = name.replace(/-/g, NON_BREAKING_HYPHEN);
const { lines } = getTextWrapData(
nonBreakingName,
fontSize,
fontFamily,
maxWidth
);
if (lines.length > 2) {
const ... | alphabreacher/wagmi-OS | components/system/Files/FileEntry/index.tsx | TypeScript |
ArrowFunction |
(iconEntry) => iconEntry !== SHORTCUT_ICON | alphabreacher/wagmi-OS | components/system/Files/FileEntry/index.tsx | TypeScript |
ArrowFunction |
(subIcon) => subIcon !== icon | alphabreacher/wagmi-OS | components/system/Files/FileEntry/index.tsx | TypeScript |
ArrowFunction |
async (fileDropName, data) => {
if (!focusedEntries.includes(fileName)) {
const uniqueName = await createPath(fileDropName, directory, data);
if (uniqueName) updateFolder(directory, uniqueName);
}
} | alphabreacher/wagmi-OS | components/system/Files/FileEntry/index.tsx | TypeScript |
ArrowFunction |
() =>
buttonRef.current?.parentElement?.classList.remove("focus-within") | alphabreacher/wagmi-OS | components/system/Files/FileEntry/index.tsx | TypeScript |
ArrowFunction |
() =>
buttonRef.current?.parentElement?.classList.add("focus-within") | alphabreacher/wagmi-OS | components/system/Files/FileEntry/index.tsx | TypeScript |
ArrowFunction |
() =>
truncateName(
name,
sizes.fileEntry.fontSize,
formats.systemFont,
sizes.fileEntry[
listView ? "maxListTextDisplayWidth" : "maxIconTextDisplayWidth"
]
) | alphabreacher/wagmi-OS | components/system/Files/FileEntry/index.tsx | TypeScript |
ArrowFunction |
async (): Promise<void> => {
if (!isLoadingFileManager && !isIconCached.current) {
if (icon.startsWith("blob:")) {
isIconCached.current = true;
const cachedIconPath = join(ICON_CACHE, `${path}.cache`);
if (
urlExt !== ".ico" &&
!url.startsWith(ICON_PATH)... | alphabreacher/wagmi-OS | components/system/Files/FileEntry/index.tsx | TypeScript |
ArrowFunction |
async (): Promise<void> => {
if (iconRef.current instanceof HTMLImageElement) {
const htmlToImage = await import("html-to-image");
const generatedIcon = await htmlToImage.toPng(iconRef.current);
cacheQueue.push(async () => {
const baseCachedP... | alphabreacher/wagmi-OS | components/system/Files/FileEntry/index.tsx | TypeScript |
ArrowFunction |
async () => {
const baseCachedPath = dirname(cachedIconPath);
await mkdirRecursive(baseCachedPath);
await writeFile(
cachedIconPath,
Buffer.from(
generatedIcon.replace("data:image/png;base64,", ""),
... | alphabreacher/wagmi-OS | components/system/Files/FileEntry/index.tsx | TypeScript |
ArrowFunction |
(info) => ({ ...info, icon: bufferToUrl(cachedIconData) }) | alphabreacher/wagmi-OS | components/system/Files/FileEntry/index.tsx | TypeScript |
ArrowFunction |
(): string => {
if (stats.isDirectory() && !MOUNTABLE_EXTENSIONS.has(extension)) {
return "";
}
if (isShortcut) {
if (comment) return comment;
if (url) {
if (url.startsWith("http:") || url.startsWith("https:")) return url;
return `Location: ${basename(url, extnam... | alphabreacher/wagmi-OS | components/system/Files/FileEntry/index.tsx | TypeScript |
ArrowFunction |
() => {
updateIcon();
} | alphabreacher/wagmi-OS | components/system/Files/FileEntry/index.tsx | TypeScript |
ArrowFunction |
() => {
if (buttonRef.current) {
const inFocusedEntries = focusedEntries.includes(fileName);
const inFocusing = focusing.includes(fileName);
const isFocused = inFocusedEntries || inFocusing;
if (inFocusedEntries && inFocusing) {
focusing.splice(focusing.indexOf(fileName), 1)... | alphabreacher/wagmi-OS | components/system/Files/FileEntry/index.tsx | TypeScript |
ArrowFunction |
() => {
if (
openInFileExplorer &&
fileManagerId &&
!MOUNTABLE_EXTENSIONS.has(urlExt)
) {
changeUrl(fileManagerId, url);
blurEntry();
} else if (openInFileExplorer && listView) {
setShowInFileManager((current... | alphabreacher/wagmi-OS | components/system/Files/FileEntry/index.tsx | TypeScript |
ArrowFunction |
(currentState) => !currentState | alphabreacher/wagmi-OS | components/system/Files/FileEntry/index.tsx | TypeScript |
ArrowFunction |
(entryIcon) => (
<Icon
key={entryIcon} | alphabreacher/wagmi-OS | components/system/Files/FileEntry/index.tsx | TypeScript |
TypeAliasDeclaration |
type FileEntryProps = {
fileActions: FileActions;
fileManagerId?: string;
fileManagerRef: React.MutableRefObject<HTMLOListElement | null>;
focusedEntries: string[];
focusFunctions: FocusEntryFunctions;
hideShortcutIcon?: boolean;
isLoadingFileManager: boolean;
name: string;
path: string;
... | alphabreacher/wagmi-OS | components/system/Files/FileEntry/index.tsx | TypeScript |
ArrowFunction |
async (uiState: UiState, holderState: HolderState): Promise<FhirConnection> => {
const state = base64url.encode(crypto.randomBytes(32));
const redirect_uri = window.location.origin + window.location.pathname + 'authorized.html';
const smartConfig = (await axios.get(uiState.fhirClient.server + '/.well-known... | Muflhi01/health-cards-tests | src/FhirConnector.ts | TypeScript |
ArrowFunction |
(resolve) => {
window.addEventListener("message", function onAuth({ data, source, origin }) {
if (origin !== window.location.origin)
return;
if (source !== authzWindow)
return;
const dataParsed = qs.parse(data);
if (dataParsed.stat... | Muflhi01/health-cards-tests | src/FhirConnector.ts | TypeScript |
InterfaceDeclaration |
export interface FhirConnection {
newSmartState: SmartState,
} | Muflhi01/health-cards-tests | src/FhirConnector.ts | TypeScript |
MethodDeclaration |
async telegramBotTest(this: ICredentialTestFunctions, credential: ICredentialsDecrypted): Promise<NodeCredentialTestResult> {
const credentials = credential.data;
const options = {
uri: `https://api.telegram.org/bot${credentials!.accessToken}/getMe`,
json: true,
};
try {
const response =... | Aarnab2/n8n | packages/nodes-base/nodes/Telegram/Telegram.node.ts | TypeScript |
ArrowFunction |
() => ({
getPathArray: jest.fn(() => mockPath.split("/")),
}) | alanwangvt/Farmbot-Web-App | frontend/farm_designer/map/layers/weeds/__tests__/weed_layer_test.tsx | TypeScript |
ArrowFunction |
() => mockPath.split("/") | alanwangvt/Farmbot-Web-App | frontend/farm_designer/map/layers/weeds/__tests__/weed_layer_test.tsx | TypeScript |
ArrowFunction |
() => {
const fakeProps = (): WeedLayerProps => ({
visible: true,
radiusVisible: true,
weeds: [fakeWeed()],
mapTransformProps: fakeMapTransformProps(),
hoveredPoint: undefined,
dispatch: jest.fn(),
currentPoint: undefined,
boxSelected: undefined,
groupSelected: [],
animate: fa... | alanwangvt/Farmbot-Web-App | frontend/farm_designer/map/layers/weeds/__tests__/weed_layer_test.tsx | TypeScript |
ArrowFunction |
(): WeedLayerProps => ({
visible: true,
radiusVisible: true,
weeds: [fakeWeed()],
mapTransformProps: fakeMapTransformProps(),
hoveredPoint: undefined,
dispatch: jest.fn(),
currentPoint: undefined,
boxSelected: undefined,
groupSelected: [],
animate: false,
interactions: true,... | alanwangvt/Farmbot-Web-App | frontend/farm_designer/map/layers/weeds/__tests__/weed_layer_test.tsx | TypeScript |
ArrowFunction |
() => {
const p = fakeProps();
p.interactions = false;
const wrapper = svgMount(<WeedLayer {...p} />);
const layer = wrapper.find("#weeds-layer");
expect(layer.find(GardenWeed).html()).toContain("r=\"100\"");
expect(layer.props().style).toEqual({ pointerEvents: "none" });
} | alanwangvt/Farmbot-Web-App | frontend/farm_designer/map/layers/weeds/__tests__/weed_layer_test.tsx | TypeScript |
ArrowFunction |
() => {
const p = fakeProps();
p.visible = false;
const wrapper = svgMount(<WeedLayer {...p} />);
const layer = wrapper.find("#weeds-layer");
expect(layer.find(GardenWeed).length).toEqual(0);
} | alanwangvt/Farmbot-Web-App | frontend/farm_designer/map/layers/weeds/__tests__/weed_layer_test.tsx | TypeScript |
ArrowFunction |
() => {
mockPath = Path.mock(Path.weeds());
const p = fakeProps();
p.interactions = true;
const wrapper = svgMount(<WeedLayer {...p} />);
const layer = wrapper.find("#weeds-layer");
expect(layer.props().style).toEqual({ cursor: "pointer" });
} | alanwangvt/Farmbot-Web-App | frontend/farm_designer/map/layers/weeds/__tests__/weed_layer_test.tsx | TypeScript |
ArrowFunction |
() => {
mockPath = Path.mock(Path.weeds());
const p = fakeProps();
const weed = fakeWeed();
p.weeds = [weed];
p.boxSelected = [weed.uuid];
const wrapper = svgMount(<WeedLayer {...p} />);
const layer = wrapper.find("#weeds-layer");
expect(layer.find(GardenWeed).props().selected).toBeTrut... | alanwangvt/Farmbot-Web-App | frontend/farm_designer/map/layers/weeds/__tests__/weed_layer_test.tsx | TypeScript |
ClassDeclaration |
@Injectable()
export class AppService {
getHello(): string {
console.log('HOLA');
return 'Hello World with NestJS LC!';
}
} | luiscasdel64/api-task | src/app.service.ts | TypeScript |
MethodDeclaration |
getHello(): string {
console.log('HOLA');
return 'Hello World with NestJS LC!';
} | luiscasdel64/api-task | src/app.service.ts | TypeScript |
FunctionDeclaration |
export function SessionFromJSON(json: any): Session {
return SessionFromJSONTyped(json, false)
} | apideck-libraries/node-sdk | src/gen/models/Session.ts | TypeScript |
FunctionDeclaration |
export function SessionFromJSONTyped(json: any, ignoreDiscriminator: boolean): Session {
if (json === undefined || json === null) {
return json
}
return {
consumer_metadata: !exists(json, 'consumer_metadata')
? undefined
: ConsumerMetadataFromJSON(json['consumer_metadata']),
custom_consum... | apideck-libraries/node-sdk | src/gen/models/Session.ts | TypeScript |
FunctionDeclaration |
export function SessionToJSON(value?: Session | null): any {
if (value === undefined) {
return undefined
}
if (value === null) {
return null
}
return {
consumer_metadata: ConsumerMetadataToJSON(value.consumer_metadata),
custom_consumer_settings: value.custom_consumer_settings,
redirect_ur... | apideck-libraries/node-sdk | src/gen/models/Session.ts | TypeScript |
InterfaceDeclaration | /**
*
* @export
* @interface Session
*/
export interface Session {
/**
*
* @type {ConsumerMetadata}
* @memberof Session
*/
consumer_metadata?: ConsumerMetadata
/**
* Custom consumer settings that are passed as part of the session.
* @type {{ [key: string]: object; }}
* @memberof Session
... | apideck-libraries/node-sdk | src/gen/models/Session.ts | TypeScript |
FunctionDeclaration | /**
* The `humanTime` utility converts a date to a localized, human-readable time-
* ago string.
*/
export default function humanTime(time: Date): string {
let d = dayjs(time);
const now = dayjs();
// To prevent showing things like "in a few seconds" due to small offsets
// between client and server time, w... | Heniisbaba/core | js/src/common/utils/humanTime.ts | TypeScript |
ArrowFunction |
(selector: string) => {
const el = this.shadowRoot!.querySelector(selector) as PolymerElement;
if (el) {
el.set('invalid', false);
}
} | unicef/etools-partnership-management | src_ts/components/app-modules/interventions/components/pd-termination.ts | TypeScript |
ArrowFunction |
(selector: string) => {
const el = this.shadowRoot!.querySelector(selector) as PolymerElement & {
validate(): boolean;
};
if (el && !el.validate()) {
isValid = false;
}
} | unicef/etools-partnership-management | src_ts/components/app-modules/interventions/components/pd-termination.ts | TypeScript |
ClassDeclaration | /**
* @polymer
* @customElement
* @appliesMixin EnvironmentFlagsMixin
*/
class PdTermination extends EnvironmentFlagsMixin(PolymerElement) {
static get template() {
return html`
${SharedStyles} ${gridLayoutStyles} ${requiredFieldStarredStyles}
<style>
:host {
/* host CSS */
... | unicef/etools-partnership-management | src_ts/components/app-modules/interventions/components/pd-termination.ts | TypeScript |
MethodDeclaration |
connectedCallback() {
super.connectedCallback();
(this.$.terminationDate as any).maxDate = this._getMaxDate();
} | unicef/etools-partnership-management | src_ts/components/app-modules/interventions/components/pd-termination.ts | TypeScript |
MethodDeclaration |
_getMaxDate() {
return moment(Date.now()).add(30, 'd').toDate();
} | unicef/etools-partnership-management | src_ts/components/app-modules/interventions/components/pd-termination.ts | TypeScript |
MethodDeclaration |
_handleDialogClosed() {
this.resetValidations();
} | unicef/etools-partnership-management | src_ts/components/app-modules/interventions/components/pd-termination.ts | TypeScript |
MethodDeclaration |
_triggerPdTermination() {
if (!this.validate()) {
return;
}
if (this.environmentFlags && !this.environmentFlags.prp_mode_off && this.environmentFlags.prp_server_on) {
this.set('warningOpened', true);
} else {
this._terminatePD();
}
} | unicef/etools-partnership-management | src_ts/components/app-modules/interventions/components/pd-termination.ts | TypeScript |
MethodDeclaration |
_terminationConfirmed(e: CustomEvent) {
if (e.detail.confirmed) {
this._terminatePD();
}
} | unicef/etools-partnership-management | src_ts/components/app-modules/interventions/components/pd-termination.ts | TypeScript |
MethodDeclaration |
_terminatePD() {
if (this.validate()) {
fireEvent(this.terminationElSource, 'terminate-pd', {
interventionId: this.interventionId,
terminationData: {
date: this.termination.date,
fileId: this.termination.attachment_notice
}
});
this.set('opened', false)... | unicef/etools-partnership-management | src_ts/components/app-modules/interventions/components/pd-termination.ts | TypeScript |
MethodDeclaration | // TODO: refactor validation at some point (common with ag add amendment dialog and more)
resetValidations() {
this._validationSelectors.forEach((selector: string) => {
const el = this.shadowRoot!.querySelector(selector) as PolymerElement;
if (el) {
el.set('invalid', false);
}
});
} | unicef/etools-partnership-management | src_ts/components/app-modules/interventions/components/pd-termination.ts | TypeScript |
MethodDeclaration | // TODO: refactor validation at some point (common with ag add amendment dialog and more)
validate() {
let isValid = true;
this._validationSelectors.forEach((selector: string) => {
const el = this.shadowRoot!.querySelector(selector) as PolymerElement & {
validate(): boolean;
};
if (el ... | unicef/etools-partnership-management | src_ts/components/app-modules/interventions/components/pd-termination.ts | TypeScript |
MethodDeclaration |
_uploadFinished(e: CustomEvent) {
if (e.detail.success) {
const uploadResponse = e.detail.success;
this.set('termination.attachment_notice', uploadResponse.id);
}
} | unicef/etools-partnership-management | src_ts/components/app-modules/interventions/components/pd-termination.ts | TypeScript |
ArrowFunction |
(props) => {
const actionRef = useRef<ActionType>();
const [editShow, seteditShow] = useState<boolean>(false)
const [pagesize, setpagesize] = useState<number>(10)
const [select, setselect] = useState<string>()
const confirm = (id: string) => {
let form = new FormData()
form.append('id', id)
delet... | MrChowjl/ddd | src/pages/Account/Adplan/components/plan/index.tsx | TypeScript |
ArrowFunction |
(id: string) => {
let form = new FormData()
form.append('id', id)
deleteCurrent(form).then(res => {
if (res.code === 1) {
message.success(res.msg)
actionRef.current?.reload()
}
})
} | MrChowjl/ddd | src/pages/Account/Adplan/components/plan/index.tsx | TypeScript |
ArrowFunction |
res => {
if (res.code === 1) {
message.success(res.msg)
actionRef.current?.reload()
}
} | MrChowjl/ddd | src/pages/Account/Adplan/components/plan/index.tsx | TypeScript |
ArrowFunction |
(r, re) => {
return (
<Switch checked={re.is_active === 1 ? true : false} onChange={() | MrChowjl/ddd | src/pages/Account/Adplan/components/plan/index.tsx | TypeScript |
ArrowFunction |
res => {
if (res.code === 1) {
message.success(res.msg)
actionRef.current?.reload()
}
} | MrChowjl/ddd | src/pages/Account/Adplan/components/plan/index.tsx | TypeScript |
ArrowFunction |
(_, item) => {
return <Badge status={status[item.status]} text={item.status} />;
} | MrChowjl/ddd | src/pages/Account/Adplan/components/plan/index.tsx | TypeScript |
ArrowFunction |
(text, record, _, action) => [
<Button type="primary" disabled={record?.status === 1 ? true : false | MrChowjl/ddd | src/pages/Account/Adplan/components/plan/index.tsx | TypeScript |
ArrowFunction |
() => actionRef.current?.reload() | MrChowjl/ddd | src/pages/Account/Adplan/components/plan/index.tsx | TypeScript |
EnumDeclaration |
enum status {
'待系统审核' = 'processing',
'待媒体审核' = 'processing',
'系统审核通过' = 'default',
'媒体审核通过' = 'default',
'系统审核失败' = 'error',
'媒体审核失败' = 'error',
'开启中' = 'success',
'已关闭' = 'default',
'已删除' = 'default'
} | MrChowjl/ddd | src/pages/Account/Adplan/components/plan/index.tsx | TypeScript |
TypeAliasDeclaration |
type GithubIssueItem = {
url: string;
id: number;
number: number;
title: string;
labels: {
name: string;
color: string;
}[];
state: string;
comments: number;
created_at: string;
updated_at: string;
closed_at?: string;
is_active?: number;
}; | MrChowjl/ddd | src/pages/Account/Adplan/components/plan/index.tsx | TypeScript |
MethodDeclaration |
async (
params: T & {
pageSize: number;
current: number;
},
sort,
filter,
) | MrChowjl/ddd | src/pages/Account/Adplan/components/plan/index.tsx | TypeScript |
MethodDeclaration |
seteditShow(true) | MrChowjl/ddd | src/pages/Account/Adplan/components/plan/index.tsx | TypeScript |
MethodDeclaration |
setselect('') | MrChowjl/ddd | src/pages/Account/Adplan/components/plan/index.tsx | TypeScript |
ArrowFunction |
() => {
page = new FrontEndPage();
} | RustyShackleforth/atomspace-explorer | e2e/app.e2e-spec.ts | TypeScript |
ArrowFunction |
async (generator: any) => {
consola.info(`Copying specified static contents`)
// generate 出力ディレクトリに options.api ディレクトリを作成
const distCopyPath = join(generator.distPath, options.api)
await fsExtra.mkdirp(distCopyPath).catch((err) => consola.error(err))
await fsExtra
.copy(options.dirpath, dis... | akiakishitai/vlife-blog | src/modules/copyToDist/index.ts | TypeScript |
ArrowFunction |
(err) => consola.error(err) | akiakishitai/vlife-blog | src/modules/copyToDist/index.ts | TypeScript |
ArrowFunction |
() =>
consola.success(`Copied from "${options.dirpath}" to "${distCopyPath}"`) | akiakishitai/vlife-blog | src/modules/copyToDist/index.ts | TypeScript |
InterfaceDeclaration |
export interface ModuleOptions {
/** API エンドポイント */
api: string
/** 提供するローカルディレクトリパス */
dirpath: string
} | akiakishitai/vlife-blog | src/modules/copyToDist/index.ts | TypeScript |
InterfaceDeclaration |
export interface UserPayload {
username: string,
email: string,
role: Role
} | thesamhurwitz/hoenn-auth | src/auth/session-payload.ts | TypeScript |
InterfaceDeclaration |
export interface SessionPayload {
ip?: string,
device?: IResult,
location?: string,
createdAt: Date,
lastAccess: Date,
expires: Date,
user: UserPayload
} | thesamhurwitz/hoenn-auth | src/auth/session-payload.ts | TypeScript |
ArrowFunction |
comment => ({
id: comment._id,
imageUrl: comment.imageUrl,
commentBy: comment.commentBy,
commentBody: comment.commentBody,
dateCreated: comment.dateCreated,
postId: comment.postId
}) | ani-abel/Blog-api | src/Comments/comments.service.ts | TypeScript |
ClassDeclaration |
export class CommentsService {
constructor(@InjectModel("Comment") private readonly commentsModel: Model<Comment>){ }
async addComment(postId: string, commentBy: string, commentBody: string, imageUrl?: string): Promise<any> {
const newComment = new this.commentsModel({ imageUrl, commentBy, commentBod... | ani-abel/Blog-api | src/Comments/comments.service.ts | TypeScript |
MethodDeclaration |
async addComment(postId: string, commentBy: string, commentBody: string, imageUrl?: string): Promise<any> {
const newComment = new this.commentsModel({ imageUrl, commentBy, commentBody, postId });
//Check to see if a similar image already exists
if(await this.commentsModel.exists({ commentBy, ... | ani-abel/Blog-api | src/Comments/comments.service.ts | TypeScript |
MethodDeclaration |
async getComments(postId: string): Promise<any>{
const comments = await this.commentsModel
.find({ postId })
.sort({ dateCreated: "desc" })
.limit(15)
.exec();
... | ani-abel/Blog-api | src/Comments/comments.service.ts | TypeScript |
MethodDeclaration |
async countComments(postId: string): Promise<{ total: number }>{
console.log(postId);
const total = await this.commentsModel
.countDocuments({ postId })
.exec();
return { total };
} | ani-abel/Blog-api | src/Comments/comments.service.ts | TypeScript |
ClassDeclaration |
export class NotFoundRequestError extends JWAError {
constructor(message: string, origin?: Error) {
super(
404,
`URL Not found. Details: ${message}`,
"URL_NOT_FOUND",
origin
);
}
} | jwa-lab/airlock | src/lib/errors/notFoundRequestError.ts | TypeScript |
ArrowFunction |
() => IftaFuelTaxesFilterInput | LeonardoRiosvlz/Shunchine | src/modules/ifta-fuel-taxes/graphql/dto/inputs/get-one-ifta-fuel-taxes.input.ts | TypeScript |
ClassDeclaration |
@InputType()
export class GetOneIftaFuelTaxesInput {
@Field(() => IftaFuelTaxesFilterInput, {nullable: true} ) where?: Filter<IftaFuelTaxesFilter>;
} | LeonardoRiosvlz/Shunchine | src/modules/ifta-fuel-taxes/graphql/dto/inputs/get-one-ifta-fuel-taxes.input.ts | TypeScript |
TypeAliasDeclaration |
export type ProgressLog = supiLogs.ProgressLog | packageRequesterLogs.ProgressLog | davej/supi | src/index.ts | TypeScript |
TypeAliasDeclaration |
export type Log = supiLogs.Log | packageRequesterLogs.Log | LifecycleLog | davej/supi | src/index.ts | TypeScript |
ClassDeclaration | /*
Generated class for the GoogleMapsProvider provider.
See https://angular.io/guide/dependency-injection for more info on providers
and Angular DI.
*/
@Injectable()
export class GoogleMapsProvider {
constructor(public http: Http) {
console.log('Hello GoogleMapsProvider Provider');
}
} | wandieinnocents/CitiMastaPro | src/providers/google-maps/google-maps.ts | TypeScript |
ArrowFunction |
async () => {
connection = new Connection();
await connection.connect();
await createTestSchema(connection);
} | panates/postgresql-client | test/B-connection/04-query.spec.ts | TypeScript |
ArrowFunction |
async () => {
await connection.close();
} | panates/postgresql-client | test/B-connection/04-query.spec.ts | TypeScript |
ArrowFunction |
() =>
connection.query(`select * from customers`, {fetchCount: -1}) | panates/postgresql-client | test/B-connection/04-query.spec.ts | TypeScript |
ArrowFunction |
() =>
connection.query(`select * from customers`, {fetchCount: 4294967296}) | panates/postgresql-client | test/B-connection/04-query.spec.ts | TypeScript |
ArrowFunction |
() => connection.query(`invalid sql`) | panates/postgresql-client | test/B-connection/04-query.spec.ts | TypeScript |
InterfaceDeclaration |
export interface Options {
main?: 'index.js',
outputDir?: boolean,
exports?: 'default' | 'import' | 'named',
camelCase?: camelcase.Options | false
} | fengxinming/rollup-plugin-combine | packages/rollup-plugin-combine/index.d.ts | TypeScript |
TypeAliasDeclaration |
type createPlugin = (opts?: Options) => Plugin; | fengxinming/rollup-plugin-combine | packages/rollup-plugin-combine/index.d.ts | TypeScript |
ArrowFunction |
({ children }) => {
const { questions } = useStoreState(state => state.questionStore)
const { addQuestion } = useStoreActions(action => action.questionStore)
const [question, setQuestion] = useState('')
const addQuestionHandler = () => {
const newQuestion: Question = {
id: v4(),
question
... | F34th3R/quizzapp | frontend/src/components/pages/Quiz/create/CreateQuestion.tsx | TypeScript |
ArrowFunction |
state => state.questionStore | F34th3R/quizzapp | frontend/src/components/pages/Quiz/create/CreateQuestion.tsx | TypeScript |
ArrowFunction |
action => action.questionStore | F34th3R/quizzapp | frontend/src/components/pages/Quiz/create/CreateQuestion.tsx | TypeScript |
ArrowFunction |
() => {
const newQuestion: Question = {
id: v4(),
question
}
/* addQuestion(newQuestion) */
setQuestion('')
} | F34th3R/quizzapp | frontend/src/components/pages/Quiz/create/CreateQuestion.tsx | TypeScript |
ArrowFunction |
({ id, question }) => (
<QuestionForm
key={id} | F34th3R/quizzapp | frontend/src/components/pages/Quiz/create/CreateQuestion.tsx | TypeScript |
FunctionDeclaration |
export async function amendVersion(): Promise<void> {
const tags = await gitReleaseTags('HEAD')
if (tags.length === 0) {
throw new InputError(
'The current commit does not appear to be a release commit.'
)
}
const staged = await gitListStagedFiles()
if (staged.length === 0) {
throw new Inp... | eemeli/version | src/version/amend-version.ts | TypeScript |
ClassDeclaration |
export class MapFactory extends ContractFactory {
constructor(signer?: Signer) {
super(_abi, _bytecode, signer);
}
deploy(overrides?: Overrides): Promise<Map> {
return super.deploy(overrides || {}) as Promise<Map>;
}
getDeployTransaction(overrides?: Overrides): TransactionRequest {
return super.... | ipatka/monster-encounter | src/types/MapFactory.ts | TypeScript |
MethodDeclaration |
deploy(overrides?: Overrides): Promise<Map> {
return super.deploy(overrides || {}) as Promise<Map>;
} | ipatka/monster-encounter | src/types/MapFactory.ts | TypeScript |
MethodDeclaration |
getDeployTransaction(overrides?: Overrides): TransactionRequest {
return super.getDeployTransaction(overrides || {});
} | ipatka/monster-encounter | src/types/MapFactory.ts | TypeScript |
MethodDeclaration |
attach(address: string): Map {
return super.attach(address) as Map;
} | ipatka/monster-encounter | src/types/MapFactory.ts | TypeScript |
MethodDeclaration |
connect(signer: Signer): MapFactory {
return super.connect(signer) as MapFactory;
} | ipatka/monster-encounter | src/types/MapFactory.ts | TypeScript |
MethodDeclaration |
static connect(address: string, signerOrProvider: Signer | Provider): Map {
return new Contract(address, _abi, signerOrProvider) as Map;
} | ipatka/monster-encounter | src/types/MapFactory.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.