type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
InterfaceDeclaration
interface UniversalAdId { registry?: string; value?: string; }
1000ch/DefinitelyTyped
types/google-apps-script/apis/dfareporting_v3_3.d.ts
TypeScript
InterfaceDeclaration
interface UserDefinedVariableConfiguration { dataType?: string; reportName?: string; variableType?: string; }
1000ch/DefinitelyTyped
types/google-apps-script/apis/dfareporting_v3_3.d.ts
TypeScript
InterfaceDeclaration
interface UserProfile { accountId?: string; accountName?: string; etag?: string; kind?: string; profileId?: string; subAccountId?: string; subAccountName?: string; userName?: string; }
1000ch/DefinitelyTyped
types/google-apps-script/apis/dfareporting_v3_3.d.ts
TypeScript
InterfaceDeclaration
interface UserProfileList { etag?: string; items?: Dfareporting.Schema.UserProfile[]; kind?: string; }
1000ch/DefinitelyTyped
types/google-apps-script/apis/dfareporting_v3_3.d.ts
TypeScript
InterfaceDeclaration
interface UserRole { accountId?: string; defaultUserRole?: boolean; id?: string; kind?: string; name?: string; parentUserRoleId?: string; permissions?: Dfareporting.Schema.UserRolePermission[]; subaccountId?: string; }
1000ch/DefinitelyTyped
types/google-apps-script/apis/dfareporting_v3_3.d.ts
TypeScript
InterfaceDeclaration
interface UserRolePermission { availability?: string; id?: string; kind?: string; name?: string; permissionGroupId?: string; }
1000ch/DefinitelyTyped
types/google-apps-script/apis/dfareporting_v3_3.d.ts
TypeScript
InterfaceDeclaration
interface UserRolePermissionGroup { id?: string; kind?: string; name?: string; }
1000ch/DefinitelyTyped
types/google-apps-script/apis/dfareporting_v3_3.d.ts
TypeScript
InterfaceDeclaration
interface UserRolePermissionGroupsListResponse { kind?: string; userRolePermissionGroups?: Dfareporting.Schema.UserRolePermissionGroup[]; }
1000ch/DefinitelyTyped
types/google-apps-script/apis/dfareporting_v3_3.d.ts
TypeScript
InterfaceDeclaration
interface UserRolePermissionsListResponse { kind?: string; userRolePermissions?: Dfareporting.Schema.UserRolePermission[]; }
1000ch/DefinitelyTyped
types/google-apps-script/apis/dfareporting_v3_3.d.ts
TypeScript
InterfaceDeclaration
interface UserRolesListResponse { kind?: string; nextPageToken?: string; userRoles?: Dfareporting.Schema.UserRole[]; }
1000ch/DefinitelyTyped
types/google-apps-script/apis/dfareporting_v3_3.d.ts
TypeScript
InterfaceDeclaration
interface VideoFormat { fileType?: string; id?: number; kind?: string; resolution?: Dfareporting.Schema.Size; targetBitRate?: number; }
1000ch/DefinitelyTyped
types/google-apps-script/apis/dfareporting_v3_3.d.ts
TypeScript
InterfaceDeclaration
interface VideoFormatsListResponse { kind?: string; videoFormats?: Dfareporting.Schema.VideoFormat[]; }
1000ch/DefinitelyTyped
types/google-apps-script/apis/dfareporting_v3_3.d.ts
TypeScript
InterfaceDeclaration
interface VideoOffset { offsetPercentage?: number; offsetSeconds?: number; }
1000ch/DefinitelyTyped
types/google-apps-script/apis/dfareporting_v3_3.d.ts
TypeScript
InterfaceDeclaration
interface VideoSettings { companionSettings?: Dfareporting.Schema.CompanionSetting; kind?: string; orientation?: string; skippableSettings?: Dfareporting.Schema.SkippableSetting; transcodeSettings?: Dfareporting.Schema.TranscodeSetting; }
1000ch/DefinitelyTyped
types/google-apps-script/apis/dfareporting_v3_3.d.ts
TypeScript
FunctionDeclaration
function capitalize(str: string) { // eslint-disable-next-line @typescript-eslint/restrict-plus-operands return str.charAt(0).toUpperCase() + str.slice(1); }
AlexandHavrylov/xc-front-kit
packages/badge/stories/Badge.stories.tsx
TypeScript
ArrowFunction
({ size }: any) => `${size}px`
AlexandHavrylov/xc-front-kit
packages/badge/stories/Badge.stories.tsx
TypeScript
ArrowFunction
(props: any) => ( <div style={
AlexandHavrylov/xc-front-kit
packages/badge/stories/Badge.stories.tsx
TypeScript
ArrowFunction
() => ( <> A
AlexandHavrylov/xc-front-kit
packages/badge/stories/Badge.stories.tsx
TypeScript
ArrowFunction
() => ( <Table> { appearances.map((a) => ( <Row key={ a }> <Cell> <Badge appearance={ a } key={ `${a}` }> { capitalize(a) } </Badge> </Cell> <Cell> <Badge appearance={ a }
AlexandHavrylov/xc-front-kit
packages/badge/stories/Badge.stories.tsx
TypeScript
ArrowFunction
(a) => ( <Row key={ a }> <Cell> <Badge appearance
AlexandHavrylov/xc-front-kit
packages/badge/stories/Badge.stories.tsx
TypeScript
ArrowFunction
() => ( <ThemeProvider theme={ theme }> <Table> { appearances.map((a) => ( <Row key={ a }> <Cell> <Badge appearance={ a } key={ `${a}` }> { capitalize(a) } </Badge> </Cell> <Cell> <Badge appearance
AlexandHavrylov/xc-front-kit
packages/badge/stories/Badge.stories.tsx
TypeScript
ArrowFunction
(a) => ( <Row key={ a }> <Cell> <Badge appearance
AlexandHavrylov/xc-front-kit
packages/badge/stories/Badge.stories.tsx
TypeScript
MethodDeclaration
capitalize(a)
AlexandHavrylov/xc-front-kit
packages/badge/stories/Badge.stories.tsx
TypeScript
ArrowFunction
(name: string, type: string, urn: string): pulumi.Resource => { switch (type) { case "google-native:appengine/v1beta:App": return new App(name, <any>undefined, { urn }) case "google-native:appengine/v1beta:AuthorizedCertificate": return new AuthorizedCertificate(name, <any>undefined, { urn }) case "google-native:appengine/v1beta:DomainMapping": return new DomainMapping(name, <any>undefined, { urn }) case "google-native:appengine/v1beta:IngressRule": return new IngressRule(name, <any>undefined, { urn }) case "google-native:appengine/v1beta:Version": return new Version(name, <any>undefined, { urn }) default: throw new Error(`unknown resource type ${type}`); } }
AaronFriel/pulumi-google-native
sdk/nodejs/appengine/v1beta/index.ts
TypeScript
ClassDeclaration
class Application { public static main(): void { const canvas: Canvas = new Canvas(320, 200, new FeedbackRadialBlur()); canvas.init(); } }
jdiemke/AISA
src/examples/feedback-radial-blur/Application.ts
TypeScript
MethodDeclaration
public static main(): void { const canvas: Canvas = new Canvas(320, 200, new FeedbackRadialBlur()); canvas.init(); }
jdiemke/AISA
src/examples/feedback-radial-blur/Application.ts
TypeScript
ArrowFunction
async (): Promise<Book[]> => Object.values(books)
fahimulhaque/Library-ws
src/books/service/books.service.ts
TypeScript
ArrowFunction
async (id: number): Promise<Book> => books[id]
fahimulhaque/Library-ws
src/books/service/books.service.ts
TypeScript
ArrowFunction
async (newBook: BaseBook): Promise<Book> => { const id = new Date().valueOf(); Logger.debug(`Adding new Book with id ${id}: ${JSON.stringify(newBook)}`); newBook.releaseDate = newBook.releaseDate ? new Date(newBook.releaseDate).toDateString() : ""; books[id] = { id, ...newBook }; return books[id]; }
fahimulhaque/Library-ws
src/books/service/books.service.ts
TypeScript
ArrowFunction
async (id: number, bookUpdate: BaseBook): Promise<Book | null> => { const book = await find(id); if (!book) { return null; } Logger.debug(`Updating Book for id ${id}: ${JSON.stringify(bookUpdate)}`); bookUpdate.releaseDate = bookUpdate.releaseDate ? new Date(bookUpdate.releaseDate).toDateString() : ""; books[id] = { id, ...bookUpdate }; return books[id]; }
fahimulhaque/Library-ws
src/books/service/books.service.ts
TypeScript
ArrowFunction
async (id: number): Promise<null | void> => { const book = await find(id); if (!book) { return null; } Logger.debug(`Deleting Book for id ${id}`); delete books[id]; }
fahimulhaque/Library-ws
src/books/service/books.service.ts
TypeScript
ClassDeclaration
class LongTap extends Control { _template: TemplateFunction = template; _longTapCount: number = 0; _swipeCount: number = 0; _tapCount: number = 0; _beforeMount() { this._longTapCount = 0; this._swipeCount = 0; this._tapCount = 0; } _longClick() { this._longTapCount += 1; } _simpleClick() { this._tapCount += 1; } _swipe() { this._swipeCount += 1; } }
saby/UI
UIDemo/MobileEventDemo/LongTap.ts
TypeScript
MethodDeclaration
_beforeMount() { this._longTapCount = 0; this._swipeCount = 0; this._tapCount = 0; }
saby/UI
UIDemo/MobileEventDemo/LongTap.ts
TypeScript
MethodDeclaration
_longClick() { this._longTapCount += 1; }
saby/UI
UIDemo/MobileEventDemo/LongTap.ts
TypeScript
MethodDeclaration
_simpleClick() { this._tapCount += 1; }
saby/UI
UIDemo/MobileEventDemo/LongTap.ts
TypeScript
MethodDeclaration
_swipe() { this._swipeCount += 1; }
saby/UI
UIDemo/MobileEventDemo/LongTap.ts
TypeScript
FunctionDeclaration
export default function (conn: PoolClient) { return { async createLocation(token: string, name: string, description: string) { const authenticatedUser = await this.getUserIdFromToken(token) if (!authenticatedUser.success) { return { code: 403, success: false, id: '', name: '', description: '' } } const id = uuid() const createLocationResponse = await conn.query({ text: `INSERT INTO "locations" ("id", "name", "description") VALUES ($1, $2, $3) RETURNING *;`, values: [ id, name, description ] }) .then((res) => { console.log(res.rows[0]) return { code: 201, success: true, id: res.rows[0].id, name: res.rows[0].name, description: res.rows[0].description } }) .catch((err) => { console.error(err) return { code: 500, success: false, id: '', name: '', description: '', } }) return createLocationResponse }, async getLocations(token: string) { const authenticatedUser = await this.getUserIdFromToken(token) if (!authenticatedUser.success) { return { code: 403, success: false, locations: [] } } const dbResponse = await conn.query({ text: 'SELECT * FROM locations', values: [] }) .then((res) => { console.log(res.rows) return { code: 200, success: true, locations: res.rows } }) .catch((err) => { console.error(err) return { code: 500, success: false, locations: [] } }) return dbResponse }, async getLocation(id: string, token: string) { const authenticatedUser = await this.getUserIdFromToken(token) if (!authenticatedUser.success) { return { code: 403, success: false, id: '', name: '', description: '' } } const dbResponse = await conn.query({ text: 'SELECT * FROM locations WHERE id=$1', values: [ id ] }) .then((res) => { console.log(res.rows[0]) return { code: 200, success: true, id: res.rows[0].id, name: res.rows[0].name, description: res.rows[0].description } }) .catch((err) => { console.error(err) return { code: 500, success: false, id: '', name: '', description: '' } }) return dbResponse }, async updateLocation(id: string, token: string, name: string, description: string) { const authenticatedUser = await this.getUserIdFromToken(token) if (!authenticatedUser.success) { return { code: 403, success: false, id: '', name: '', description: '' } } const dbResponse = await conn.query({ text: 'UPDATE locations SET name=$2, description=$3 WHERE "id"=$1 RETURNING *;', values: [ id, name, description ] }) .then((res) => { console.log(res.rows[0]) return { code: 200, success: true, id: res.rows[0].id, name: res.rows[0].name, description: res.rows[0].description } }) .catch((err) => { console.error(err) return { code: 500, success: false, id: '', name: '', description: '' } }) return dbResponse }, async deleteLocation(id: string, token: string) { const authenticatedUser = await this.getUserIdFromToken(token) if (!authenticatedUser.success) { return { code: 403, success: false, id: '', name: '', description: '' } } const dbResponse = await conn.query({ text: 'DELETE FROM locations WHERE id=$1', values: [ id ] }) .then((res) => { return { code: 204, success: true } }) .catch((err) => { console.error(err) return { code: 500, success: false, } }) return dbResponse }, async getUserIdFromToken(token: string) { const dbResponse = conn.query({ text: `SELECT * FROM auth WHERE token=$1`, values: [ token ] }) .then((res) => { if (res && res.rows.length > 0) { return { code: 200, success: true, userId: res.rows[0].userid } } throw Error('Invalid token') }) .catch((err) => { console.error(err) return { code: 403, success: false, userId: undefined } }) return dbResponse } } }
codyuhi/net-app
api/db/locations.ts
TypeScript
ArrowFunction
(res) => { console.log(res.rows[0]) return { code: 201, success: true, id: res.rows[0].id, name: res.rows[0].name, description: res.rows[0].description } }
codyuhi/net-app
api/db/locations.ts
TypeScript
ArrowFunction
(err) => { console.error(err) return { code: 500, success: false, id: '', name: '', description: '', } }
codyuhi/net-app
api/db/locations.ts
TypeScript
ArrowFunction
(res) => { console.log(res.rows) return { code: 200, success: true, locations: res.rows } }
codyuhi/net-app
api/db/locations.ts
TypeScript
ArrowFunction
(err) => { console.error(err) return { code: 500, success: false, locations: [] } }
codyuhi/net-app
api/db/locations.ts
TypeScript
ArrowFunction
(res) => { console.log(res.rows[0]) return { code: 200, success: true, id: res.rows[0].id, name: res.rows[0].name, description: res.rows[0].description } }
codyuhi/net-app
api/db/locations.ts
TypeScript
ArrowFunction
(err) => { console.error(err) return { code: 500, success: false, id: '', name: '', description: '' } }
codyuhi/net-app
api/db/locations.ts
TypeScript
ArrowFunction
(res) => { return { code: 204, success: true } }
codyuhi/net-app
api/db/locations.ts
TypeScript
ArrowFunction
(err) => { console.error(err) return { code: 500, success: false, } }
codyuhi/net-app
api/db/locations.ts
TypeScript
ArrowFunction
(res) => { if (res && res.rows.length > 0) { return { code: 200, success: true, userId: res.rows[0].userid } } throw Error('Invalid token') }
codyuhi/net-app
api/db/locations.ts
TypeScript
ArrowFunction
(err) => { console.error(err) return { code: 403, success: false, userId: undefined } }
codyuhi/net-app
api/db/locations.ts
TypeScript
MethodDeclaration
async createLocation(token: string, name: string, description: string) { const authenticatedUser = await this.getUserIdFromToken(token) if (!authenticatedUser.success) { return { code: 403, success: false, id: '', name: '', description: '' } } const id = uuid() const createLocationResponse = await conn.query({ text: `INSERT INTO "locations" ("id", "name", "description") VALUES ($1, $2, $3) RETURNING *;`, values: [ id, name, description ] }) .then((res) => { console.log(res.rows[0]) return { code: 201, success: true, id: res.rows[0].id, name: res.rows[0].name, description: res.rows[0].description } }) .catch((err) => { console.error(err) return { code: 500, success: false, id: '', name: '', description: '', } }) return createLocationResponse }
codyuhi/net-app
api/db/locations.ts
TypeScript
MethodDeclaration
async getLocations(token: string) { const authenticatedUser = await this.getUserIdFromToken(token) if (!authenticatedUser.success) { return { code: 403, success: false, locations: [] } } const dbResponse = await conn.query({ text: 'SELECT * FROM locations', values: [] }) .then((res) => { console.log(res.rows) return { code: 200, success: true, locations: res.rows } }) .catch((err) => { console.error(err) return { code: 500, success: false, locations: [] } }) return dbResponse }
codyuhi/net-app
api/db/locations.ts
TypeScript
MethodDeclaration
async getLocation(id: string, token: string) { const authenticatedUser = await this.getUserIdFromToken(token) if (!authenticatedUser.success) { return { code: 403, success: false, id: '', name: '', description: '' } } const dbResponse = await conn.query({ text: 'SELECT * FROM locations WHERE id=$1', values: [ id ] }) .then((res) => { console.log(res.rows[0]) return { code: 200, success: true, id: res.rows[0].id, name: res.rows[0].name, description: res.rows[0].description } }) .catch((err) => { console.error(err) return { code: 500, success: false, id: '', name: '', description: '' } }) return dbResponse }
codyuhi/net-app
api/db/locations.ts
TypeScript
MethodDeclaration
async updateLocation(id: string, token: string, name: string, description: string) { const authenticatedUser = await this.getUserIdFromToken(token) if (!authenticatedUser.success) { return { code: 403, success: false, id: '', name: '', description: '' } } const dbResponse = await conn.query({ text: 'UPDATE locations SET name=$2, description=$3 WHERE "id"=$1 RETURNING *;', values: [ id, name, description ] }) .then((res) => { console.log(res.rows[0]) return { code: 200, success: true, id: res.rows[0].id, name: res.rows[0].name, description: res.rows[0].description } }) .catch((err) => { console.error(err) return { code: 500, success: false, id: '', name: '', description: '' } }) return dbResponse }
codyuhi/net-app
api/db/locations.ts
TypeScript
MethodDeclaration
async deleteLocation(id: string, token: string) { const authenticatedUser = await this.getUserIdFromToken(token) if (!authenticatedUser.success) { return { code: 403, success: false, id: '', name: '', description: '' } } const dbResponse = await conn.query({ text: 'DELETE FROM locations WHERE id=$1', values: [ id ] }) .then((res) => { return { code: 204, success: true } }) .catch((err) => { console.error(err) return { code: 500, success: false, } }) return dbResponse }
codyuhi/net-app
api/db/locations.ts
TypeScript
MethodDeclaration
async getUserIdFromToken(token: string) { const dbResponse = conn.query({ text: `SELECT * FROM auth WHERE token=$1`, values: [ token ] }) .then((res) => { if (res && res.rows.length > 0) { return { code: 200, success: true, userId: res.rows[0].userid } } throw Error('Invalid token') }) .catch((err) => { console.error(err) return { code: 403, success: false, userId: undefined } }) return dbResponse }
codyuhi/net-app
api/db/locations.ts
TypeScript
FunctionDeclaration
export default function ClockPointer({ rotateDeg, isHourView, isTransition, onTransitionChange, ...rest }: { rotateDeg: number; isHourView: boolean; isTransition: boolean; onTransitionChange: (transitionValue: boolean) => void; }) { const hourViewRef = useRef(isHourView); useEffect(() => { // 时分视图切换时 增加指针旋转动画 if (hourViewRef.current !== isHourView) { onTransitionChange(true); } hourViewRef.current = isHourView; }, [isHourView, onTransitionChange]); return ( <Wrapper $rotateDeg={rotateDeg} $isTransition={isTransition} {...rest}> <MinuteDot className="sinoui-clock__pointer-minute-dot" $selected={!isHourView && rotateDeg % 5 !== 0}
sinoui/core
src/TimePicker/TimePickerMobile/ClockPointer.tsx
TypeScript
ArrowFunction
({ theme }) => theme.palette.primary.main
sinoui/core
src/TimePicker/TimePickerMobile/ClockPointer.tsx
TypeScript
ArrowFunction
(props) => props.$isTransition && `transition: ${props.theme.transitions.create('transform')}`
sinoui/core
src/TimePicker/TimePickerMobile/ClockPointer.tsx
TypeScript
ArrowFunction
({ $rotateDeg = 0 }) => `rotate3d(0,0,1,${$rotateDeg}deg)`
sinoui/core
src/TimePicker/TimePickerMobile/ClockPointer.tsx
TypeScript
ArrowFunction
({ theme, $selected }) => $selected ? '#fff' : theme.palette.primary.main
sinoui/core
src/TimePicker/TimePickerMobile/ClockPointer.tsx
TypeScript
ArrowFunction
() => { // 时分视图切换时 增加指针旋转动画 if (hourViewRef.current !== isHourView) { onTransitionChange(true); } hourViewRef.current = isHourView; }
sinoui/core
src/TimePicker/TimePickerMobile/ClockPointer.tsx
TypeScript
ClassDeclaration
/** * @deprecated * * <p> * <code>DescribeExportConfigurations</code> is deprecated. Use <a href="https://docs.aws.amazon.com/application-discovery/latest/APIReference/API_DescribeExportTasks.html">DescribeImportTasks</a>, instead.</p> */ export class DescribeExportConfigurationsCommand extends $Command< DescribeExportConfigurationsCommandInput, DescribeExportConfigurationsCommandOutput, ApplicationDiscoveryServiceClientResolvedConfig > { // Start section: command_properties // End section: command_properties constructor(readonly input: DescribeExportConfigurationsCommandInput) { // Start section: command_constructor super(); // End section: command_constructor } /** * @internal */ resolveMiddleware( clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: ApplicationDiscoveryServiceClientResolvedConfig, options?: __HttpHandlerOptions ): Handler<DescribeExportConfigurationsCommandInput, DescribeExportConfigurationsCommandOutput> { this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "ApplicationDiscoveryServiceClient"; const commandName = "DescribeExportConfigurationsCommand"; const handlerExecutionContext: HandlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: DescribeExportConfigurationsRequest.filterSensitiveLog, outputFilterSensitiveLog: DescribeExportConfigurationsResponse.filterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve( (request: FinalizeHandlerArguments<any>) => requestHandler.handle(request.request as __HttpRequest, options || {}), handlerExecutionContext ); } private serialize(input: DescribeExportConfigurationsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { return serializeAws_json1_1DescribeExportConfigurationsCommand(input, context); } private deserialize( output: __HttpResponse, context: __SerdeContext ): Promise<DescribeExportConfigurationsCommandOutput> { return deserializeAws_json1_1DescribeExportConfigurationsCommand(output, context); } // Start section: command_body_extra // End section: command_body_extra }
AchillesKal/aws-sdk-js-v3
clients/client-application-discovery-service/commands/DescribeExportConfigurationsCommand.ts
TypeScript
InterfaceDeclaration
export interface DescribeExportConfigurationsCommandInput extends DescribeExportConfigurationsRequest {}
AchillesKal/aws-sdk-js-v3
clients/client-application-discovery-service/commands/DescribeExportConfigurationsCommand.ts
TypeScript
InterfaceDeclaration
export interface DescribeExportConfigurationsCommandOutput extends DescribeExportConfigurationsResponse, __MetadataBearer {}
AchillesKal/aws-sdk-js-v3
clients/client-application-discovery-service/commands/DescribeExportConfigurationsCommand.ts
TypeScript
MethodDeclaration
/** * @internal */ resolveMiddleware( clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: ApplicationDiscoveryServiceClientResolvedConfig, options?: __HttpHandlerOptions ): Handler<DescribeExportConfigurationsCommandInput, DescribeExportConfigurationsCommandOutput> { this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "ApplicationDiscoveryServiceClient"; const commandName = "DescribeExportConfigurationsCommand"; const handlerExecutionContext: HandlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: DescribeExportConfigurationsRequest.filterSensitiveLog, outputFilterSensitiveLog: DescribeExportConfigurationsResponse.filterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve( (request: FinalizeHandlerArguments<any>) => requestHandler.handle(request.request as __HttpRequest, options || {}), handlerExecutionContext ); }
AchillesKal/aws-sdk-js-v3
clients/client-application-discovery-service/commands/DescribeExportConfigurationsCommand.ts
TypeScript
MethodDeclaration
private serialize(input: DescribeExportConfigurationsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { return serializeAws_json1_1DescribeExportConfigurationsCommand(input, context); }
AchillesKal/aws-sdk-js-v3
clients/client-application-discovery-service/commands/DescribeExportConfigurationsCommand.ts
TypeScript
MethodDeclaration
private deserialize( output: __HttpResponse, context: __SerdeContext ): Promise<DescribeExportConfigurationsCommandOutput> { return deserializeAws_json1_1DescribeExportConfigurationsCommand(output, context); }
AchillesKal/aws-sdk-js-v3
clients/client-application-discovery-service/commands/DescribeExportConfigurationsCommand.ts
TypeScript
InterfaceDeclaration
export interface AjaxRequestConfig { url?: string method?: Method data?: any params?: any headers?: any responseType?: XMLHttpRequestResponseType timeout?: number transformRequest?: AjaxTransformer | AjaxTransformer[] transformResponse?: AjaxTransformer | AjaxTransformer[] cancelToken?: CancelToken withCredentials?: boolean xsrfCookieName?: string xsrfHeaderName?: string onDownloadProgress?: (e: ProgressEvent) => void onUploadProgress?: (e: ProgressEvent) => void auth?: AjaxBasicCredentials validateStatus?: (status: number) => boolean paramsSerializer?: (params: any) => string baseURL?: string [propName: string]: any }
eldshan/ts-ajax
src/types/index.ts
TypeScript
InterfaceDeclaration
export interface AjaxResponse<T = any> { data: T status: number statusText: string headers: any config: AjaxRequestConfig request: any }
eldshan/ts-ajax
src/types/index.ts
TypeScript
InterfaceDeclaration
export interface AjaxPromise<T = any> extends Promise<AjaxResponse<T>> {}
eldshan/ts-ajax
src/types/index.ts
TypeScript
InterfaceDeclaration
export interface AjaxError extends Error { config: AjaxRequestConfig code?: string request?: any response?: AjaxResponse isAjaxError: boolean }
eldshan/ts-ajax
src/types/index.ts
TypeScript
InterfaceDeclaration
export interface Ajax { defaults: AjaxRequestConfig interceptors: { request: AjaxInterceptorManager<AjaxRequestConfig> response: AjaxInterceptorManager<AjaxResponse> } request<T = any>(config: AjaxRequestConfig): AjaxPromise<T> get<T = any>(url: string, config?: AjaxRequestConfig): AjaxPromise<T> delete<T = any>(url: string, config?: AjaxRequestConfig): AjaxPromise<T> head<T = any>(url: string, config?: AjaxRequestConfig): AjaxPromise<T> options<T = any>(url: string, config?: AjaxRequestConfig): AjaxPromise<T> post<T = any>(url: string, data?: any, config?: AjaxRequestConfig): AjaxPromise<T> put<T = any>(url: string, data?: any, config?: AjaxRequestConfig): AjaxPromise<T> patch<T = any>(url: string, data?: any, config?: AjaxRequestConfig): AjaxPromise<T> getUri(config?: AjaxRequestConfig): string }
eldshan/ts-ajax
src/types/index.ts
TypeScript
InterfaceDeclaration
export interface AjaxInstance extends Ajax { <T = any>(config: AjaxRequestConfig): AjaxPromise<T> <T = any>(url: string, config?: AjaxRequestConfig): AjaxPromise<T> }
eldshan/ts-ajax
src/types/index.ts
TypeScript
InterfaceDeclaration
export interface AjaxClassStatic { new (config: AjaxRequestConfig): Ajax }
eldshan/ts-ajax
src/types/index.ts
TypeScript
InterfaceDeclaration
export interface AjaxStatic extends AjaxInstance { create(config?: AjaxRequestConfig): AjaxInstance CancelToken: CancelTokenStatic Cancel: CancelStatic isCancel: (value: any) => boolean all<T>(promises: Array<T | Promise<T>>): Promise<T[]> spread<T, R>(callback: (...args: T[]) => R): (arr: T[]) => R Ajax: AjaxClassStatic }
eldshan/ts-ajax
src/types/index.ts
TypeScript
InterfaceDeclaration
export interface AjaxInterceptorManager<T> { use(resolved: ResolvedFn<T>, rejected?: RejectedFn): number eject(id: number): void }
eldshan/ts-ajax
src/types/index.ts
TypeScript
InterfaceDeclaration
export interface ResolvedFn<T> { (val: T): T | Promise<T> }
eldshan/ts-ajax
src/types/index.ts
TypeScript
InterfaceDeclaration
export interface AjaxTransformer { (data: any, headers?: any): any }
eldshan/ts-ajax
src/types/index.ts
TypeScript
InterfaceDeclaration
export interface CancelToken { promise: Promise<Cancel> reason?: Cancel throwIfRequested(): void }
eldshan/ts-ajax
src/types/index.ts
TypeScript
InterfaceDeclaration
export interface Canceler { (message?: string): void }
eldshan/ts-ajax
src/types/index.ts
TypeScript
InterfaceDeclaration
export interface CancelExecutor { (cancel: Canceler): void }
eldshan/ts-ajax
src/types/index.ts
TypeScript
InterfaceDeclaration
export interface CancelTokenSource { token: CancelToken cancel: Canceler }
eldshan/ts-ajax
src/types/index.ts
TypeScript
InterfaceDeclaration
export interface CancelTokenStatic { new (executor: CancelExecutor): CancelToken source(): CancelTokenSource }
eldshan/ts-ajax
src/types/index.ts
TypeScript
InterfaceDeclaration
export interface CancelStatic { new (message?: string): Cancel }
eldshan/ts-ajax
src/types/index.ts
TypeScript
InterfaceDeclaration
export interface AjaxBasicCredentials { username: string password: string }
eldshan/ts-ajax
src/types/index.ts
TypeScript
TypeAliasDeclaration
export type Method = | 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH'
eldshan/ts-ajax
src/types/index.ts
TypeScript
FunctionDeclaration
export default function sendHistoryToConversation(botEmulator: BotEmulator) { return (req: Restify.Request, res: Restify.Response, next: Restify.Next): any => { const history = <ConversationHistory> req.body; var successCount = 0; var firstErrorMessage = ''; for(let activity of history.activities) { try { (req as any).conversation.postActivityToUser(activity, true); successCount++; } catch(err) { if (firstErrorMessage === '') firstErrorMessage = err; } } var response = createResourceResponse(`Processed ${successCount} of ${history.activities.length} activities successfully.${firstErrorMessage}`); res.send(HttpStatus.OK, response); res.end(); next(); }; }
hhy37/BotFramework-Emulator
packages/emulator/core/src/conversations/middleware/sendHistoryToConversation.ts
TypeScript
ArrowFunction
(req: Restify.Request, res: Restify.Response, next: Restify.Next): any => { const history = <ConversationHistory> req.body; var successCount = 0; var firstErrorMessage = ''; for(let activity of history.activities) { try { (req as any).conversation.postActivityToUser(activity, true); successCount++; } catch(err) { if (firstErrorMessage === '') firstErrorMessage = err; } } var response = createResourceResponse(`Processed ${successCount} of ${history.activities.length} activities successfully.${firstErrorMessage}`); res.send(HttpStatus.OK, response); res.end(); next(); }
hhy37/BotFramework-Emulator
packages/emulator/core/src/conversations/middleware/sendHistoryToConversation.ts
TypeScript
ClassDeclaration
@Injectable() export class AuthMiddleware implements NestMiddleware { constructor( private readonly userService: UserService, private configService: ConfigService ) {} async use(req: Request, res: Response, next: NextFunction) { const authHeaders = req.headers.authorization; if (!authHeaders) { throw new HttpException('Not authorized.', HttpStatus.UNAUTHORIZED); } let token = ''; const matches = (authHeaders as string).split(' '); if (matches && matches[0] === 'Bearer') { token = matches[1]; } if (token) { try { const SECRET = this.configService.get<string>('SECURITY_JWT_SECRET'); const decoded: Record<string, any> = jwt.verify(token, SECRET); const user = await this.userService.findById(decoded.id); if (!user) { throw new HttpException('User not found.', HttpStatus.UNAUTHORIZED); } req.$current = user; next(); } catch (e) { throw new HttpException('Not authorized.', HttpStatus.UNAUTHORIZED); } } else { throw new HttpException('Not authorized.', HttpStatus.UNAUTHORIZED); } } }
mengxinssfd/zzj-admin-api
src/common/middleware/auth.ts
TypeScript
InterfaceDeclaration
interface Request { $current?: UserDto; }
mengxinssfd/zzj-admin-api
src/common/middleware/auth.ts
TypeScript
MethodDeclaration
async use(req: Request, res: Response, next: NextFunction) { const authHeaders = req.headers.authorization; if (!authHeaders) { throw new HttpException('Not authorized.', HttpStatus.UNAUTHORIZED); } let token = ''; const matches = (authHeaders as string).split(' '); if (matches && matches[0] === 'Bearer') { token = matches[1]; } if (token) { try { const SECRET = this.configService.get<string>('SECURITY_JWT_SECRET'); const decoded: Record<string, any> = jwt.verify(token, SECRET); const user = await this.userService.findById(decoded.id); if (!user) { throw new HttpException('User not found.', HttpStatus.UNAUTHORIZED); } req.$current = user; next(); } catch (e) { throw new HttpException('Not authorized.', HttpStatus.UNAUTHORIZED); } } else { throw new HttpException('Not authorized.', HttpStatus.UNAUTHORIZED); } }
mengxinssfd/zzj-admin-api
src/common/middleware/auth.ts
TypeScript
ClassDeclaration
@ArgsType() export default class createUserInterface { @Field({ nullable: false }) @IsEmail(undefined, { message: 'The provided email is invalid' }) email: string @Field({ nullable: false }) password: string @Field({ nullable: false }) confirmPassword: string @Field({ nullable: false }) firstName: string @Field({ nullable: false }) lastName: string }
Miguel-Espinales-ESES/web-api
src/resolvers/userResolvers/interfaces/createUser.ts
TypeScript
ClassDeclaration
export class GProgressBar extends GComponent { private _max: number = 0; private _value: number = 0; private _titleType: ProgressTitleType; private _reverse: boolean; private _titleObject: GTextField; private _aniObject: GObject; private _barObjectH: GObject; private _barObjectV: GObject; private _barMaxWidth: number = 0; private _barMaxHeight: number = 0; private _barMaxWidthDelta: number = 0; private _barMaxHeightDelta: number = 0; private _barStartX: number = 0; private _barStartY: number = 0; private _tweening: boolean = false; public constructor() { super(); this._titleType = ProgressTitleType.Percent; this._value = 50; this._max = 100; } public get titleType(): ProgressTitleType { return this._titleType; } public set titleType(value: ProgressTitleType) { if (this._titleType != value) { this._titleType = value; this.update(this._value); } } public get max(): number { return this._max; } public set max(value: number) { if (this._max != value) { this._max = value; this.update(this._value); } } public get value(): number { return this._value; } public set value(value: number) { if (this._tweening) { GTween.kill(this, true, this.update); this._tweening = false; } if (this._value != value) { this._value = value; this.update(this._value); } } public tweenValue(value: number, duration: number): GTweener { if (this._value != value) { if (this._tweening) { GTween.kill(this, false, this.update); this._tweening = false; } var oldValule: number = this._value; this._value = value; this._tweening = true; return GTween.to(oldValule, this._value, duration).setTarget(this, this.update).setEase(EaseType.Linear) .onComplete(function (): void { this._tweening = false; }, this); } else return null; } public update(newValue: number): void { var percent: number = this._max != 0 ? Math.min(newValue / this._max, 1) : 0; if (this._titleObject) { switch (this._titleType) { case ProgressTitleType.Percent: this._titleObject.text = Math.round(percent * 100) + "%"; break; case ProgressTitleType.ValueAndMax: this._titleObject.text = Math.round(newValue) + "/" + Math.round(this._max); break; case ProgressTitleType.Value: this._titleObject.text = "" + Math.round(newValue); break; case ProgressTitleType.Max: this._titleObject.text = "" + Math.round(this._max); break; } } var fullWidth: number = this.width - this._barMaxWidthDelta; var fullHeight: number = this.height - this._barMaxHeightDelta; if (!this._reverse) { if (this._barObjectH) this._barObjectH.width = Math.round(fullWidth * percent); if (this._barObjectV) this._barObjectV.height = Math.round(fullHeight * percent); } else { if (this._barObjectH) { this._barObjectH.width = Math.round(fullWidth * percent); this._barObjectH.x = this._barStartX + (fullWidth - this._barObjectH.width); } if (this._barObjectV) { this._barObjectV.height = Math.round(fullHeight * percent); this._barObjectV.y = this._barStartY + (fullHeight - this._barObjectV.height); } } if (this._aniObject instanceof GMovieClip) (<GMovieClip><any>(this._aniObject)).frame = Math.round(percent * 100); } protected constructExtension(buffer: ByteBuffer): void { buffer.seek(0, 6); this._titleType = buffer.readByte(); this._reverse = buffer.readBool(); this._titleObject = <GTextField><any>(this.getChild("title")); this._barObjectH = this.getChild("bar"); this._barObjectV = this.getChild("bar_v"); this._aniObject = this.getChild("ani"); if (this._barObjectH) { this._barMaxWidth = this._barObjectH.width; this._barMaxWidthDelta = this.width - this._barMaxWidth; this._barStartX = this._barObjectH.x; } if (this._barObjectV) { this._barMaxHeight = this._barObjectV.height; this._barMaxHeightDelta = this.height - this._barMaxHeight; this._barStartY = this._barObjectV.y; } } protected handleSizeChanged(): void { super.handleSizeChanged(); if (this._barObjectH) this._barMaxWidth = this.width - this._barMaxWidthDelta; if (this._barObjectV) this._barMaxHeight = this.height - this._barMaxHeightDelta; if (!this._underConstruct) this.update(this._value); } public setup_afterAdd(buffer: ByteBuffer, beginPos: number): void { super.setup_afterAdd(buffer, beginPos); if (!buffer.seek(beginPos, 6)) { this.update(this._value); return; } if (buffer.readByte() != this.packageItem.objectType) { this.update(this._value); return; } this._value = buffer.readInt(); this._max = buffer.readInt(); this.update(this._value); } public dispose(): void { if (this._tweening) GTween.kill(this); super.dispose(); } }
linshuhe1/FairyGUI-egret
FairyGUI-egret/src/GProgressBar.ts
TypeScript
MethodDeclaration
public tweenValue(value: number, duration: number): GTweener { if (this._value != value) { if (this._tweening) { GTween.kill(this, false, this.update); this._tweening = false; } var oldValule: number = this._value; this._value = value; this._tweening = true; return GTween.to(oldValule, this._value, duration).setTarget(this, this.update).setEase(EaseType.Linear) .onComplete(function (): void { this._tweening = false; }, this); } else return null; }
linshuhe1/FairyGUI-egret
FairyGUI-egret/src/GProgressBar.ts
TypeScript
MethodDeclaration
public update(newValue: number): void { var percent: number = this._max != 0 ? Math.min(newValue / this._max, 1) : 0; if (this._titleObject) { switch (this._titleType) { case ProgressTitleType.Percent: this._titleObject.text = Math.round(percent * 100) + "%"; break; case ProgressTitleType.ValueAndMax: this._titleObject.text = Math.round(newValue) + "/" + Math.round(this._max); break; case ProgressTitleType.Value: this._titleObject.text = "" + Math.round(newValue); break; case ProgressTitleType.Max: this._titleObject.text = "" + Math.round(this._max); break; } } var fullWidth: number = this.width - this._barMaxWidthDelta; var fullHeight: number = this.height - this._barMaxHeightDelta; if (!this._reverse) { if (this._barObjectH) this._barObjectH.width = Math.round(fullWidth * percent); if (this._barObjectV) this._barObjectV.height = Math.round(fullHeight * percent); } else { if (this._barObjectH) { this._barObjectH.width = Math.round(fullWidth * percent); this._barObjectH.x = this._barStartX + (fullWidth - this._barObjectH.width); } if (this._barObjectV) { this._barObjectV.height = Math.round(fullHeight * percent); this._barObjectV.y = this._barStartY + (fullHeight - this._barObjectV.height); } } if (this._aniObject instanceof GMovieClip) (<GMovieClip><any>(this._aniObject)).frame = Math.round(percent * 100); }
linshuhe1/FairyGUI-egret
FairyGUI-egret/src/GProgressBar.ts
TypeScript
MethodDeclaration
protected constructExtension(buffer: ByteBuffer): void { buffer.seek(0, 6); this._titleType = buffer.readByte(); this._reverse = buffer.readBool(); this._titleObject = <GTextField><any>(this.getChild("title")); this._barObjectH = this.getChild("bar"); this._barObjectV = this.getChild("bar_v"); this._aniObject = this.getChild("ani"); if (this._barObjectH) { this._barMaxWidth = this._barObjectH.width; this._barMaxWidthDelta = this.width - this._barMaxWidth; this._barStartX = this._barObjectH.x; } if (this._barObjectV) { this._barMaxHeight = this._barObjectV.height; this._barMaxHeightDelta = this.height - this._barMaxHeight; this._barStartY = this._barObjectV.y; } }
linshuhe1/FairyGUI-egret
FairyGUI-egret/src/GProgressBar.ts
TypeScript
MethodDeclaration
protected handleSizeChanged(): void { super.handleSizeChanged(); if (this._barObjectH) this._barMaxWidth = this.width - this._barMaxWidthDelta; if (this._barObjectV) this._barMaxHeight = this.height - this._barMaxHeightDelta; if (!this._underConstruct) this.update(this._value); }
linshuhe1/FairyGUI-egret
FairyGUI-egret/src/GProgressBar.ts
TypeScript
MethodDeclaration
public setup_afterAdd(buffer: ByteBuffer, beginPos: number): void { super.setup_afterAdd(buffer, beginPos); if (!buffer.seek(beginPos, 6)) { this.update(this._value); return; } if (buffer.readByte() != this.packageItem.objectType) { this.update(this._value); return; } this._value = buffer.readInt(); this._max = buffer.readInt(); this.update(this._value); }
linshuhe1/FairyGUI-egret
FairyGUI-egret/src/GProgressBar.ts
TypeScript
MethodDeclaration
public dispose(): void { if (this._tweening) GTween.kill(this); super.dispose(); }
linshuhe1/FairyGUI-egret
FairyGUI-egret/src/GProgressBar.ts
TypeScript
ArrowFunction
success => { this.auto = success, this.client = success.client this.coverage = success.coverage }
guaracyalima/webapp_bseg
src/app/bseg/insurances/auto/auto-show/auto-show.component.ts
TypeScript
ArrowFunction
error => console.error('Error to find auto insurance', error)
guaracyalima/webapp_bseg
src/app/bseg/insurances/auto/auto-show/auto-show.component.ts
TypeScript
ClassDeclaration
@Component({ selector: 'app-auto-show', templateUrl: './auto-show.component.html', styleUrls: ['./auto-show.component.css'] }) export class AutoShowComponent implements OnInit { public auto: any; public client: any; public coverage: any; constructor(private _db: AutoService, private _router: Router, private _route: ActivatedRoute) { } ngOnInit() { this.show(this._route.snapshot.params['id']) } public show(id: number) { this._db.show(id) .subscribe(success => { this.auto = success, this.client = success.client this.coverage = success.coverage }, error => console.error('Error to find auto insurance', error)) } }
guaracyalima/webapp_bseg
src/app/bseg/insurances/auto/auto-show/auto-show.component.ts
TypeScript