type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
TypeAliasDeclaration
/** @public */ export type IToken = | ITokenLiteral | ((theme: ITheme) => ITokenLiteral) | ITokenResolver;
JasonVMo/fluent-ui-react-staging-1
packages/react-theming/src/theme.types.ts
TypeScript
TypeAliasDeclaration
/** @public */ export type IResolvedTokens<TTokens> = { [key in keyof TTokens]: ITokenLiteral; };
JasonVMo/fluent-ui-react-staging-1
packages/react-theming/src/theme.types.ts
TypeScript
TypeAliasDeclaration
type IComponentOverrides = { tokens?: any; styles?: any; slots?: any; };
JasonVMo/fluent-ui-react-staging-1
packages/react-theming/src/theme.types.ts
TypeScript
TypeAliasDeclaration
type IComponentOverrideGroup = { [componentName: string]: IComponentOverrides };
JasonVMo/fluent-ui-react-staging-1
packages/react-theming/src/theme.types.ts
TypeScript
TypeAliasDeclaration
export type IThemeColorDefinition = { background: IColor; bodyText: IColor; subText: IColor; disabledText: IColor; brand: IColorRamp; accent: IColorRamp; neutral: IColorRamp; success: IColorRamp; warning: IColorRamp; danger: IColorRamp; [key: string]: IColorRamp | string; };
JasonVMo/fluent-ui-react-staging-1
packages/react-theming/src/theme.types.ts
TypeScript
TypeAliasDeclaration
export type DeepPartial<T> = { [key in keyof T]?: { [key2 in keyof T[key]]?: T[key][key2]; }; };
JasonVMo/fluent-ui-react-staging-1
packages/react-theming/src/theme.types.ts
TypeScript
TypeAliasDeclaration
export type IPartialTheme = DeepPartial<Omit<ITheme, "schemes">> & { schemes?: { [key: string]: IPartialTheme; }; };
JasonVMo/fluent-ui-react-staging-1
packages/react-theming/src/theme.types.ts
TypeScript
ClassDeclaration
@Module({ imports: [], controllers: [AppController, TodoController], providers: [AppService, SearchTodoService], }) export class AppModule {}
LauNic/search-todo-app
src/app.module.ts
TypeScript
ArrowFunction
(bill: number) => {}
Tooni/CAScript-Artifact
case-studies/OnlineWallet/client/src/StateContext.tsx
TypeScript
ArrowFunction
(newInfo: string) => {}
Tooni/CAScript-Artifact
case-studies/OnlineWallet/client/src/StateContext.tsx
TypeScript
ArrowFunction
loggedIn => { if (loggedIn) { this.api.getPrices() .subscribe(res => { this.cryptos = res; }); this._getTvshows(); this._getProducts(); this.api.dailyForecast() .subscribe(res => { console.log(res); }); } else { this.tvshows = null; this._destroyTvshowsSubscription(); this.products = null; this._destroyProductsSubscription(); } }
beemit/Piggyback
src/app/home/home.component.ts
TypeScript
ArrowFunction
res => { this.cryptos = res; }
beemit/Piggyback
src/app/home/home.component.ts
TypeScript
ArrowFunction
res => { console.log(res); }
beemit/Piggyback
src/app/home/home.component.ts
TypeScript
ArrowFunction
data => { this.tvshows = data; }
beemit/Piggyback
src/app/home/home.component.ts
TypeScript
ArrowFunction
err => console.warn(err)
beemit/Piggyback
src/app/home/home.component.ts
TypeScript
ArrowFunction
() => console.log('Request complete')
beemit/Piggyback
src/app/home/home.component.ts
TypeScript
ArrowFunction
data => { this.products = data['products']; console.log(name); }
beemit/Piggyback
src/app/home/home.component.ts
TypeScript
ArrowFunction
() => console.log('Product Request complete')
beemit/Piggyback
src/app/home/home.component.ts
TypeScript
ClassDeclaration
@Component({ moduleId: module.id, selector: 'app-home', templateUrl: './home.component.html', styleUrls: ['./home.component.css'] }) export class HomeComponent implements OnInit, OnDestroy { objectKeys = Object.keys; cryptos: any; tvshows: any[]; name: any; price: any; authSubscription: Subscription; tvshowsSubscription: Subscription; products: any; productsSubscription: Subscription; chart = []; // This will hold our chart info city = []; country = []; currentWeather = []; constructor( private api: ApiService, public auth: AuthService) { } ngOnInit() { // Subscribe to login status subject // If authenticated, subscribe to tvshows data observable // If not authenticated, unsubscribe from tvshows data this.authSubscription = this.auth.loggedIn$. subscribe(loggedIn => { if (loggedIn) { this.api.getPrices() .subscribe(res => { this.cryptos = res; }); this._getTvshows(); this._getProducts(); this.api.dailyForecast() .subscribe(res => { console.log(res); }); } else { this.tvshows = null; this._destroyTvshowsSubscription(); this.products = null; this._destroyProductsSubscription(); } }); } ngOnDestroy() { // Unsubscribe from observables this.authSubscription.unsubscribe(); this._destroyTvshowsSubscription(); this._destroyProductsSubscription(); } private _getTvshows() { // Subscribe to tvshows API observable this.tvshowsSubscription = this.api.getTvshows$() .subscribe( data => { this.tvshows = data; }, err => console.warn(err), () => console.log('Request complete') ); } private _destroyTvshowsSubscription() { // If a tvshows subscription exists, unsubscribe if (this.tvshowsSubscription) { this.tvshowsSubscription.unsubscribe(); } } get tvshowsExist() { return !!this.tvshows && this.tvshows.length; } private _getProducts() { // Subscribe to products API observable this.productsSubscription = this.api.getProducts$() .subscribe( data => { this.products = data['products']; console.log(name); }, err => console.warn(err), () => console.log('Product Request complete') ); } private _destroyProductsSubscription() { // If a products subscription exists, unsubscribe if (this.productsSubscription) { this.productsSubscription.unsubscribe(); } } get productsExist() { return !!this.products && this.products.length; } }
beemit/Piggyback
src/app/home/home.component.ts
TypeScript
MethodDeclaration
ngOnInit() { // Subscribe to login status subject // If authenticated, subscribe to tvshows data observable // If not authenticated, unsubscribe from tvshows data this.authSubscription = this.auth.loggedIn$. subscribe(loggedIn => { if (loggedIn) { this.api.getPrices() .subscribe(res => { this.cryptos = res; }); this._getTvshows(); this._getProducts(); this.api.dailyForecast() .subscribe(res => { console.log(res); }); } else { this.tvshows = null; this._destroyTvshowsSubscription(); this.products = null; this._destroyProductsSubscription(); } }); }
beemit/Piggyback
src/app/home/home.component.ts
TypeScript
MethodDeclaration
ngOnDestroy() { // Unsubscribe from observables this.authSubscription.unsubscribe(); this._destroyTvshowsSubscription(); this._destroyProductsSubscription(); }
beemit/Piggyback
src/app/home/home.component.ts
TypeScript
MethodDeclaration
private _getTvshows() { // Subscribe to tvshows API observable this.tvshowsSubscription = this.api.getTvshows$() .subscribe( data => { this.tvshows = data; }, err => console.warn(err), () => console.log('Request complete') ); }
beemit/Piggyback
src/app/home/home.component.ts
TypeScript
MethodDeclaration
private _destroyTvshowsSubscription() { // If a tvshows subscription exists, unsubscribe if (this.tvshowsSubscription) { this.tvshowsSubscription.unsubscribe(); } }
beemit/Piggyback
src/app/home/home.component.ts
TypeScript
MethodDeclaration
private _getProducts() { // Subscribe to products API observable this.productsSubscription = this.api.getProducts$() .subscribe( data => { this.products = data['products']; console.log(name); }, err => console.warn(err), () => console.log('Product Request complete') ); }
beemit/Piggyback
src/app/home/home.component.ts
TypeScript
MethodDeclaration
private _destroyProductsSubscription() { // If a products subscription exists, unsubscribe if (this.productsSubscription) { this.productsSubscription.unsubscribe(); } }
beemit/Piggyback
src/app/home/home.component.ts
TypeScript
ClassDeclaration
/** * https://standards.buildingsmart.org/IFC/RELEASE/IFC4/ADD2/HTML/link/ifcmechanicalfastenertype.htm */ export class IfcMechanicalFastenerType extends IfcElementComponentType { PredefinedType : IfcMechanicalFastenerTypeEnum NominalDiameter : IfcPositiveLengthMeasure // optional NominalLength : IfcPositiveLengthMeasure // optional constructor(globalId : IfcGloballyUniqueId, predefinedType : IfcMechanicalFastenerTypeEnum) { super(globalId) this.PredefinedType = predefinedType } getStepParameters() : string { var parameters = new Array<string>(); parameters.push(BaseIfc.toStepValue(this.GlobalId)) parameters.push(BaseIfc.toStepValue(this.OwnerHistory)) parameters.push(BaseIfc.toStepValue(this.Name)) parameters.push(BaseIfc.toStepValue(this.Description)) parameters.push(BaseIfc.toStepValue(this.ApplicableOccurrence)) parameters.push(BaseIfc.toStepValue(this.HasPropertySets)) parameters.push(BaseIfc.toStepValue(this.RepresentationMaps)) parameters.push(BaseIfc.toStepValue(this.Tag)) parameters.push(BaseIfc.toStepValue(this.ElementType)) parameters.push(BaseIfc.toStepValue(this.PredefinedType)) parameters.push(BaseIfc.toStepValue(this.NominalDiameter)) parameters.push(BaseIfc.toStepValue(this.NominalLength)) return parameters.join(); } }
Tamu/IFC-gen
lang/typescript/src/IfcMechanicalFastenerType.g.ts
TypeScript
MethodDeclaration
getStepParameters() : string { var parameters = new Array<string>(); parameters.push(BaseIfc.toStepValue(this.GlobalId)) parameters.push(BaseIfc.toStepValue(this.OwnerHistory)) parameters.push(BaseIfc.toStepValue(this.Name)) parameters.push(BaseIfc.toStepValue(this.Description)) parameters.push(BaseIfc.toStepValue(this.ApplicableOccurrence)) parameters.push(BaseIfc.toStepValue(this.HasPropertySets)) parameters.push(BaseIfc.toStepValue(this.RepresentationMaps)) parameters.push(BaseIfc.toStepValue(this.Tag)) parameters.push(BaseIfc.toStepValue(this.ElementType)) parameters.push(BaseIfc.toStepValue(this.PredefinedType)) parameters.push(BaseIfc.toStepValue(this.NominalDiameter)) parameters.push(BaseIfc.toStepValue(this.NominalLength)) return parameters.join(); }
Tamu/IFC-gen
lang/typescript/src/IfcMechanicalFastenerType.g.ts
TypeScript
ClassDeclaration
class Test { public static test() { console.log("hej") } }
johandanforth/dotnet-patterns
mvc.ts.di/wwwroot/ts/DiTest.ts
TypeScript
MethodDeclaration
public static test() { console.log("hej") }
johandanforth/dotnet-patterns
mvc.ts.di/wwwroot/ts/DiTest.ts
TypeScript
ArrowFunction
(result) => { this.allPokemonByType = result.pokemon; }
B-Kooijman/pokemon-cards
src/components/molecules/pokemon-types/pokemon-types.tsx
TypeScript
ArrowFunction
(error) => { console.error(`Something went wrong!: ${error.message}`) }
B-Kooijman/pokemon-cards
src/components/molecules/pokemon-types/pokemon-types.tsx
TypeScript
ArrowFunction
({ type }) => { return ( <button onClick={() => this.clickHandler(type.name)}
B-Kooijman/pokemon-cards
src/components/molecules/pokemon-types/pokemon-types.tsx
TypeScript
ArrowFunction
i => { return ( <pokemon-link text={i.pokemon.name} url={`/profile/${i.pokemon.name}`}
B-Kooijman/pokemon-cards
src/components/molecules/pokemon-types/pokemon-types.tsx
TypeScript
ClassDeclaration
@Component({ tag: 'pokemon-types', styleUrl: 'pokemon-types.css', shadow: true, }) export class PokemonTypes { @State() allPokemonByType: PokemonTypeItem[]; /** the pokemon types */ @Prop() types!: PokemonType[] async clickHandler(name) { await getPokemonByType(name) .then((result) => { this.allPokemonByType = result.pokemon; }).catch((error) => { console.error(`Something went wrong!: ${error.message}`) }) } render() { return ( <div> <h3>Types</h3> <div class="type_buttons"> {this.types.map(({ type }) => { return ( <button onClick={() => this.clickHandler(type.name)}> {type.name} </button> ) })}
B-Kooijman/pokemon-cards
src/components/molecules/pokemon-types/pokemon-types.tsx
TypeScript
MethodDeclaration
async clickHandler(name) { await getPokemonByType(name) .then((result) => { this.allPokemonByType = result.pokemon; }).catch((error) => { console.error(`Something went wrong!: ${error.message}`) }) }
B-Kooijman/pokemon-cards
src/components/molecules/pokemon-types/pokemon-types.tsx
TypeScript
MethodDeclaration
render() { return ( <div> <h3>Types</h3> <div class="type_buttons"> {this.types.map(({ type }) => { return ( <button onClick={() => this.clickHandler(type.name)}> {type.name} </button> ) })}
B-Kooijman/pokemon-cards
src/components/molecules/pokemon-types/pokemon-types.tsx
TypeScript
MethodDeclaration
isEncrypted(): boolean { return ( getPathMatchedKeys(this.$themeConfig.encrypt, this.article.path) .length !== 0 || Boolean(this.article.frontmatter.password) ); }
dimaslanjaka/vuepress-theme-hope
packages/theme/components/Blog/ArticleItem.ts
TypeScript
InterfaceDeclaration
// Simple export interface Group { GroupID?: number GroupName?: string }
Genesis-Organisation/GenesisAPI
src/types/sciences.ts
TypeScript
InterfaceDeclaration
export interface Science { Group?: number ScienceID?: number ScienceName?: string }
Genesis-Organisation/GenesisAPI
src/types/sciences.ts
TypeScript
InterfaceDeclaration
export interface Branch { Science?: number BranchID?: number BranchName?: string Desc?: string }
Genesis-Organisation/GenesisAPI
src/types/sciences.ts
TypeScript
InterfaceDeclaration
export interface Subject { Science?: number Branch?: number SubjectID?: number SubjectName?: string }
Genesis-Organisation/GenesisAPI
src/types/sciences.ts
TypeScript
InterfaceDeclaration
export interface Formula { Subject?: number ID?: number Name?: string Content?: string Difficulty?: number Unit?: string Quantities?: Quantity | Quantity[] }
Genesis-Organisation/GenesisAPI
src/types/sciences.ts
TypeScript
InterfaceDeclaration
// Objects export interface ScienceObject { ScienceName?: string ScienceID?: number Group?: { _id?: string GroupID?: number GroupName?: string } }
Genesis-Organisation/GenesisAPI
src/types/sciences.ts
TypeScript
InterfaceDeclaration
export interface BranchObject { BranchName?: string BranchID?: number Science?: ScienceObject Subjects?: SubjectObject[] | (Subject & { _id: string })[] }
Genesis-Organisation/GenesisAPI
src/types/sciences.ts
TypeScript
InterfaceDeclaration
export interface SubjectObject { Branch?: number SubjectName?: string SubjectID?: number Formulas?: Formula[] }
Genesis-Organisation/GenesisAPI
src/types/sciences.ts
TypeScript
InterfaceDeclaration
interface Quantity { Symbol?: string Content?: string }
Genesis-Organisation/GenesisAPI
src/types/sciences.ts
TypeScript
ArrowFunction
(la) => la.id === newMessage.room_id
prettydev/grocery-master-api
src/exhibits/exhibits.service.ts
TypeScript
ClassDeclaration
@Injectable() export class ExhibitsService { public live_auctions: IAuction[]; public psuedo_auto_users: IUser[]; private readonly logger = new Logger(ExhibitsService.name); constructor( @InjectModel("User") private readonly userModel: Model<IUser>, @InjectModel("Message") private readonly messageModel: Model<IMessage>, @InjectModel("Login") private readonly loginModel: Model<ILogin>, @Inject("PUB_SUB") private pubSub: PubSub, private usersService: UsersService, private notesService: NotesService, private httpService: HttpService, ) { } sendWinnerNote(auction: IAuction): void { const content = `You winned the auction. Please check here. ${process.env.SITE_URL}auctions/${auction.id}`; // need to fix "completed when uncomment above comments" try { this.pubSub.publish("privateNoteUpdated", { privateNoteUpdated: { title: "winner", content, receiver: auction.bidders[0].user.id, }, }); } catch (e) { console.log("exception private notedata....", e); } } getFilter(filter: Filter): any { const filterQuery = filter.cat === "All" ? { "product.title": { $regex: filter.key, $options: "i" }, } : { "product.title": { $regex: filter.key, $options: "i" }, "product.category": filter.cat, }; return filterQuery; } getSort(filter: Filter): any { let sortQuery = {}; if (filter.sort === "latest") sortQuery = { created_at: -1 }; else if (filter.sort === "oldest") sortQuery = { created_at: 1 }; else if (filter.sort === "highest") sortQuery = { "product.price": -1 }; else if (filter.sort === "lowest") sortQuery = { "product.price": 1 }; else if (filter.sort === "most") sortQuery = { fund_percent: -1 }; else if (filter.sort === "fewest") sortQuery = { fund_percent: 1 }; else if (filter.sort === "soon") sortQuery = { timer: 1 }; else if (filter.sort === "manual") sortQuery = { manual: 1 }; return sortQuery; } async addToChatters(newMessage: IMessage): Promise<void> { const chat_auction = this.live_auctions.filter( (la) => la.id === newMessage.room_id, )[0]; if (chat_auction && !chat_auction.chatters.includes(newMessage.user_id)) { chat_auction.chatters.push(newMessage.user_id); this.pubSub.publish("auctionUpdated", { auctionUpdated: { auction: chat_auction, timestamp: new Date().getTime() } }); } } async createMessage(newMessageInput: MessageInput): Promise<boolean> { const messageModel = new this.messageModel(newMessageInput); const newMessage = await messageModel.save(); this.addToChatters(newMessage); return newMessage ? true : false; } async findMessages(): Promise<IMessage[]> { const messages = await this.messageModel.find({}).exec(); return messages; } }
prettydev/grocery-master-api
src/exhibits/exhibits.service.ts
TypeScript
MethodDeclaration
sendWinnerNote(auction: IAuction): void { const content = `You winned the auction. Please check here. ${process.env.SITE_URL}auctions/${auction.id}`; // need to fix "completed when uncomment above comments" try { this.pubSub.publish("privateNoteUpdated", { privateNoteUpdated: { title: "winner", content, receiver: auction.bidders[0].user.id, }, }); } catch (e) { console.log("exception private notedata....", e); } }
prettydev/grocery-master-api
src/exhibits/exhibits.service.ts
TypeScript
MethodDeclaration
getFilter(filter: Filter): any { const filterQuery = filter.cat === "All" ? { "product.title": { $regex: filter.key, $options: "i" }, } : { "product.title": { $regex: filter.key, $options: "i" }, "product.category": filter.cat, }; return filterQuery; }
prettydev/grocery-master-api
src/exhibits/exhibits.service.ts
TypeScript
MethodDeclaration
getSort(filter: Filter): any { let sortQuery = {}; if (filter.sort === "latest") sortQuery = { created_at: -1 }; else if (filter.sort === "oldest") sortQuery = { created_at: 1 }; else if (filter.sort === "highest") sortQuery = { "product.price": -1 }; else if (filter.sort === "lowest") sortQuery = { "product.price": 1 }; else if (filter.sort === "most") sortQuery = { fund_percent: -1 }; else if (filter.sort === "fewest") sortQuery = { fund_percent: 1 }; else if (filter.sort === "soon") sortQuery = { timer: 1 }; else if (filter.sort === "manual") sortQuery = { manual: 1 }; return sortQuery; }
prettydev/grocery-master-api
src/exhibits/exhibits.service.ts
TypeScript
MethodDeclaration
async addToChatters(newMessage: IMessage): Promise<void> { const chat_auction = this.live_auctions.filter( (la) => la.id === newMessage.room_id, )[0]; if (chat_auction && !chat_auction.chatters.includes(newMessage.user_id)) { chat_auction.chatters.push(newMessage.user_id); this.pubSub.publish("auctionUpdated", { auctionUpdated: { auction: chat_auction, timestamp: new Date().getTime() } }); } }
prettydev/grocery-master-api
src/exhibits/exhibits.service.ts
TypeScript
MethodDeclaration
async createMessage(newMessageInput: MessageInput): Promise<boolean> { const messageModel = new this.messageModel(newMessageInput); const newMessage = await messageModel.save(); this.addToChatters(newMessage); return newMessage ? true : false; }
prettydev/grocery-master-api
src/exhibits/exhibits.service.ts
TypeScript
MethodDeclaration
async findMessages(): Promise<IMessage[]> { const messages = await this.messageModel.find({}).exec(); return messages; }
prettydev/grocery-master-api
src/exhibits/exhibits.service.ts
TypeScript
FunctionDeclaration
export declare function getSemanticTokenLegend(): { types: string[]; modifiers: string[]; };
mr-chetan/vscode-intelephense
node_modules/@bmewburn/vscode-html-languageserver/out/modes/javascriptSemanticTokens.d.ts
TypeScript
FunctionDeclaration
export declare function getSemanticTokens(jsLanguageService: ts.LanguageService, currentTextDocument: TextDocument, fileName: string): SemanticTokenData[];
mr-chetan/vscode-intelephense
node_modules/@bmewburn/vscode-html-languageserver/out/modes/javascriptSemanticTokens.d.ts
TypeScript
EnumDeclaration
export declare const enum TokenType { class = 0, enum = 1, interface = 2, namespace = 3, typeParameter = 4, type = 5, parameter = 6, variable = 7, property = 8, function = 9, method = 10, _ = 11 }
mr-chetan/vscode-intelephense
node_modules/@bmewburn/vscode-html-languageserver/out/modes/javascriptSemanticTokens.d.ts
TypeScript
EnumDeclaration
export declare const enum TokenModifier { declaration = 0, static = 1, async = 2, readonly = 3, _ = 4 }
mr-chetan/vscode-intelephense
node_modules/@bmewburn/vscode-html-languageserver/out/modes/javascriptSemanticTokens.d.ts
TypeScript
ClassDeclaration
/** Class representing a MeshSecret. */ export class MeshSecret { private readonly client: ServiceFabricClientContext; /** * Create a MeshSecret. * @param {ServiceFabricClientContext} client Reference to the service client. */ constructor(client: ServiceFabricClientContext) { this.client = client; } /** * Creates a Secret resource with the specified name, description and properties. If Secret * resource with the same name exists, then it is updated with the specified description and * properties. Once created, the kind and contentType of a secret resource cannot be updated. * @summary Creates or updates a Secret resource. * @param secretResourceName The name of the secret resource. * @param secretResourceDescription Description for creating a secret resource. * @param [options] The optional parameters * @returns Promise<Models.MeshSecretCreateOrUpdateResponse> */ createOrUpdate(secretResourceName: string, secretResourceDescription: Models.SecretResourceDescription, options?: msRest.RequestOptionsBase): Promise<Models.MeshSecretCreateOrUpdateResponse>; /** * @param secretResourceName The name of the secret resource. * @param secretResourceDescription Description for creating a secret resource. * @param callback The callback */ createOrUpdate(secretResourceName: string, secretResourceDescription: Models.SecretResourceDescription, callback: msRest.ServiceCallback<Models.SecretResourceDescription>): void; /** * @param secretResourceName The name of the secret resource. * @param secretResourceDescription Description for creating a secret resource. * @param options The optional parameters * @param callback The callback */ createOrUpdate(secretResourceName: string, secretResourceDescription: Models.SecretResourceDescription, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.SecretResourceDescription>): void; createOrUpdate(secretResourceName: string, secretResourceDescription: Models.SecretResourceDescription, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.SecretResourceDescription>, callback?: msRest.ServiceCallback<Models.SecretResourceDescription>): Promise<Models.MeshSecretCreateOrUpdateResponse> { return this.client.sendOperationRequest( { secretResourceName, secretResourceDescription, options }, createOrUpdateOperationSpec, callback) as Promise<Models.MeshSecretCreateOrUpdateResponse>; } /** * Gets the information about the Secret resource with the given name. The information include the * description and other properties of the Secret. * @summary Gets the Secret resource with the given name. * @param secretResourceName The name of the secret resource. * @param [options] The optional parameters * @returns Promise<Models.MeshSecretGetResponse> */ get(secretResourceName: string, options?: msRest.RequestOptionsBase): Promise<Models.MeshSecretGetResponse>; /** * @param secretResourceName The name of the secret resource. * @param callback The callback */ get(secretResourceName: string, callback: msRest.ServiceCallback<Models.SecretResourceDescription>): void; /** * @param secretResourceName The name of the secret resource. * @param options The optional parameters * @param callback The callback */ get(secretResourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.SecretResourceDescription>): void; get(secretResourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.SecretResourceDescription>, callback?: msRest.ServiceCallback<Models.SecretResourceDescription>): Promise<Models.MeshSecretGetResponse> { return this.client.sendOperationRequest( { secretResourceName, options }, getOperationSpec, callback) as Promise<Models.MeshSecretGetResponse>; } /** * Deletes the specified Secret resource and all of its named values. * @summary Deletes the Secret resource. * @param secretResourceName The name of the secret resource. * @param [options] The optional parameters * @returns Promise<msRest.RestResponse> */ deleteMethod(secretResourceName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse>; /** * @param secretResourceName The name of the secret resource. * @param callback The callback */ deleteMethod(secretResourceName: string, callback: msRest.ServiceCallback<void>): void; /** * @param secretResourceName The name of the secret resource. * @param options The optional parameters * @param callback The callback */ deleteMethod(secretResourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<void>): void; deleteMethod(secretResourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<void>, callback?: msRest.ServiceCallback<void>): Promise<msRest.RestResponse> { return this.client.sendOperationRequest( { secretResourceName, options }, deleteMethodOperationSpec, callback); } /** * Gets the information about all secret resources in a given resource group. The information * include the description and other properties of the Secret. * @summary Lists all the secret resources. * @param [options] The optional parameters * @returns Promise<Models.MeshSecretListResponse> */ list(options?: msRest.RequestOptionsBase): Promise<Models.MeshSecretListResponse>; /** * @param callback The callback */ list(callback: msRest.ServiceCallback<Models.PagedSecretResourceDescriptionList>): void; /** * @param options The optional parameters * @param callback The callback */ list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PagedSecretResourceDescriptionList>): void; list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PagedSecretResourceDescriptionList>, callback?: msRest.ServiceCallback<Models.PagedSecretResourceDescriptionList>): Promise<Models.MeshSecretListResponse> { return this.client.sendOperationRequest( { options }, listOperationSpec, callback) as Promise<Models.MeshSecretListResponse>; } }
VladimirDomnich/azure-sdk-for-js
sdk/servicefabric/servicefabric/src/operations/meshSecret.ts
TypeScript
MethodDeclaration
/** * Creates a Secret resource with the specified name, description and properties. If Secret * resource with the same name exists, then it is updated with the specified description and * properties. Once created, the kind and contentType of a secret resource cannot be updated. * @summary Creates or updates a Secret resource. * @param secretResourceName The name of the secret resource. * @param secretResourceDescription Description for creating a secret resource. * @param [options] The optional parameters * @returns Promise<Models.MeshSecretCreateOrUpdateResponse> */ createOrUpdate(secretResourceName: string, secretResourceDescription: Models.SecretResourceDescription, options?: msRest.RequestOptionsBase): Promise<Models.MeshSecretCreateOrUpdateResponse>;
VladimirDomnich/azure-sdk-for-js
sdk/servicefabric/servicefabric/src/operations/meshSecret.ts
TypeScript
MethodDeclaration
/** * @param secretResourceName The name of the secret resource. * @param secretResourceDescription Description for creating a secret resource. * @param callback The callback */ createOrUpdate(secretResourceName: string, secretResourceDescription: Models.SecretResourceDescription, callback: msRest.ServiceCallback<Models.SecretResourceDescription>): void;
VladimirDomnich/azure-sdk-for-js
sdk/servicefabric/servicefabric/src/operations/meshSecret.ts
TypeScript
MethodDeclaration
/** * @param secretResourceName The name of the secret resource. * @param secretResourceDescription Description for creating a secret resource. * @param options The optional parameters * @param callback The callback */ createOrUpdate(secretResourceName: string, secretResourceDescription: Models.SecretResourceDescription, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.SecretResourceDescription>): void;
VladimirDomnich/azure-sdk-for-js
sdk/servicefabric/servicefabric/src/operations/meshSecret.ts
TypeScript
MethodDeclaration
createOrUpdate(secretResourceName: string, secretResourceDescription: Models.SecretResourceDescription, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.SecretResourceDescription>, callback?: msRest.ServiceCallback<Models.SecretResourceDescription>): Promise<Models.MeshSecretCreateOrUpdateResponse> { return this.client.sendOperationRequest( { secretResourceName, secretResourceDescription, options }, createOrUpdateOperationSpec, callback) as Promise<Models.MeshSecretCreateOrUpdateResponse>; }
VladimirDomnich/azure-sdk-for-js
sdk/servicefabric/servicefabric/src/operations/meshSecret.ts
TypeScript
MethodDeclaration
/** * Gets the information about the Secret resource with the given name. The information include the * description and other properties of the Secret. * @summary Gets the Secret resource with the given name. * @param secretResourceName The name of the secret resource. * @param [options] The optional parameters * @returns Promise<Models.MeshSecretGetResponse> */ get(secretResourceName: string, options?: msRest.RequestOptionsBase): Promise<Models.MeshSecretGetResponse>;
VladimirDomnich/azure-sdk-for-js
sdk/servicefabric/servicefabric/src/operations/meshSecret.ts
TypeScript
MethodDeclaration
/** * @param secretResourceName The name of the secret resource. * @param callback The callback */ get(secretResourceName: string, callback: msRest.ServiceCallback<Models.SecretResourceDescription>): void;
VladimirDomnich/azure-sdk-for-js
sdk/servicefabric/servicefabric/src/operations/meshSecret.ts
TypeScript
MethodDeclaration
/** * @param secretResourceName The name of the secret resource. * @param options The optional parameters * @param callback The callback */ get(secretResourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.SecretResourceDescription>): void;
VladimirDomnich/azure-sdk-for-js
sdk/servicefabric/servicefabric/src/operations/meshSecret.ts
TypeScript
MethodDeclaration
get(secretResourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.SecretResourceDescription>, callback?: msRest.ServiceCallback<Models.SecretResourceDescription>): Promise<Models.MeshSecretGetResponse> { return this.client.sendOperationRequest( { secretResourceName, options }, getOperationSpec, callback) as Promise<Models.MeshSecretGetResponse>; }
VladimirDomnich/azure-sdk-for-js
sdk/servicefabric/servicefabric/src/operations/meshSecret.ts
TypeScript
MethodDeclaration
/** * Deletes the specified Secret resource and all of its named values. * @summary Deletes the Secret resource. * @param secretResourceName The name of the secret resource. * @param [options] The optional parameters * @returns Promise<msRest.RestResponse> */ deleteMethod(secretResourceName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse>;
VladimirDomnich/azure-sdk-for-js
sdk/servicefabric/servicefabric/src/operations/meshSecret.ts
TypeScript
MethodDeclaration
/** * @param secretResourceName The name of the secret resource. * @param callback The callback */ deleteMethod(secretResourceName: string, callback: msRest.ServiceCallback<void>): void;
VladimirDomnich/azure-sdk-for-js
sdk/servicefabric/servicefabric/src/operations/meshSecret.ts
TypeScript
MethodDeclaration
/** * @param secretResourceName The name of the secret resource. * @param options The optional parameters * @param callback The callback */ deleteMethod(secretResourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<void>): void;
VladimirDomnich/azure-sdk-for-js
sdk/servicefabric/servicefabric/src/operations/meshSecret.ts
TypeScript
MethodDeclaration
deleteMethod(secretResourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<void>, callback?: msRest.ServiceCallback<void>): Promise<msRest.RestResponse> { return this.client.sendOperationRequest( { secretResourceName, options }, deleteMethodOperationSpec, callback); }
VladimirDomnich/azure-sdk-for-js
sdk/servicefabric/servicefabric/src/operations/meshSecret.ts
TypeScript
MethodDeclaration
/** * Gets the information about all secret resources in a given resource group. The information * include the description and other properties of the Secret. * @summary Lists all the secret resources. * @param [options] The optional parameters * @returns Promise<Models.MeshSecretListResponse> */ list(options?: msRest.RequestOptionsBase): Promise<Models.MeshSecretListResponse>;
VladimirDomnich/azure-sdk-for-js
sdk/servicefabric/servicefabric/src/operations/meshSecret.ts
TypeScript
MethodDeclaration
/** * @param callback The callback */ list(callback: msRest.ServiceCallback<Models.PagedSecretResourceDescriptionList>): void;
VladimirDomnich/azure-sdk-for-js
sdk/servicefabric/servicefabric/src/operations/meshSecret.ts
TypeScript
MethodDeclaration
/** * @param options The optional parameters * @param callback The callback */ list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PagedSecretResourceDescriptionList>): void;
VladimirDomnich/azure-sdk-for-js
sdk/servicefabric/servicefabric/src/operations/meshSecret.ts
TypeScript
MethodDeclaration
list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PagedSecretResourceDescriptionList>, callback?: msRest.ServiceCallback<Models.PagedSecretResourceDescriptionList>): Promise<Models.MeshSecretListResponse> { return this.client.sendOperationRequest( { options }, listOperationSpec, callback) as Promise<Models.MeshSecretListResponse>; }
VladimirDomnich/azure-sdk-for-js
sdk/servicefabric/servicefabric/src/operations/meshSecret.ts
TypeScript
FunctionDeclaration
async function bootstrap() { const appPort = process.env.APP_PORT; const app = await NestFactory.create(AppModule); app.useGlobalPipes(new ValidationPipe()); app.enableCors({ origin: process.env.CLIENT_URL, }); await app.listen(appPort); }
triskacode/belajar-nest
src/main.ts
TypeScript
ArrowFunction
(clusterHealth: ClusterHealth) => { const nodesHealthStateCount = HealthUtils.getHealthStateCount(clusterHealth.raw, HealthStatisticsEntityKind.Node); this.nodesDashboard = DashboardViewModel.fromHealthStateCount('Nodes', 'Node', true, nodesHealthStateCount, this.data.routes, RoutesService.getNodesViewPath()); const appsHealthStateCount = HealthUtils.getHealthStateCount(clusterHealth.raw, HealthStatisticsEntityKind.Application); this.appsDashboard = DashboardViewModel.fromHealthStateCount('Applications', 'Application', true, appsHealthStateCount, this.data.routes, RoutesService.getAppsViewPath()); const servicesHealthStateCount = HealthUtils.getHealthStateCount(clusterHealth.raw, HealthStatisticsEntityKind.Service); this.servicesDashboard = DashboardViewModel.fromHealthStateCount('Services', 'Service', false, servicesHealthStateCount); const partitionsDashboard = HealthUtils.getHealthStateCount(clusterHealth.raw, HealthStatisticsEntityKind.Partition); this.partitionsDashboard = DashboardViewModel.fromHealthStateCount('Partitions', 'Partition', false, partitionsDashboard); const replicasHealthStateCount = HealthUtils.getHealthStateCount(clusterHealth.raw, HealthStatisticsEntityKind.Replica); this.replicasDashboard = DashboardViewModel.fromHealthStateCount('Replicas', 'Replica', false, replicasHealthStateCount); clusterHealth.checkExpiredCertStatus(); }
Azure/service-fabric-explorer
src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts
TypeScript
ArrowFunction
apps => { this.upgradeAppsCount = apps.collection.filter(app => app.isUpgrading).length; }
Azure/service-fabric-explorer
src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts
TypeScript
ArrowFunction
app => app.isUpgrading
Azure/service-fabric-explorer
src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts
TypeScript
ArrowFunction
() => {this.updateItemInEssentials(); }
Azure/service-fabric-explorer
src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts
TypeScript
ArrowFunction
err => of(null)
Azure/service-fabric-explorer
src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts
TypeScript
ArrowFunction
(manifest) => { if (manifest.isRepairManagerEnabled) { return this.repairtaskCollection.refresh(messageHandler); }else{ return of(null); } }
Azure/service-fabric-explorer
src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts
TypeScript
ArrowFunction
() => { this.updateItemInEssentials(); }
Azure/service-fabric-explorer
src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts
TypeScript
ClassDeclaration
@Component({ selector: 'app-essentials', templateUrl: './essentials.component.html', styleUrls: ['./essentials.component.scss'] }) export class EssentialsComponent extends BaseControllerDirective { clusterUpgradeProgress: ClusterUpgradeProgress; nodes: NodeCollection; clusterHealth: ClusterHealth; systemApp: SystemApplication; clusterManifest: ClusterManifest; repairtaskCollection: RepairTaskCollection; nodesDashboard: IDashboardViewModel; appsDashboard: IDashboardViewModel; servicesDashboard: IDashboardViewModel; partitionsDashboard: IDashboardViewModel; replicasDashboard: IDashboardViewModel; upgradesDashboard: IDashboardViewModel; upgradeAppsCount = 0; essentialItems: IEssentialListItem[] = []; constructor(public data: DataService, public injector: Injector, public settings: SettingsService, private routes: RoutesService) { super(injector); } setup() { this.clusterHealth = this.data.getClusterHealth(HealthStateFilterFlags.Default, HealthStateFilterFlags.None, HealthStateFilterFlags.None); this.clusterUpgradeProgress = this.data.clusterUpgradeProgress; this.nodes = this.data.nodes; this.systemApp = this.data.systemApp; this.repairtaskCollection = this.data.repairCollection; } refresh(messageHandler?: IResponseMessageHandler): Observable<any> { return forkJoin([ this.clusterHealth.refresh(messageHandler).pipe(map((clusterHealth: ClusterHealth) => { const nodesHealthStateCount = HealthUtils.getHealthStateCount(clusterHealth.raw, HealthStatisticsEntityKind.Node); this.nodesDashboard = DashboardViewModel.fromHealthStateCount('Nodes', 'Node', true, nodesHealthStateCount, this.data.routes, RoutesService.getNodesViewPath()); const appsHealthStateCount = HealthUtils.getHealthStateCount(clusterHealth.raw, HealthStatisticsEntityKind.Application); this.appsDashboard = DashboardViewModel.fromHealthStateCount('Applications', 'Application', true, appsHealthStateCount, this.data.routes, RoutesService.getAppsViewPath()); const servicesHealthStateCount = HealthUtils.getHealthStateCount(clusterHealth.raw, HealthStatisticsEntityKind.Service); this.servicesDashboard = DashboardViewModel.fromHealthStateCount('Services', 'Service', false, servicesHealthStateCount); const partitionsDashboard = HealthUtils.getHealthStateCount(clusterHealth.raw, HealthStatisticsEntityKind.Partition); this.partitionsDashboard = DashboardViewModel.fromHealthStateCount('Partitions', 'Partition', false, partitionsDashboard); const replicasHealthStateCount = HealthUtils.getHealthStateCount(clusterHealth.raw, HealthStatisticsEntityKind.Replica); this.replicasDashboard = DashboardViewModel.fromHealthStateCount('Replicas', 'Replica', false, replicasHealthStateCount); clusterHealth.checkExpiredCertStatus(); })), this.data.getApps(true, messageHandler) .pipe(map(apps => { this.upgradeAppsCount = apps.collection.filter(app => app.isUpgrading).length; })), this.nodes.refresh(messageHandler).pipe(map(() => {this.updateItemInEssentials(); })), this.systemApp.refresh(messageHandler).pipe(catchError(err => of(null))), this.clusterUpgradeProgress.refresh(messageHandler), this.data.getClusterManifest().pipe(map((manifest) => { if (manifest.isRepairManagerEnabled) { return this.repairtaskCollection.refresh(messageHandler); }else{ return of(null); } })) ]).pipe(map(() => { this.updateItemInEssentials(); })); } updateItemInEssentials() { this.essentialItems = [ { descriptionName: 'Code Version', copyTextValue: this.clusterUpgradeProgress?.raw?.CodeVersion, displayText: this.clusterUpgradeProgress?.raw?.CodeVersion, }, { descriptionName: 'Fault Domains', displayText: this.nodes.faultDomains.length.toString(), copyTextValue: this.nodes.faultDomains.length.toString() }, { descriptionName: 'Upgrade Domains', displayText: this.nodes.upgradeDomains.length.toString(), copyTextValue: this.nodes.upgradeDomains.length.toString() }, { descriptionName: 'Healthy Seed Nodes', displayText: this.nodes.healthySeedNodes, copyTextValue: this.nodes.healthySeedNodes } ]; } }
Azure/service-fabric-explorer
src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts
TypeScript
MethodDeclaration
setup() { this.clusterHealth = this.data.getClusterHealth(HealthStateFilterFlags.Default, HealthStateFilterFlags.None, HealthStateFilterFlags.None); this.clusterUpgradeProgress = this.data.clusterUpgradeProgress; this.nodes = this.data.nodes; this.systemApp = this.data.systemApp; this.repairtaskCollection = this.data.repairCollection; }
Azure/service-fabric-explorer
src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts
TypeScript
MethodDeclaration
refresh(messageHandler?: IResponseMessageHandler): Observable<any> { return forkJoin([ this.clusterHealth.refresh(messageHandler).pipe(map((clusterHealth: ClusterHealth) => { const nodesHealthStateCount = HealthUtils.getHealthStateCount(clusterHealth.raw, HealthStatisticsEntityKind.Node); this.nodesDashboard = DashboardViewModel.fromHealthStateCount('Nodes', 'Node', true, nodesHealthStateCount, this.data.routes, RoutesService.getNodesViewPath()); const appsHealthStateCount = HealthUtils.getHealthStateCount(clusterHealth.raw, HealthStatisticsEntityKind.Application); this.appsDashboard = DashboardViewModel.fromHealthStateCount('Applications', 'Application', true, appsHealthStateCount, this.data.routes, RoutesService.getAppsViewPath()); const servicesHealthStateCount = HealthUtils.getHealthStateCount(clusterHealth.raw, HealthStatisticsEntityKind.Service); this.servicesDashboard = DashboardViewModel.fromHealthStateCount('Services', 'Service', false, servicesHealthStateCount); const partitionsDashboard = HealthUtils.getHealthStateCount(clusterHealth.raw, HealthStatisticsEntityKind.Partition); this.partitionsDashboard = DashboardViewModel.fromHealthStateCount('Partitions', 'Partition', false, partitionsDashboard); const replicasHealthStateCount = HealthUtils.getHealthStateCount(clusterHealth.raw, HealthStatisticsEntityKind.Replica); this.replicasDashboard = DashboardViewModel.fromHealthStateCount('Replicas', 'Replica', false, replicasHealthStateCount); clusterHealth.checkExpiredCertStatus(); })), this.data.getApps(true, messageHandler) .pipe(map(apps => { this.upgradeAppsCount = apps.collection.filter(app => app.isUpgrading).length; })), this.nodes.refresh(messageHandler).pipe(map(() => {this.updateItemInEssentials(); })), this.systemApp.refresh(messageHandler).pipe(catchError(err => of(null))), this.clusterUpgradeProgress.refresh(messageHandler), this.data.getClusterManifest().pipe(map((manifest) => { if (manifest.isRepairManagerEnabled) { return this.repairtaskCollection.refresh(messageHandler); }else{ return of(null); } })) ]).pipe(map(() => { this.updateItemInEssentials(); })); }
Azure/service-fabric-explorer
src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts
TypeScript
MethodDeclaration
updateItemInEssentials() { this.essentialItems = [ { descriptionName: 'Code Version', copyTextValue: this.clusterUpgradeProgress?.raw?.CodeVersion, displayText: this.clusterUpgradeProgress?.raw?.CodeVersion, }, { descriptionName: 'Fault Domains', displayText: this.nodes.faultDomains.length.toString(), copyTextValue: this.nodes.faultDomains.length.toString() }, { descriptionName: 'Upgrade Domains', displayText: this.nodes.upgradeDomains.length.toString(), copyTextValue: this.nodes.upgradeDomains.length.toString() }, { descriptionName: 'Healthy Seed Nodes', displayText: this.nodes.healthySeedNodes, copyTextValue: this.nodes.healthySeedNodes } ]; }
Azure/service-fabric-explorer
src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts
TypeScript
ArrowFunction
({ value: valueProp, ...rest }: any) => { const [value, setValue] = useState(valueProp); return ( <lib.RcThemeProvider> <lib.RcTextField {...rest} value={value} onChange={(e)
isabella232/juno
packages/juno-framer/code/TextField.framer.tsx
TypeScript
ArrowFunction
() => { it("cities list", () => { const cities = listCities; expect(cities.length).toBe(1001); }); it("suggest cities by prefix", () => { const cities = suggest("d"); expect(cities.length).toBe(39); }); it("suggest cities by empty prefix returns empty", () => { const cities = suggest(""); expect(cities.length).toBe(0); }); }
calltheguys/liveviewjs
src/examples/autocomplete/data.test.ts
TypeScript
ArrowFunction
() => { const cities = listCities; expect(cities.length).toBe(1001); }
calltheguys/liveviewjs
src/examples/autocomplete/data.test.ts
TypeScript
ArrowFunction
() => { const cities = suggest("d"); expect(cities.length).toBe(39); }
calltheguys/liveviewjs
src/examples/autocomplete/data.test.ts
TypeScript
ArrowFunction
() => { const cities = suggest(""); expect(cities.length).toBe(0); }
calltheguys/liveviewjs
src/examples/autocomplete/data.test.ts
TypeScript
FunctionDeclaration
export function defaults(): State { return { mediaQuery: { orientation: undefined, isHandset: undefined, }, selected: { theme: 'normal' }, }; }
palomaclaud/angular-template
libs/state/layout/src/lib/layout.state.model.ts
TypeScript
InterfaceDeclaration
export interface State { mediaQuery: MediaQuery; selected: Selected; }
palomaclaud/angular-template
libs/state/layout/src/lib/layout.state.model.ts
TypeScript
InterfaceDeclaration
export interface MediaQuery { orientation: PageOrientation; isHandset: boolean; }
palomaclaud/angular-template
libs/state/layout/src/lib/layout.state.model.ts
TypeScript
InterfaceDeclaration
export interface Selected { theme: Theme; }
palomaclaud/angular-template
libs/state/layout/src/lib/layout.state.model.ts
TypeScript
TypeAliasDeclaration
export type Theme = 'normal' | 'dark';
palomaclaud/angular-template
libs/state/layout/src/lib/layout.state.model.ts
TypeScript
TypeAliasDeclaration
export type PageOrientation = 'landscape' | 'portrait';
palomaclaud/angular-template
libs/state/layout/src/lib/layout.state.model.ts
TypeScript
FunctionDeclaration
function changeParentHandler(updatedValues) { if (!onChange || typeof onChange !== 'function') { return; } onChange(removeEmptyJsonValues(updatedValues)); }
hsiaoching/cdap
cdap-ui/app/cdap/components/ConfigurationGroup/index.tsx
TypeScript
FunctionDeclaration
function constructGroups() { const newUsedErrors = {}; const newGroups = filteredConfigurationGroups.map((group, i) => { if (group.show === false) { return null; } return ( <div key={`${group.label}-${i}`} className={classes.group}> <div className={classes.groupTitle}> <h2 className={classes.h2Title}>{group.label}</h2> <If condition={group.description && group.description.length > 0}> <small className={classes.groupSubTitle}>{group.description}</small> </If> </div> <div> {group.properties.map((property, j) => { if (property.show === false) { return null; } // Hiding all plugin functions if pipeline is deployed if ( disabled && property.hasOwnProperty('widget-category') && property['widget-category'] === 'plugin' ) { return null; } // Check if a field is present to display the error contextually const errorObjs = errors && errors.hasOwnProperty(property.name) ? errors[property.name] : null; if (errorObjs) { // Mark error as used newUsedErrors[property.name] = errors[property.name]; } return ( <PropertyRow key={`${property.name}-${j}`} widgetProperty={property} pluginProperty={pluginProperties[property.name]} value={values[property.name]} onChange={changeParentHandler} extraConfig={extraConfig} disabled={disabled} errors={errorObjs} /> ); })}
hsiaoching/cdap
cdap-ui/app/cdap/components/ConfigurationGroup/index.tsx
TypeScript