type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ArrowFunction |
(item: UploadXHRArgs) => {
alert(JSON.stringify(item))
// 构建一个 FormData 对象,用于存储文件或其他参数
const formData = new FormData();
// tslint:disable-next-line:no-any
formData.append('file', item.file as any);
formData.append('id', '1000');
formData.append('key', item.name);
formData.append('token'... | doordie2/my-project | src/app/routes/friendCircle/friendCircle/friendCircle.component.ts | TypeScript |
ArrowFunction |
()=>{
} | doordie2/my-project | src/app/routes/friendCircle/friendCircle/friendCircle.component.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-friendCircle',
templateUrl: './friendCircle.component.html',
styleUrls: ['./friendCircle.component.less'],
})
export class FriendCircleComponent implements OnInit{
constructor(
private fb: FormBuilder,
private http: _HttpClient,
public msg: NzMessageService,
private... | doordie2/my-project | src/app/routes/friendCircle/friendCircle/friendCircle.component.ts | TypeScript |
MethodDeclaration |
ngOnInit(): void {
this.form = this.fb.group({
content: [null, [Validators.required]],
title: [null, [Validators.required]],
sendTime: [null, [Validators.required]],
device: [null, [Validators.required]],
time: [null, [Validators.required]],
comment: [this.comments],
im... | doordie2/my-project | src/app/routes/friendCircle/friendCircle/friendCircle.component.ts | TypeScript |
MethodDeclaration |
submit() {
for (let i = 0; i < this.controlArray.length; i++) {
let a = this.controlArray[i].controlInstance;
let b = this.form.value[a];
this.comments.push(b);
}
for (let j = 0; j < this.fileList.length; j++) {
this.images.push(this.fileList[j].url);
}
console.log(this.f... | doordie2/my-project | src/app/routes/friendCircle/friendCircle/friendCircle.component.ts | TypeScript |
MethodDeclaration |
addField(e?: MouseEvent): void {
if (e) {
e.preventDefault();
}
const id = (this.controlArray.length > 0) ? this.controlArray[this.controlArray.length - 1].id + 1 : 0;
const control = {
id,
controlInstance: `passenger${id}`,
};
const index = this.controlArray.push(control);
... | doordie2/my-project | src/app/routes/friendCircle/friendCircle/friendCircle.component.ts | TypeScript |
MethodDeclaration |
removeField(i: { id: number, controlInstance: string }, e: MouseEvent): void {
e.preventDefault();
if (this.controlArray.length > 1) {
const index = this.controlArray.indexOf(i);
this.controlArray.splice(index, 1);
this.form.removeControl(i.controlInstance);
}
} | doordie2/my-project | src/app/routes/friendCircle/friendCircle/friendCircle.component.ts | TypeScript |
MethodDeclaration |
a(file: UploadFile){
alert(JSON.stringify(file))
} | doordie2/my-project | src/app/routes/friendCircle/friendCircle/friendCircle.component.ts | TypeScript |
MethodDeclaration |
onOk(result: Date): void {
this.form.value.sendTime = result;
} | doordie2/my-project | src/app/routes/friendCircle/friendCircle/friendCircle.component.ts | TypeScript |
MethodDeclaration |
log(value: object[]): void {
this.device=[];
for (let y=0;y<value.length;y++){
if (value[y]['checked']){
this.device.push(value[y]['label'])
}
}
console.log(this.device);
} | doordie2/my-project | src/app/routes/friendCircle/friendCircle/friendCircle.component.ts | TypeScript |
MethodDeclaration | //输入地址获取图片
onBlur(){
this.http.get("http://www.taotongxue.cn/mobile/taobao/getPic?itemId="+this.form.value.content).subscribe((res:any)=>{
console.log(JSON.stringify(res))
})
} | doordie2/my-project | src/app/routes/friendCircle/friendCircle/friendCircle.component.ts | TypeScript |
MethodDeclaration | //获取商品id
onChange(){
this.http.post(BaseConfig.host+"/back/sns/regex",null,{"regexText": this.form.value.content}).subscribe((res:any)=>{
console.log(JSON.stringify(res))
})
} | doordie2/my-project | src/app/routes/friendCircle/friendCircle/friendCircle.component.ts | TypeScript |
MethodDeclaration |
del(item:any){
for (let i=0;i<this.fileList.length;i++){
if (this.fileList[i].uid==item.uid){
this.fileList.splice(i,1);
}
}
} | doordie2/my-project | src/app/routes/friendCircle/friendCircle/friendCircle.component.ts | TypeScript |
ArrowFunction |
async () => {
testRepository.addEntry(Id.chootleBotGroup("10"), Id.discordGroup("100"));
const { internalId: domainId, err: error } =
testRepository.getDomainGroup(Id.discordGroup("100"));
expect(error).toBe(undefined);
expect(domainId).toEqual(Id.chootleBotGroup("10"));
} | Chuddington/choodleBot | src/chootlebot/infrastructure/memory/discordGroupRepository.test.ts | TypeScript |
ArrowFunction |
async () => {
testRepository.addEntry(Id.chootleBotGroup("10"), Id.discordGroup("100"));
const { externalId: domainId, err: error } =
testRepository.getExternalGroup(Id.chootleBotGroup("10"));
expect(error).toBe(undefined);
expect(domainId).toEqual(Id.discordGroup("100"));
} | Chuddington/choodleBot | src/chootlebot/infrastructure/memory/discordGroupRepository.test.ts | TypeScript |
ClassDeclaration |
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
CartPageRoutingModule,
],
declarations: [CartPage]
})
export class CartPageModule { } | nikolabube/foodapp | src/app/pages/cart/cart.module.ts | TypeScript |
ArrowFunction |
<T = any, R = T, V = object>(
args: UseSubscriptionArgs<V>,
handler?: SubscriptionHandler<T, R>
): UseSubscriptionResponse<R> => {
const client = useClient();
// Update handler on constant ref, since handler changes shouldn't
// trigger a new subscription run
const handlerRef = useRef(handler);
handlerR... | ctrlplusb/urql | src/hooks/useSubscription.ts | TypeScript |
ArrowFunction |
(opts?: Partial<OperationContext>) => {
return client.executeSubscription(request, { ...args.context, ...opts });
} | ctrlplusb/urql | src/hooks/useSubscription.ts | TypeScript |
ArrowFunction |
subscription$$ =>
pipe(
subscription$$,
switchMap(subscription$ => {
if (!subscription$) return fromValue({ fetching: false });
return concat([
// Initially set fetching to true
fromValue({ fetching: true }),
pipe(
subscriptio... | ctrlplusb/urql | src/hooks/useSubscription.ts | TypeScript |
ArrowFunction |
subscription$ => {
if (!subscription$) return fromValue({ fetching: false });
return concat([
// Initially set fetching to true
fromValue({ fetching: true }),
pipe(
subscription$,
map(({ stale, data, error, extensions }) => ({
... | ctrlplusb/urql | src/hooks/useSubscription.ts | TypeScript |
ArrowFunction |
({ stale, data, error, extensions }) => ({
fetching: true,
stale: !!stale,
data,
error,
extensions,
}) | ctrlplusb/urql | src/hooks/useSubscription.ts | TypeScript |
ArrowFunction |
(result, partial: any) => {
const { current: handler } = handlerRef;
// If a handler has been passed, it's used to merge new data in
const data =
partial.data !== undefined
? typeof handler === 'function'
? handler(result.data, partial.data)
... | ctrlplusb/urql | src/hooks/useSubscription.ts | TypeScript |
ArrowFunction |
() => (args.pause ? null : makeSubscription$()) | ctrlplusb/urql | src/hooks/useSubscription.ts | TypeScript |
ArrowFunction |
(opts?: Partial<OperationContext>) => update(makeSubscription$(opts)) | ctrlplusb/urql | src/hooks/useSubscription.ts | TypeScript |
InterfaceDeclaration |
export interface UseSubscriptionArgs<V> {
query: DocumentNode | string;
variables?: V;
pause?: boolean;
context?: Partial<OperationContext>;
} | ctrlplusb/urql | src/hooks/useSubscription.ts | TypeScript |
InterfaceDeclaration |
export interface UseSubscriptionState<T> {
fetching: boolean;
stale: boolean;
data?: T;
error?: CombinedError;
extensions?: Record<string, any>;
} | ctrlplusb/urql | src/hooks/useSubscription.ts | TypeScript |
TypeAliasDeclaration |
export type SubscriptionHandler<T, R> = (prev: R | undefined, data: T) => R; | ctrlplusb/urql | src/hooks/useSubscription.ts | TypeScript |
TypeAliasDeclaration |
export type UseSubscriptionResponse<T> = [
UseSubscriptionState<T>,
(opts?: Partial<OperationContext>) => void
]; | ctrlplusb/urql | src/hooks/useSubscription.ts | TypeScript |
ArrowFunction |
() => {
const index = this._fns.findIndex((v) => v === fn);
if (index > -1) {
this._fns.splice(index, 1);
}
} | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
ArrowFunction |
(v) => v === fn | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
ArrowFunction |
() => {
const successIndex = this._fnsSuccess.findIndex((v) => v === successFn);
const errorIndex = this._fnsError.findIndex((v) => v === errorFn);
if (successIndex > -1) {
this._fnsSuccess.splice(successIndex, 1);
}
if (errorIndex > -1) {
this._fnsError.splice(errorInde... | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
ArrowFunction |
(v) => v === successFn | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
ArrowFunction |
(v) => v === errorFn | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
ArrowFunction |
(url: string, config?: IRuntimeRequestCommonOptions = {}) => {
return this.request({
method: method.toUpperCase(),
url,
...config,
});
} | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
ArrowFunction |
(resolve, reject) => {
const timer = setTimeout(() => {
reject(new RuntimeError(`timeout of ${ms}ms`));
}, ms);
promise
.then((value) => {
clearTimeout(timer);
resolve(value);
})
.catch((reason) => {
clearTimeout(timer);
reject(... | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
ArrowFunction |
() => {
reject(new RuntimeError(`timeout of ${ms}ms`));
} | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
ArrowFunction |
(value) => {
clearTimeout(timer);
resolve(value);
} | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
ArrowFunction |
(reason) => {
clearTimeout(timer);
reject(reason);
} | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
ArrowFunction |
() =>
fetch(url.toString(), {
method: config.method,
body: body,
headers: headers,
// common options
cache: config.cache,
credentials: config.credentials,
integrity: config.integrity,
keepalive: config.keepalive,
mode: config.mode,
... | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
ArrowFunction |
async (resp) => {
if (!resp.ok) return Promise.reject(RuntimeError.fromResponse(resp));
const contentType = resp.headers.get("content-type");
switch (contentType) {
case "application/json":
return { data: await resp.json(), resp };
case "application/x-www-form-ur... | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
ArrowFunction |
({ data, resp }) => {
return this._responseInterceptor.runSuccess<T>(config, resp, data);
} | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
ArrowFunction |
(err) => {
const runtimeErr = err instanceof RuntimeError ? err : err instanceof Error ? RuntimeError.fromError(err) : new RuntimeError(err + "");
return this._responseInterceptor.runError<T>(config, runtimeErr);
} | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
ClassDeclaration |
class RequestInterceptor implements IRequestInterceptor {
private _fns: IRequestInterceptorFn[] = [];
public use(fn: IRequestInterceptorFn) {
this._fns.push(fn);
return () => {
const index = this._fns.findIndex((v) => v === fn);
if (index > -1) {
this._fns.splice(index, 1);
}
... | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
ClassDeclaration |
class ResponseInterceptor implements IResponseInterceptor {
private _fnsSuccess: IResponseInterceptorSuccessFn<any>[] = [];
private _fnsError: IResponseInterceptorErrorFn<any>[] = [];
public use(successFn: IResponseInterceptorSuccessFn<any>, errorFn: IResponseInterceptorErrorFn<any>) {
this._fnsSuccess.push(... | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
ClassDeclaration |
export class RuntimeForm<T extends IRuntimeForm> {
constructor(private _form: T) {}
public formData(): FormData {
const form = new FormData();
for (const key in this._form) {
if (this._form[key] !== undefined) {
form.append(key, this._form[key]);
}
}
return form;
}
} | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
ClassDeclaration |
export class RuntimeError extends Error {
constructor(message: string, private _resp?: Response) {
super(message);
}
public get response(): Response | undefined {
return this._resp;
}
static fromResponse(resp: Response) {
return new RuntimeError(resp.statusText, resp);
}
static fromError(e... | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
ClassDeclaration |
export class Runtime implements IRuntime {
constructor(private _domain: string, private _prefix: string) {
const methods = ["get", "post", "delete", "put", "head", "options", "trace", "patch"];
for (const method of methods) {
// @ts-ignore ignore error
this[method] = (url: string, config?: IRunt... | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
InterfaceDeclaration | // Generate by swagger2ts
/* default type by generation start */
interface MapAny {
[key: string]: any
} | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
InterfaceDeclaration |
interface MapString {
[key: string]: string | undefined
} | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
InterfaceDeclaration | /* default type by generation end */
/**
* ButtonDTO
*/
export interface ButtonDTO {
name?: string /* 名称(50字符以内) */
permission?: string /* 权限(255字符以内) */
pid?: number /* 上级节点ID */
show?: boolean /* 显示 */
} | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
InterfaceDeclaration | /**
* MenuTreeVO
*/
export interface MenuTreeVO {
category?: "BUTTON" | "MENU" /* 类型 */
children?: Array<MenuTreeVO> /* 子菜单 */
icon?: string /* 图标 */
id?: number /* id */
module?: string /* 组件 */
name?: string /* 名称 */
params?: string /* 路由参数 */
permission?: string /* 权限 */
route?: string /* 路由地址 */... | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
InterfaceDeclaration | /**
* RoleDTO
*/
export interface RoleDTO {
description?: string /* 描述(255字符以内) */
name?: string /* 角色(100字符以内) */
pid?: number /* 归属 */
} | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
InterfaceDeclaration | /**
* SitemapDTO
*/
export interface SitemapDTO {
icon?: string /* 图标(255字符以内) */
module?: string /* 组件(255字符以内) */
name?: string /* 名称(50字符以内) */
params?: string /* 路由参数(255字符以内) */
pid?: number /* 上级节点ID */
route?: string /* 路由地址(255字符以内) */
target?: string /* 打开方式(50字符以内) */
} | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
InterfaceDeclaration | /**
* 菜单树
*/
export interface 菜单树 {
category?: "BUTTON" | "MENU" /* 分类 */
children?: Array<菜单树> /* 子菜单 */
deleted?: boolean /* 删除 */
gmtModified?: string /* 更新时间 */
icon?: string /* 图标 */
id?: number /* id */
locked?: boolean /* 锁 */
module?: string /* 组件 */
name?: string /* 名称 */
params?: string ... | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
InterfaceDeclaration | /**
* 角色树查询
*/
export interface 角色树查询 {
children?: Array<角色树查询> /* 子菜单 */
description?: string /* 描述 */
gmtModified?: string /* 更新时间 */
id?: number /* id */
locked?: boolean /* 锁 */
name?: string /* 名称 */
pid?: number /* 上级节点ID */
} | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
InterfaceDeclaration |
export interface SwaggerApi{
/**
* @tag 公共接口
* @summary 按钮
*/
get(url: "/button", options?: {} & IDefaultOptions): Promise<Array<MenuTreeVO>>
/**
* @tag 公共接口
* @summary 导航条
*/
get(url: "/navbar", options?: {} & IDefaultOptions): Promise<Array<MenuTreeVO>>
/**
* @tag 角色管理
* @summary ... | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
InterfaceDeclaration | // swagger runtime. generate by swagger2ts
interface IRuntimeHeaderMapString {
[key: string]: string;
} | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
InterfaceDeclaration |
interface IRuntimeHeaderConfig {
common: IRuntimeHeaderMapString;
[method: string]: IRuntimeHeaderMapString;
} | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
InterfaceDeclaration |
interface IRuntimeRequestCommonOptions extends Omit<RequestInit, "body" | "method"> {
path?: {
[key: string]: string;
};
query?: {
[key: string]: string;
};
header?: {
[key: string]: string;
};
body?: any;
timeout?: number;
} | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
InterfaceDeclaration |
interface IRuntimeRequestOptions extends IRuntimeRequestCommonOptions {
url: string;
method: Uppercase<string>;
} | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
InterfaceDeclaration |
interface IRequestInterceptor {
use(fn: IRequestInterceptorFn): IInterceptorCancelFn;
} | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
InterfaceDeclaration |
interface IResponseInterceptor {
use(success: IResponseInterceptorSuccessFn<any>, error: IResponseInterceptorErrorFn<any>): IInterceptorCancelFn;
} | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
InterfaceDeclaration |
interface IRuntimeForm {
[key: string]: any;
} | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
InterfaceDeclaration |
export interface IRuntime {
readonly interceptors: { readonly request: IRequestInterceptor; readonly response: IResponseInterceptor };
readonly defaults: { readonly timeout: number; readonly headers: IRuntimeHeaderConfig };
readonly baseURL: string;
domain: string;
prefix: string;
request<T>(config: IRunti... | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
TypeAliasDeclaration |
type IDefaultOptions = Omit<RequestInit, "body" | "method"> & { timeout?: number } | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
TypeAliasDeclaration |
type IInterceptorCancelFn = () => void; | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
TypeAliasDeclaration |
type IRequestInterceptorFn = (config: IRuntimeRequestOptions) => Promise<IRuntimeRequestOptions>; | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
TypeAliasDeclaration |
type IResponseInterceptorSuccessFn<T> = (config: IRuntimeRequestOptions, response: Response, data: T) => Promise<T>; | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
TypeAliasDeclaration |
type IResponseInterceptorErrorFn<T> = (config: IRuntimeRequestOptions, Error: RuntimeError) => Promise<T>; | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
TypeAliasDeclaration |
export type IClient = SwaggerApi & IRuntime | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
MethodDeclaration |
public use(fn: IRequestInterceptorFn) {
this._fns.push(fn);
return () => {
const index = this._fns.findIndex((v) => v === fn);
if (index > -1) {
this._fns.splice(index, 1);
}
};
} | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
MethodDeclaration |
async run(config: IRuntimeRequestOptions): Promise<IRuntimeRequestOptions> {
for (const fn of this._fns) {
config = await fn(config);
}
return config;
} | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
MethodDeclaration |
public use(successFn: IResponseInterceptorSuccessFn<any>, errorFn: IResponseInterceptorErrorFn<any>) {
this._fnsSuccess.push(successFn);
this._fnsError.push(errorFn);
return () => {
const successIndex = this._fnsSuccess.findIndex((v) => v === successFn);
const errorIndex = this._fnsError.findI... | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
MethodDeclaration |
async runSuccess<T>(config: IRuntimeRequestOptions, response: Response, data: T): Promise<T> {
for (const fn of this._fnsSuccess) {
data = await fn(config, response, data);
}
return data;
} | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
MethodDeclaration |
async runError<T>(config: IRuntimeRequestOptions, err: RuntimeError): Promise<T> {
let res!: T;
for (const fn of this._fnsError) {
res = await fn(config, err);
}
return res;
} | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
MethodDeclaration |
public formData(): FormData {
const form = new FormData();
for (const key in this._form) {
if (this._form[key] !== undefined) {
form.append(key, this._form[key]);
}
}
return form;
} | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
MethodDeclaration |
static fromResponse(resp: Response) {
return new RuntimeError(resp.statusText, resp);
} | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
MethodDeclaration |
static fromError(err: Error) {
return new RuntimeError(err.message || "unknown error: " + err);
} | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
MethodDeclaration |
private _timeout<T>(ms: number, promise: Promise<T>) {
return new Promise<T>((resolve, reject) => {
const timer = setTimeout(() => {
reject(new RuntimeError(`timeout of ${ms}ms`));
}, ms);
promise
.then((value) => {
clearTimeout(timer);
resolve(value);
... | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
MethodDeclaration |
public async request<T>(config: IRuntimeRequestOptions): Promise<T> {
const url = new URL(this.baseURL + config.url);
config.header = config.header || {};
const defaults = this.defaults;
// set default header
for (const key in defaults.headers.common) {
config.header[key] = defaults.headers... | axetroy/swagger2ts | __test__/3.0/api-upms.ts | TypeScript |
ClassDeclaration | /**
* <p>Using a device ID, returns a DeviceEventsResponse object containing an
* array of events for the device.</p>
*/
export class ListDeviceEventsCommand extends $Command<
ListDeviceEventsCommandInput,
ListDeviceEventsCommandOutput,
IoT1ClickDevicesServiceClientResolvedConfig
> {
private resolved = fals... | alsiola/aws-sdk-js-v3 | clients/client-iot-1click-devices-service/commands/ListDeviceEventsCommand.ts | TypeScript |
TypeAliasDeclaration |
export type ListDeviceEventsCommandInput = ListDeviceEventsRequest; | alsiola/aws-sdk-js-v3 | clients/client-iot-1click-devices-service/commands/ListDeviceEventsCommand.ts | TypeScript |
TypeAliasDeclaration |
export type ListDeviceEventsCommandOutput = ListDeviceEventsResponse & __MetadataBearer; | alsiola/aws-sdk-js-v3 | clients/client-iot-1click-devices-service/commands/ListDeviceEventsCommand.ts | TypeScript |
MethodDeclaration | /**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: IoT1ClickDevicesServiceClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<ListDeviceEventsCommandInput, ListDeviceEventsCommandOutput> {
if (!this.resolved) {
... | alsiola/aws-sdk-js-v3 | clients/client-iot-1click-devices-service/commands/ListDeviceEventsCommand.ts | TypeScript |
MethodDeclaration |
private serialize(input: ListDeviceEventsCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_restJson1ListDeviceEventsCommand(input, context);
} | alsiola/aws-sdk-js-v3 | clients/client-iot-1click-devices-service/commands/ListDeviceEventsCommand.ts | TypeScript |
MethodDeclaration |
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<ListDeviceEventsCommandOutput> {
return deserializeAws_restJson1ListDeviceEventsCommand(output, context);
} | alsiola/aws-sdk-js-v3 | clients/client-iot-1click-devices-service/commands/ListDeviceEventsCommand.ts | TypeScript |
FunctionDeclaration |
export default function create (t: <T = string> (key: string, text: string, options: { ns: string }) => T): Route {
return {
Component,
display: {
needsAccounts: true,
needsApi: [
'tx.sudo.setKey'
],
needsSudo: true
},
icon: 'unlock',
name: 'sudo',
text: t<stri... | danforbes/nft_parachain | front-end/packages/apps-routing/src/sudo.ts | TypeScript |
ArrowFunction |
() => {
this.cellType = NOTEBOOK_CELL_TYPE.bindTo(this._contextKeyService);
this.cellEditable = NOTEBOOK_CELL_EDITABLE.bindTo(this._contextKeyService);
this.cellFocused = NOTEBOOK_CELL_FOCUSED.bindTo(this._contextKeyService);
this.cellEditorFocused = NOTEBOOK_CELL_EDITOR_FOCUSED.bindTo(this._contextKeyServ... | hermannloose/vscode | src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.ts | TypeScript |
ArrowFunction |
e => {
if (this.element && e.affectsCell(this.element.uri)) {
this.updateForExecutionState();
}
} | hermannloose/vscode | src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.ts | TypeScript |
ArrowFunction |
e => this.onDidChangeState(e) | hermannloose/vscode | src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.ts | TypeScript |
ArrowFunction |
() => this.updateForOutputs() | hermannloose/vscode | src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.ts | TypeScript |
ArrowFunction |
() => this.updateForFocusState() | hermannloose/vscode | src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.ts | TypeScript |
ArrowFunction |
() => {
this.updateForFocusState();
this.updateForExecutionState();
this.updateForEditState();
this.updateForCollapseState();
this.updateForOutputs();
this.cellLineNumbers.set(this.element!.lineNumbers);
} | hermannloose/vscode | src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.ts | TypeScript |
ArrowFunction |
() => {
if (e.internalMetadataChanged) {
this.updateForExecutionState();
}
if (e.editStateChanged) {
this.updateForEditState();
}
if (e.focusModeChanged) {
this.updateForFocusState();
}
if (e.cellLineNumberChanged) {
this.cellLineNumbers.set(this.element!.lineNumbers);
}
... | hermannloose/vscode | src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.ts | TypeScript |
ClassDeclaration |
export class CellContextKeyPart extends CellPart {
private cellContextKeyManager: CellContextKeyManager;
constructor(
notebookEditor: INotebookEditorDelegate,
@IInstantiationService private readonly instantiationService: IInstantiationService,
) {
super();
this.cellContextKeyManager = this._register(this.... | hermannloose/vscode | src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.ts | TypeScript |
ClassDeclaration |
export class CellContextKeyManager extends Disposable {
private cellType!: IContextKey<'code' | 'markup'>;
private cellEditable!: IContextKey<boolean>;
private cellFocused!: IContextKey<boolean>;
private cellEditorFocused!: IContextKey<boolean>;
private cellRunState!: IContextKey<NotebookCellExecutionStateContex... | hermannloose/vscode | src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.ts | TypeScript |
MethodDeclaration |
protected override didRenderCell(element: ICellViewModel): void {
this.cellContextKeyManager.updateForElement(element);
} | hermannloose/vscode | src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.ts | TypeScript |
MethodDeclaration |
public updateForElement(element: ICellViewModel | undefined) {
this.elementDisposables.clear();
this.element = element;
if (!element) {
return;
}
this.elementDisposables.add(element.onDidChangeState(e => this.onDidChangeState(e)));
if (element instanceof CodeCellViewModel) {
this.elementDisposable... | hermannloose/vscode | src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.ts | TypeScript |
MethodDeclaration |
private onDidChangeState(e: CellViewModelStateChangeEvent) {
this._contextKeyService.bufferChangeEvents(() => {
if (e.internalMetadataChanged) {
this.updateForExecutionState();
}
if (e.editStateChanged) {
this.updateForEditState();
}
if (e.focusModeChanged) {
this.updateForFocusState();
... | hermannloose/vscode | src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.ts | TypeScript |
MethodDeclaration |
private updateForFocusState() {
if (!this.element) {
return;
}
const activeCell = this.notebookEditor.getActiveCell();
this.cellFocused.set(this.notebookEditor.getActiveCell() === this.element);
if (activeCell === this.element) {
this.cellEditorFocused.set(this.element.focusMode === CellFocusMode.Edi... | hermannloose/vscode | src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.