How to use boolean method in tox

Best Python code snippet using tox_python

config.ts

Source:config.ts Github

copy

Full Screen

1// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.2// See LICENSE.txt for license information.3import {CollapsedThreads} from '../constants/config';4import {ThemeKey} from './themes';5export type ClientConfig = {6 AboutLink: string;7 AllowBannerDismissal: string;8 AllowCustomThemes: string;9 AllowedThemes: string;10 AndroidAppDownloadLink: string;11 AndroidLatestVersion: string;12 AndroidMinVersion: string;13 AppDownloadLink: string;14 AsymmetricSigningPublicKey: string;15 AvailableLocales: string;16 BannerColor: string;17 BannerText: string;18 BannerTextColor: string;19 BuildDate: string;20 BuildEnterpriseReady: string;21 BuildHash: string;22 BuildHashEnterprise: string;23 BuildNumber: string;24 CollapsedThreads: CollapsedThreads;25 CustomBrandText: string;26 CustomDescriptionText: string;27 CustomTermsOfServiceId: string;28 CustomTermsOfServiceReAcceptancePeriod: string;29 CustomUrlSchemes: string;30 CWSURL: string;31 DataRetentionEnableFileDeletion: string;32 DataRetentionEnableMessageDeletion: string;33 DataRetentionFileRetentionDays: string;34 DataRetentionMessageRetentionDays: string;35 DefaultClientLocale: string;36 DefaultTheme: ThemeKey;37 DiagnosticId: string;38 DiagnosticsEnabled: string;39 EmailLoginButtonBorderColor: string;40 EmailLoginButtonColor: string;41 EmailLoginButtonTextColor: string;42 EmailNotificationContentsType: string;43 EnableAskCommunityLink: string;44 EnableBanner: string;45 EnableBotAccountCreation: string;46 EnableChannelViewedMessages: string;47 EnableClientPerformanceDebugging: string;48 EnableCluster: string;49 EnableCommands: string;50 EnableCompliance: string;51 EnableConfirmNotificationsToChannel: string;52 EnableCustomBrand: string;53 EnableCustomEmoji: string;54 EnableCustomGroups: string;55 EnableCustomUserStatuses: string;56 EnableTimedDND: string;57 EnableCustomTermsOfService: string;58 EnableDeveloper: string;59 EnableDiagnostics: string;60 EnableEmailBatching: string;61 EnableEmailInvitations: string;62 EnableEmojiPicker: string;63 EnableFileAttachments: string;64 EnableFile: string;65 EnableGifPicker: string;66 EnableGuestAccounts: string;67 EnableIncomingWebhooks: string;68 EnableLatex: string;69 EnableInlineLatex: string;70 EnableLdap: string;71 EnableLinkPreviews: string;72 EnableMarketplace: string;73 EnableMetrics: string;74 EnableMobileFileDownload: string;75 EnableMobileFileUpload: string;76 EnableMultifactorAuthentication: string;77 EnableOAuthServiceProvider: string;78 EnableOpenServer: string;79 EnableOutgoingWebhooks: string;80 EnablePostIconOverride: string;81 EnablePostUsernameOverride: string;82 EnablePreviewFeatures: string;83 EnablePreviewModeBanner: string;84 EnablePublicLink: string;85 EnableReliableWebSockets: string;86 EnableSaml: string;87 EnableSignInWithEmail: string;88 EnableSignInWithUsername: string;89 EnableSignUpWithEmail: string;90 EnableSignUpWithGitLab: string;91 EnableSignUpWithGoogle: string;92 EnableSignUpWithOffice365: string;93 EnableSignUpWithOpenId: string;94 EnableSVGs: string;95 EnableTesting: string;96 EnableThemeSelection: string;97 EnableTutorial: string;98 EnableOnboardingFlow: string;99 EnableUserAccessTokens: string;100 EnableUserCreation: string;101 EnableUserDeactivation: string;102 EnableUserTypingMessages: string;103 EnforceMultifactorAuthentication: string;104 ExperimentalClientSideCertCheck: string;105 ExperimentalClientSideCertEnable: string;106 ExperimentalCloudBilling: string;107 ExperimentalCloudUserLimit: string;108 ExperimentalDataPrefetch: string;109 ExperimentalEnableAuthenticationTransfer: string;110 ExperimentalEnableAutomaticReplies: string;111 ExperimentalEnableClickToReply: string;112 ExperimentalEnableDefaultChannelLeaveJoinMessages: string;113 ExperimentalEnablePostMetadata: string;114 ExperimentalGroupUnreadChannels: string;115 ExperimentalPrimaryTeam: string;116 ExperimentalTimezone: string;117 ExperimentalViewArchivedChannels: string;118 FileLevel: string;119 GfycatAPIKey: string;120 GfycatAPISecret: string;121 GoogleDeveloperKey: string;122 GuestAccountsEnforceMultifactorAuthentication: string;123 HasImageProxy: string;124 HelpLink: string;125 IosAppDownloadLink: string;126 IosLatestVersion: string;127 IosMinVersion: string;128 InstallationDate: string;129 IsDefaultMarketplace: string;130 LdapFirstNameAttributeSet: string;131 LdapLastNameAttributeSet: string;132 LdapLoginButtonBorderColor: string;133 LdapLoginButtonColor: string;134 LdapLoginButtonTextColor: string;135 LdapLoginFieldName: string;136 LdapNicknameAttributeSet: string;137 LdapPositionAttributeSet: string;138 LdapPictureAttributeSet: string;139 LockTeammateNameDisplay: string;140 ManagedResourcePaths: string;141 MaxFileSize: string;142 MaxPostSize: string;143 MaxNotificationsPerChannel: string;144 MinimumHashtagLength: string;145 NoAccounts: string;146 GitLabButtonText: string;147 GitLabButtonColor: string;148 OpenIdButtonText: string;149 OpenIdButtonColor: string;150 PasswordMinimumLength: string;151 PasswordRequireLowercase: string;152 PasswordRequireNumber: string;153 PasswordRequireSymbol: string;154 PasswordRequireUppercase: string;155 PluginsEnabled: string;156 PostEditTimeLimit: string;157 PrivacyPolicyLink: string;158 ReportAProblemLink: string;159 RequireEmailVerification: string;160 RestrictDirectMessage: string;161 RunJobs: string;162 SamlFirstNameAttributeSet: string;163 SamlLastNameAttributeSet: string;164 SamlLoginButtonBorderColor: string;165 SamlLoginButtonColor: string;166 SamlLoginButtonText: string;167 SamlLoginButtonTextColor: string;168 SamlNicknameAttributeSet: string;169 SamlPositionAttributeSet: string;170 SchemaVersion: string;171 SendEmailNotifications: string;172 SendPushNotifications: string;173 ShowEmailAddress: string;174 SiteName: string;175 SiteURL: string;176 SQLDriverName: string;177 SupportEmail: string;178 TeammateNameDisplay: string;179 TermsOfServiceLink: string;180 TimeBetweenUserTypingUpdatesMilliseconds: string;181 UpgradedFromTE: string;182 Version: string;183 WebsocketPort: string;184 WebsocketSecurePort: string;185 WebsocketURL: string;186 ExperimentalSharedChannels: string;187};188export type License = {189 id: string;190 issued_at: number;191 starts_at: number;192 expires_at: string;193 customer: LicenseCustomer;194 features: LicenseFeatures;195 sku_name: string;196 short_sku_name: string;197};198export type LicenseCustomer = {199 id: string;200 name: string;201 email: string;202 company: string;203};204export type LicenseFeatures = {205 users?: number;206 ldap?: boolean;207 ldap_groups?: boolean;208 mfa?: boolean;209 google_oauth?: boolean;210 office365_oauth?: boolean;211 compliance?: boolean;212 cluster?: boolean;213 metrics?: boolean;214 mhpns?: boolean;215 saml?: boolean;216 elastic_search?: boolean;217 announcement?: boolean;218 theme_management?: boolean;219 email_notification_contents?: boolean;220 data_retention?: boolean;221 message_export?: boolean;222 custom_permissions_schemes?: boolean;223 custom_terms_of_service?: boolean;224 guest_accounts?: boolean;225 guest_accounts_permissions?: boolean;226 id_loaded?: boolean;227 lock_teammate_name_display?: boolean;228 cloud?: boolean;229 future_features?: boolean;230};231export type ClientLicense = Record<string, string>;232export type DataRetentionPolicy = {233 message_deletion_enabled: boolean;234 file_deletion_enabled: boolean;235 message_retention_cutoff: number;236 file_retention_cutoff: number;237};238export type ServiceSettings = {239 SiteURL: string;240 WebsocketURL: string;241 LicenseFileLocation: string;242 ListenAddress: string;243 ConnectionSecurity: string;244 TLSCertFile: string;245 TLSKeyFile: string;246 TLSMinVer: string;247 TLSStrictTransport: boolean;248 TLSStrictTransportMaxAge: number;249 TLSOverwriteCiphers: string[];250 UseLetsEncrypt: boolean;251 LetsEncryptCertificateCacheFile: string;252 Forward80To443: boolean;253 TrustedProxyIPHeader: string[];254 ReadTimeout: number;255 WriteTimeout: number;256 IdleTimeout: number;257 MaximumLoginAttempts: number;258 GoroutineHealthThreshold: number;259 GoogleDeveloperKey: string;260 EnableOAuthServiceProvider: boolean;261 EnableIncomingWebhooks: boolean;262 EnableOutgoingWebhooks: boolean;263 EnableCommands: boolean;264 EnablePostUsernameOverride: boolean;265 EnablePostIconOverride: boolean;266 EnableLinkPreviews: boolean;267 EnableTesting: boolean;268 EnableDeveloper: boolean;269 EnableOpenTracing: boolean;270 EnableSecurityFixAlert: boolean;271 EnableInsecureOutgoingConnections: boolean;272 AllowedUntrustedInternalConnections: string;273 EnableMultifactorAuthentication: boolean;274 EnforceMultifactorAuthentication: boolean;275 EnableUserAccessTokens: boolean;276 AllowCorsFrom: string;277 CorsExposedHeaders: string;278 CorsAllowCredentials: boolean;279 CorsDebug: boolean;280 AllowCookiesForSubdomains: boolean;281 ExtendSessionLengthWithActivity: boolean;282 SessionLengthWebInDays: number;283 SessionLengthMobileInDays: number;284 SessionLengthSSOInDays: number;285 SessionCacheInMinutes: number;286 SessionIdleTimeoutInMinutes: number;287 WebsocketSecurePort: number;288 WebsocketPort: number;289 WebserverMode: string;290 EnableCustomEmoji: boolean;291 EnableEmojiPicker: boolean;292 EnableGifPicker: boolean;293 GfycatApiKey: string;294 GfycatApiSecret: string;295 PostEditTimeLimit: number;296 TimeBetweenUserTypingUpdatesMilliseconds: number;297 EnablePostSearch: boolean;298 MinimumHashtagLength: number;299 EnableUserTypingMessages: boolean;300 EnableChannelViewedMessages: boolean;301 EnableUserStatuses: boolean;302 ExperimentalEnableAuthenticationTransfer: boolean;303 ClusterLogTimeoutMilliseconds: number;304 EnablePreviewFeatures: boolean;305 EnableTutorial: boolean;306 EnableOnboardingFlow: boolean;307 ExperimentalEnableDefaultChannelLeaveJoinMessages: boolean;308 ExperimentalGroupUnreadChannels: string;309 ExperimentalDataPrefetch: boolean;310 EnableAPITeamDeletion: boolean;311 ExperimentalEnableHardenedMode: boolean;312 ExperimentalStrictCSRFEnforcement: boolean;313 EnableEmailInvitations: boolean;314 DisableBotsWhenOwnerIsDeactivated: boolean;315 EnableBotAccountCreation: boolean;316 EnableSVGs: boolean;317 EnableLatex: boolean;318 EnableLocalMode: boolean;319 LocalModeSocketLocation: string;320 CollapsedThreads: 'disabled' | 'default_on' | 'default_off';321 ThreadAutoFollow: boolean;322};323export type TeamSettings = {324 SiteName: string;325 MaxUsersPerTeam: number;326 EnableCustomUserStatuses: boolean;327 EnableUserCreation: boolean;328 EnableOpenServer: boolean;329 EnableUserDeactivation: boolean;330 RestrictCreationToDomains: string;331 EnableCustomBrand: boolean;332 CustomBrandText: string;333 CustomDescriptionText: string;334 RestrictDirectMessage: string;335 UserStatusAwayTimeout: number;336 MaxChannelsPerTeam: number;337 MaxNotificationsPerChannel: number;338 EnableConfirmNotificationsToChannel: boolean;339 TeammateNameDisplay: string;340 ExperimentalViewArchivedChannels: boolean;341 ExperimentalEnableAutomaticReplies: boolean;342 LockTeammateNameDisplay: boolean;343 ExperimentalPrimaryTeam: string;344 ExperimentalDefaultChannels: string[];345};346export type ClientRequirements = {347 AndroidLatestVersion: string;348 AndroidMinVersion: string;349 IosLatestVersion: string;350 IosMinVersion: string;351};352export type SqlSettings = {353 DriverName: string;354 DataSource: string;355 DataSourceReplicas: string[];356 DataSourceSearchReplicas: string[];357 MaxIdleConns: number;358 ConnMaxLifetimeMilliseconds: number;359 MaxOpenConns: number;360 Trace: boolean;361 AtRestEncryptKey: string;362 QueryTimeout: number;363 DisableDatabaseSearch: boolean;364};365export type LogSettings = {366 EnableConsole: boolean;367 ConsoleLevel: string;368 ConsoleJson: boolean;369 EnableFile: boolean;370 FileLevel: string;371 FileJson: boolean;372 FileLocation: string;373 EnableWebhookDebugging: boolean;374 EnableDiagnostics: boolean;375 EnableSentry: boolean;376};377export type ExperimentalAuditSettings = {378 SysLogEnabled: boolean;379 SysLogIP: string;380 SysLogPort: number;381 SysLogTag: string;382 SysLogCert: string;383 SysLogInsecure: boolean;384 SysLogMaxQueueSize: number;385 FileEnabled: boolean;386 FileName: string;387 FileMaxSizeMB: number;388 FileMaxAgeDays: number;389 FileMaxBackups: number;390 FileCompress: boolean;391 FileMaxQueueSize: number;392};393export type NotificationLogSettings = {394 EnableConsole: boolean;395 ConsoleLevel: string;396 ConsoleJson: boolean;397 EnableFile: boolean;398 FileLevel: string;399 FileJson: boolean;400 FileLocation: string;401};402export type PasswordSettings = {403 MinimumLength: number;404 Lowercase: boolean;405 Number: boolean;406 Uppercase: boolean;407 Symbol: boolean;408};409export type FileSettings = {410 EnableFileAttachments: boolean;411 EnableMobileUpload: boolean;412 EnableMobileDownload: boolean;413 MaxFileSize: number;414 DriverName: string;415 Directory: string;416 EnablePublicLink: boolean;417 PublicLinkSalt: string;418 InitialFont: string;419 AmazonS3AccessKeyId: string;420 AmazonS3SecretAccessKey: string;421 AmazonS3Bucket: string;422 AmazonS3Region: string;423 AmazonS3Endpoint: string;424 AmazonS3SSL: boolean;425 AmazonS3SignV2: boolean;426 AmazonS3SSE: boolean;427 AmazonS3Trace: boolean;428};429export type EmailSettings = {430 EnableSignUpWithEmail: boolean;431 EnableSignInWithEmail: boolean;432 EnableSignInWithUsername: boolean;433 SendEmailNotifications: boolean;434 UseChannelInEmailNotifications: boolean;435 RequireEmailVerification: boolean;436 FeedbackName: string;437 FeedbackEmail: string;438 ReplyToAddress: string;439 FeedbackOrganization: string;440 EnableSMTPAuth: boolean;441 SMTPUsername: string;442 SMTPPassword: string;443 SMTPServer: string;444 SMTPPort: string;445 SMTPServerTimeout: number;446 ConnectionSecurity: string;447 SendPushNotifications: boolean;448 PushNotificationServer: string;449 PushNotificationContents: string;450 EnableEmailBatching: boolean;451 EmailBatchingBufferSize: number;452 EmailBatchingInterval: number;453 EnablePreviewModeBanner: boolean;454 SkipServerCertificateVerification: boolean;455 EmailNotificationContentsType: string;456 LoginButtonColor: string;457 LoginButtonBorderColor: string;458 LoginButtonTextColor: string;459};460export type RateLimitSettings = {461 Enable: boolean;462 PerSec: number;463 MaxBurst: number;464 MemoryStoreSize: number;465 VaryByRemoteAddr: boolean;466 VaryByUser: boolean;467 VaryByHeader: string;468};469export type PrivacySettings = {470 ShowEmailAddress: boolean;471 ShowFullName: boolean;472};473export type SupportSettings = {474 TermsOfServiceLink: string;475 PrivacyPolicyLink: string;476 AboutLink: string;477 HelpLink: string;478 ReportAProblemLink: string;479 SupportEmail: string;480 CustomTermsOfServiceEnabled: boolean;481 CustomTermsOfServiceReAcceptancePeriod: number;482};483export type AnnouncementSettings = {484 EnableBanner: boolean;485 BannerText: string;486 BannerColor: string;487 BannerTextColor: string;488 AllowBannerDismissal: boolean;489};490export type ThemeSettings = {491 EnableThemeSelection: boolean;492 DefaultTheme: string;493 AllowCustomThemes: boolean;494 AllowedThemes: string[];495};496export type SSOSettings = {497 Enable: boolean;498 Secret: string;499 Id: string;500 Scope: string;501 AuthEndpoint: string;502 TokenEndpoint: string;503 UserAPIEndpoint: string;504 DiscoveryEndpoint: string;505 ButtonText: string;506 ButtonColor: string;507};508export type Office365Settings = {509 Enable: boolean;510 Secret: string;511 Id: string;512 Scope: string;513 AuthEndpoint: string;514 TokenEndpoint: string;515 UserAPIEndpoint: string;516 DiscoveryEndpoint: string;517 DirectoryId: string;518};519export type LdapSettings = {520 Enable: boolean;521 EnableSync: boolean;522 LdapServer: string;523 LdapPort: number;524 ConnectionSecurity: string;525 BaseDN: string;526 BindUsername: string;527 BindPassword: string;528 UserFilter: string;529 GroupFilter: string;530 GuestFilter: string;531 EnableAdminFilter: boolean;532 AdminFilter: string;533 GroupDisplayNameAttribute: string;534 GroupIdAttribute: string;535 FirstNameAttribute: string;536 LastNameAttribute: string;537 EmailAttribute: string;538 UsernameAttribute: string;539 NicknameAttribute: string;540 IdAttribute: string;541 PositionAttribute: string;542 LoginIdAttribute: string;543 PictureAttribute: string;544 SyncIntervalMinutes: number;545 SkipCertificateVerification: boolean;546 QueryTimeout: number;547 MaxPageSize: number;548 LoginFieldName: string;549 LoginButtonColor: string;550 LoginButtonBorderColor: string;551 LoginButtonTextColor: string;552 Trace: boolean;553};554export type ComplianceSettings = {555 Enable: boolean;556 Directory: string;557 EnableDaily: boolean;558};559export type LocalizationSettings = {560 DefaultServerLocale: string;561 DefaultClientLocale: string;562 AvailableLocales: string;563};564export type SamlSettings = {565 Enable: boolean;566 EnableSyncWithLdap: boolean;567 EnableSyncWithLdapIncludeAuth: boolean;568 IgnoreGuestsLdapSync: boolean;569 Verify: boolean;570 Encrypt: boolean;571 SignRequest: boolean;572 IdpURL: string;573 IdpDescriptorURL: string;574 IdpMetadataURL: string;575 AssertionConsumerServiceURL: string;576 SignatureAlgorithm: string;577 CanonicalAlgorithm: string;578 ScopingIDPProviderId: string;579 ScopingIDPName: string;580 IdpCertificateFile: string;581 PublicCertificateFile: string;582 PrivateKeyFile: string;583 IdAttribute: string;584 GuestAttribute: string;585 EnableAdminAttribute: boolean;586 AdminAttribute: string;587 FirstNameAttribute: string;588 LastNameAttribute: string;589 EmailAttribute: string;590 UsernameAttribute: string;591 NicknameAttribute: string;592 LocaleAttribute: string;593 PositionAttribute: string;594 LoginButtonText: string;595 LoginButtonColor: string;596 LoginButtonBorderColor: string;597 LoginButtonTextColor: string;598};599export type NativeAppSettings = {600 AppDownloadLink: string;601 AndroidAppDownloadLink: string;602 IosAppDownloadLink: string;603};604export type ClusterSettings = {605 Enable: boolean;606 ClusterName: string;607 OverrideHostname: string;608 NetworkInterface: string;609 BindAddress: string;610 AdvertiseAddress: string;611 UseIPAddress: boolean;612 EnableExperimentalGossipEncryption: boolean;613 ReadOnlyConfig: boolean;614 GossipPort: number;615 StreamingPort: number;616 MaxIdleConns: number;617 MaxIdleConnsPerHost: number;618 IdleConnTimeoutMilliseconds: number;619};620export type MetricsSettings = {621 Enable: boolean;622 BlockProfileRate: number;623 ListenAddress: string;624};625export type ExperimentalSettings = {626 ClientSideCertEnable: boolean;627 ClientSideCertCheck: string;628 EnableClickToReply: boolean;629 LinkMetadataTimeoutMilliseconds: number;630 RestrictSystemAdmin: boolean;631 UseNewSAMLLibrary: boolean;632 CloudBilling: boolean;633};634export type AnalyticsSettings = {635 MaxUsersForStatistics: number;636};637export type ElasticsearchSettings = {638 ConnectionURL: string;639 Username: string;640 Password: string;641 EnableIndexing: boolean;642 EnableSearching: boolean;643 EnableAutocomplete: boolean;644 Sniff: boolean;645 PostIndexReplicas: number;646 PostIndexShards: number;647 ChannelIndexReplicas: number;648 ChannelIndexShards: number;649 UserIndexReplicas: number;650 UserIndexShards: number;651 AggregatePostsAfterDays: number;652 PostsAggregatorJobStartTime: string;653 IndexPrefix: string;654 LiveIndexingBatchSize: number;655 BulkIndexingTimeWindowSeconds: number;656 RequestTimeoutSeconds: number;657 SkipTLSVerification: boolean;658 Trace: string;659};660export type BleveSettings = {661 IndexDir: string;662 EnableIndexing: boolean;663 EnableSearching: boolean;664 EnableAutocomplete: boolean;665 BulkIndexingTimeWindowSeconds: number;666};667export type DataRetentionSettings = {668 EnableMessageDeletion: boolean;669 EnableFileDeletion: boolean;670 EnableBoardsDeletion: boolean;671 MessageRetentionDays: number;672 FileRetentionDays: number;673 BoardsRetentionDays: number;674 DeletionJobStartTime: string;675};676export type MessageExportSettings = {677 EnableExport: boolean;678 DownloadExportResults: boolean;679 ExportFormat: string;680 DailyRunTime: string;681 ExportFromTimestamp: number;682 BatchSize: number;683 GlobalRelaySettings: {684 CustomerType: string;685 SMTPUsername: string;686 SMTPPassword: string;687 EmailAddress: string;688 };689};690export type JobSettings = {691 RunJobs: boolean;692 RunScheduler: boolean;693};694export type PluginSettings = {695 Enable: boolean;696 EnableUploads: boolean;697 AllowInsecureDownloadURL: boolean;698 EnableHealthCheck: boolean;699 Directory: string;700 ClientDirectory: string;701 Plugins: Record<string, any>;702 PluginStates: Record<string, {Enable: boolean}>;703 EnableMarketplace: boolean;704 EnableRemoteMarketplace: boolean;705 AutomaticPrepackagedPlugins: boolean;706 RequirePluginSignature: boolean;707 MarketplaceURL: string;708 SignaturePublicKeyFiles: string[];709};710export type DisplaySettings = {711 CustomURLSchemes: string[];712 ExperimentalTimezone: boolean;713};714export type GuestAccountsSettings = {715 Enable: boolean;716 AllowEmailAccounts: boolean;717 EnforceMultifactorAuthentication: boolean;718 RestrictCreationToDomains: string;719};720export type ImageProxySettings = {721 Enable: boolean;722 ImageProxyType: string;723 RemoteImageProxyURL: string;724 RemoteImageProxyOptions: string;725};726export type FeatureFlags = Record<string, string>;727export type AdminConfig = {728 ServiceSettings: ServiceSettings;729 TeamSettings: TeamSettings;730 ClientRequirements: ClientRequirements;731 SqlSettings: SqlSettings;732 LogSettings: LogSettings;733 ExperimentalAuditSettings: ExperimentalAuditSettings;734 NotificationLogSettings: NotificationLogSettings;735 PasswordSettings: PasswordSettings;736 FileSettings: FileSettings;737 EmailSettings: EmailSettings;738 RateLimitSettings: RateLimitSettings;739 PrivacySettings: PrivacySettings;740 SupportSettings: SupportSettings;741 AnnouncementSettings: AnnouncementSettings;742 ThemeSettings: ThemeSettings;743 GitLabSettings: SSOSettings;744 GoogleSettings: SSOSettings;745 Office365Settings: Office365Settings;746 OpenIdSettings: SSOSettings;747 LdapSettings: LdapSettings;748 ComplianceSettings: ComplianceSettings;749 LocalizationSettings: LocalizationSettings;750 SamlSettings: SamlSettings;751 NativeAppSettings: NativeAppSettings;752 ClusterSettings: ClusterSettings;753 MetricsSettings: MetricsSettings;754 ExperimentalSettings: ExperimentalSettings;755 AnalyticsSettings: AnalyticsSettings;756 ElasticsearchSettings: ElasticsearchSettings;757 BleveSettings: BleveSettings;758 DataRetentionSettings: DataRetentionSettings;759 MessageExportSettings: MessageExportSettings;760 JobSettings: JobSettings;761 PluginSettings: PluginSettings;762 DisplaySettings: DisplaySettings;763 GuestAccountsSettings: GuestAccountsSettings;764 ImageProxySettings: ImageProxySettings;765 FeatureFlags: FeatureFlags;766};767export type EnvironmentConfigSettings<T> = {768 [P in keyof T]: boolean;769}770export type EnvironmentConfig = {771 [P in keyof AdminConfig]: EnvironmentConfigSettings<AdminConfig[P]>;772}773export type WarnMetricStatus = {774 id: string;775 limit: number;776 acked: boolean;777 store_status: string;...

Full Screen

Full Screen

webpack_v4.x.x.js

Source:webpack_v4.x.x.js Github

copy

Full Screen

1// flow-typed signature: a11323c6900f44e506402540d33781c22// flow-typed version: 7448070196/webpack_v4.x.x/flow_>=v0.104.x3import * as http from 'http';4import fs from 'fs';5declare module 'webpack' {6 declare class $WebpackError extends Error {7 constructor(message: string): WebpackError;8 inspect(): string;9 details: string;10 }11 declare type WebpackError = $WebpackError;12 declare interface Stats {13 hasErrors(): boolean;14 hasWarnings(): boolean;15 toJson(options?: StatsOptions): any;16 toString(options?: { ...StatsOptions, colors?: boolean, ... }): string;17 }18 declare type Callback = (error: WebpackError, stats: Stats) => void;19 declare type WatchHandler = (error: WebpackError, stats: Stats) => void;20 declare type Watching = {21 close(): void,22 invalidate(): void,23 ...24 };25 declare type WebpackCompiler = {26 run(callback: Callback): void,27 watch(options: WatchOptions, handler: WatchHandler): Watching,28 ...29 };30 declare type WebpackMultiCompiler = {31 run(callback: Callback): void,32 watch(options: WatchOptions, handler: WatchHandler): Watching,33 ...34 };35 declare class WebpackCompilation {36 constructor(compiler: WebpackCompiler): WebpackCompilation;37 // <...>38 }39 declare class WebpackStats {40 constructor(compilation: WebpackCompilation): WebpackStats;41 // <...>42 }43 declare type NonEmptyArrayOfUniqueStringValues = Array<string>;44 declare type EntryObject = { [k: string]: string | NonEmptyArrayOfUniqueStringValues, ... };45 declare type EntryItem = string | NonEmptyArrayOfUniqueStringValues;46 declare type EntryStatic = EntryObject | EntryItem;47 declare type EntryDynamic = () => EntryStatic | Promise<EntryStatic>;48 declare type Entry = EntryDynamic | EntryStatic;49 declare type ArrayOfStringValues = Array<string>;50 declare type ExternalItem =51 | string52 | { [k: string]:53 | string54 | { [k: string]: any, ... }55 | ArrayOfStringValues56 | boolean, ... }57 | RegExp;58 declare type Externals =59 | ((60 context: string,61 request: string,62 callback: (err?: Error, result?: string) => void63 ) => void)64 | ExternalItem65 | Array<66 | ((67 context: string,68 request: string,69 callback: (err?: Error, result?: string) => void70 ) => void)71 | ExternalItem72 >;73 declare type RuleSetCondition =74 | RegExp75 | string76 | ((value: string) => boolean)77 | RuleSetConditions78 | {79 and?: RuleSetConditions,80 exclude?: RuleSetConditionOrConditions,81 include?: RuleSetConditionOrConditions,82 not?: RuleSetConditions,83 or?: RuleSetConditions,84 test?: RuleSetConditionOrConditions,85 ...86 };87 declare type RuleSetConditions = Array<RuleSetCondition>;88 declare type RuleSetConditionOrConditions =89 | RuleSetCondition90 | RuleSetConditions;91 declare type RuleSetLoader = string;92 declare type RuleSetQuery = { [k: string]: any, ... } | string;93 declare type RuleSetUseItem =94 | RuleSetLoader95 | Function96 | {97 ident?: string,98 loader?: RuleSetLoader,99 options?: RuleSetQuery,100 query?: RuleSetQuery,101 ...102 };103 declare type RuleSetUse = RuleSetUseItem | Function | Array<RuleSetUseItem>;104 declare type RuleSetRule = {105 compiler?: RuleSetConditionOrConditions,106 enforce?: 'pre' | 'post',107 exclude?: RuleSetConditionOrConditions,108 include?: RuleSetConditionOrConditions,109 issuer?: RuleSetConditionOrConditions,110 loader?: RuleSetLoader | RuleSetUse,111 loaders?: RuleSetUse,112 oneOf?: RuleSetRules,113 options?: RuleSetQuery,114 parser?: { [k: string]: any, ... },115 query?: RuleSetQuery,116 resolve?: ResolveOptions,117 resource?: RuleSetConditionOrConditions,118 resourceQuery?: RuleSetConditionOrConditions,119 rules?: RuleSetRules,120 sideEffects?: boolean,121 test?: RuleSetConditionOrConditions,122 type?:123 | 'javascript/auto'124 | 'javascript/dynamic'125 | 'javascript/esm'126 | 'json'127 | 'webassembly/experimental',128 use?: RuleSetUse,129 ...130 };131 declare type RuleSetRules = Array<RuleSetRule>;132 declare type ModuleOptions = {133 defaultRules?: RuleSetRules,134 exprContextCritical?: boolean,135 exprContextRecursive?: boolean,136 exprContextRegExp?: boolean | RegExp,137 exprContextRequest?: string,138 noParse?: Array<RegExp> | RegExp | Function | Array<string> | string,139 rules?: RuleSetRules,140 strictExportPresence?: boolean,141 strictThisContextOnImports?: boolean,142 unknownContextCritical?: boolean,143 unknownContextRecursive?: boolean,144 unknownContextRegExp?: boolean | RegExp,145 unknownContextRequest?: string,146 unsafeCache?: boolean | Function,147 wrappedContextCritical?: boolean,148 wrappedContextRecursive?: boolean,149 wrappedContextRegExp?: RegExp,150 ...151 };152 declare type NodeOptions = {153 [k: string]: false | true | 'mock' | 'empty',154 Buffer?: false | true | 'mock',155 __dirname?: false | true | 'mock',156 __filename?: false | true | 'mock',157 console?: false | true | 'mock',158 global?: boolean,159 process?: false | true | 'mock',160 ...161 };162 declare type WebpackPluginFunction = (compiler: WebpackCompiler) => void;163 declare type WebpackPluginInstance = {164 [k: string]: any,165 apply: WebpackPluginFunction,166 ...167 };168 declare type OptimizationSplitChunksOptions = {169 automaticNameDelimiter?: string,170 cacheGroups?: { [k: string]:171 | false172 | Function173 | string174 | RegExp175 | {176 automaticNameDelimiter?: string,177 automaticNamePrefix?: string,178 chunks?: ('initial' | 'async' | 'all') | Function,179 enforce?: boolean,180 filename?: string,181 maxAsyncRequests?: number,182 maxInitialRequests?: number,183 maxSize?: number,184 minChunks?: number,185 minSize?: number,186 name?: boolean | Function | string,187 priority?: number,188 reuseExistingChunk?: boolean,189 test?: Function | string | RegExp,190 ...191 }, ... },192 chunks?: ('initial' | 'async' | 'all') | Function,193 fallbackCacheGroup?: {194 automaticNameDelimiter?: string,195 maxSize?: number,196 minSize?: number,197 ...198 },199 filename?: string,200 hidePathInfo?: boolean,201 maxAsyncRequests?: number,202 maxInitialRequests?: number,203 maxSize?: number,204 minChunks?: number,205 minSize?: number,206 name?: boolean | Function | string,207 ...208 };209 declare type OptimizationOptions = {210 checkWasmTypes?: boolean,211 chunkIds?: 'natural' | 'named' | 'size' | 'total-size' | false,212 concatenateModules?: boolean,213 flagIncludedChunks?: boolean,214 hashedModuleIds?: boolean,215 mangleWasmImports?: boolean,216 mergeDuplicateChunks?: boolean,217 minimize?: boolean,218 minimizer?: Array<WebpackPluginInstance | WebpackPluginFunction>,219 moduleIds?: 'natural' | 'named' | 'hashed' | 'size' | 'total-size' | false,220 namedChunks?: boolean,221 namedModules?: boolean,222 noEmitOnErrors?: boolean,223 nodeEnv?: false | string,224 occurrenceOrder?: boolean,225 portableRecords?: boolean,226 providedExports?: boolean,227 removeAvailableModules?: boolean,228 removeEmptyChunks?: boolean,229 runtimeChunk?:230 | boolean231 | ('single' | 'multiple')232 | { name?: string | Function, ... },233 sideEffects?: boolean,234 splitChunks?: false | OptimizationSplitChunksOptions,235 usedExports?: boolean,236 ...237 };238 declare type LibraryCustomUmdObject = {239 amd?: string,240 commonjs?: string,241 root?: string | ArrayOfStringValues,242 ...243 };244 declare type OutputOptions = {245 auxiliaryComment?:246 | string247 | {248 amd?: string,249 commonjs?: string,250 commonjs2?: string,251 root?: string,252 ...253 },254 chunkCallbackName?: string,255 chunkFilename?: string,256 chunkLoadTimeout?: number,257 crossOriginLoading?: false | 'anonymous' | 'use-credentials',258 devtoolFallbackModuleFilenameTemplate?: string | Function,259 devtoolLineToLine?: boolean | { [k: string]: any, ... },260 devtoolModuleFilenameTemplate?: string | Function,261 devtoolNamespace?: string,262 filename?: string | Function,263 globalObject?: string,264 hashDigest?: string,265 hashDigestLength?: number,266 hashFunction?: string | Function,267 hashSalt?: string,268 hotUpdateChunkFilename?: string | Function,269 hotUpdateFunction?: string,270 hotUpdateMainFilename?: string | Function,271 jsonpFunction?: string,272 jsonpScriptType?: false | 'text/javascript' | 'module',273 library?: string | Array<string> | LibraryCustomUmdObject,274 libraryExport?: string | ArrayOfStringValues,275 libraryTarget?:276 | 'var'277 | 'assign'278 | 'this'279 | 'window'280 | 'self'281 | 'global'282 | 'commonjs'283 | 'commonjs2'284 | 'commonjs-module'285 | 'amd'286 | 'amd-require'287 | 'umd'288 | 'umd2'289 | 'jsonp',290 path?: string,291 pathinfo?: boolean,292 publicPath?: string | Function,293 sourceMapFilename?: string,294 sourcePrefix?: string,295 strictModuleExceptionHandling?: boolean,296 umdNamedDefine?: boolean,297 webassemblyModuleFilename?: string,298 ...299 };300 declare type PerformanceOptions = {301 assetFilter?: Function,302 hints?: false | 'warning' | 'error',303 maxAssetSize?: number,304 maxEntrypointSize?: number,305 ...306 };307 declare type ArrayOfStringOrStringArrayValues = Array<string | Array<string>>;308 declare type ResolveOptions = {309 alias?:310 | { [k: string]: string, ... }311 | Array<{312 alias?: string,313 name?: string,314 onlyModule?: boolean,315 ...316 }>,317 aliasFields?: ArrayOfStringOrStringArrayValues,318 cachePredicate?: Function,319 cacheWithContext?: boolean,320 concord?: boolean,321 descriptionFiles?: ArrayOfStringValues,322 enforceExtension?: boolean,323 enforceModuleExtension?: boolean,324 extensions?: ArrayOfStringValues,325 fileSystem?: { [k: string]: any, ... },326 mainFields?: ArrayOfStringOrStringArrayValues,327 mainFiles?: ArrayOfStringValues,328 moduleExtensions?: ArrayOfStringValues,329 modules?: ArrayOfStringValues,330 plugins?: Array<WebpackPluginInstance | WebpackPluginFunction>,331 resolver?: { [k: string]: any, ... },332 symlinks?: boolean,333 unsafeCache?: boolean | { [k: string]: any, ... },334 useSyncFileSystemCalls?: boolean,335 ...336 };337 declare type FilterItemTypes = RegExp | string | Function;338 declare type FilterTypes = FilterItemTypes | Array<FilterItemTypes>;339 declare type StatsOptions =340 | boolean341 | ('none' | 'errors-only' | 'minimal' | 'normal' | 'detailed' | 'verbose')342 | {343 all?: boolean,344 assets?: boolean,345 assetsSort?: string,346 builtAt?: boolean,347 cached?: boolean,348 cachedAssets?: boolean,349 children?: boolean,350 chunkGroups?: boolean,351 chunkModules?: boolean,352 chunkOrigins?: boolean,353 chunks?: boolean,354 chunksSort?: string,355 colors?:356 | boolean357 | {358 bold?: string,359 cyan?: string,360 green?: string,361 magenta?: string,362 red?: string,363 yellow?: string,364 ...365 },366 context?: string,367 depth?: boolean,368 entrypoints?: boolean,369 env?: boolean,370 errorDetails?: boolean,371 errors?: boolean,372 exclude?: FilterTypes | boolean,373 excludeAssets?: FilterTypes,374 excludeModules?: FilterTypes | boolean,375 hash?: boolean,376 maxModules?: number,377 moduleAssets?: boolean,378 moduleTrace?: boolean,379 modules?: boolean,380 modulesSort?: string,381 nestedModules?: boolean,382 optimizationBailout?: boolean,383 outputPath?: boolean,384 performance?: boolean,385 providedExports?: boolean,386 publicPath?: boolean,387 reasons?: boolean,388 source?: boolean,389 timings?: boolean,390 usedExports?: boolean,391 version?: boolean,392 warnings?: boolean,393 warningsFilter?: FilterTypes,394 ...395 };396 declare type WatchOptions = {397 aggregateTimeout?: number,398 ignored?: { [k: string]: any, ... },399 poll?: boolean | number,400 stdin?: boolean,401 ...402 };403 declare type WebpackOptions = {404 amd?: { [k: string]: any, ... },405 bail?: boolean,406 cache?: boolean | { [k: string]: any, ... },407 context?: string,408 dependencies?: Array<string>,409 devServer?: {410 after?: (app: any, server: http.Server) => void,411 allowedHosts?: string[],412 before?: (app: any, server: http.Server) => void,413 bonjour?: boolean,414 clientLogLevel?: 'none' | 'info' | 'error' | 'warning',415 compress?: boolean,416 contentBase?: false | string | string[] | number,417 disableHostCheck?: boolean,418 filename?: string,419 headers?: { [key: string]: string, ... },420 historyApiFallback?:421 | boolean422 | {423 rewrites?: Array<{424 from: string,425 to: string,426 ...427 }>,428 disableDotRule?: boolean,429 ...430 },431 host?: string,432 hot?: boolean,433 hotOnly?: boolean,434 https?:435 | boolean436 | {437 key: string,438 cert: string,439 ca?: string,440 ...441 },442 index?: string,443 inline?: boolean,444 lazy?: boolean,445 noInfo?: boolean,446 open?: boolean | string,447 openPage?: string,448 overlay?:449 | boolean450 | {451 errors?: boolean,452 warnings?: boolean,453 ...454 },455 pfx?: string,456 pfxPassphrase?: string,457 port?: number,458 proxy?: Object | Array<Object | Function>,459 public?: string,460 publicPath?: string,461 quiet?: boolean,462 socket?: string,463 staticOptions?: {464 dotfiles?: string,465 etag?: boolean,466 extensions?: false | string[],467 fallthrough?: boolean,468 immutable?: boolean,469 index?: false | string,470 lastModified?: boolean,471 maxAge?: number,472 redirect?: boolean,473 setHeaders?: (474 res: http.OutgoingMessage,475 path: string,476 stat: fs.Stat477 ) => void,478 ...479 },480 stats?: StatsOptions,481 useLocalIp?: boolean,482 watchContentBase?: boolean,483 watchOptions?: WatchOptions,484 publicPath?: string,485 ...486 },487 devtool?:488 | '@cheap-eval-source-map'489 | '@cheap-module-eval-source-map'490 | '@cheap-module-source-map'491 | '@cheap-source-map'492 | '@eval-source-map'493 | '@eval'494 | '@hidden-source-map'495 | '@inline-source-map'496 | '@nosources-source-map'497 | '@source-map'498 | '#@cheap-eval-source-map'499 | '#@cheap-module-eval-source-map'500 | '#@cheap-module-source-map'501 | '#@cheap-source-map'502 | '#@eval-source-map'503 | '#@eval'504 | '#@hidden-source-map'505 | '#@inline-source-map'506 | '#@nosources-source-map'507 | '#@source-map'508 | '#cheap-eval-source-map'509 | '#cheap-module-eval-source-map'510 | '#cheap-module-source-map'511 | '#cheap-source-map'512 | '#eval-source-map'513 | '#eval'514 | '#hidden-source-map'515 | '#inline-source-map'516 | '#nosources-source-map'517 | '#source-map'518 | 'cheap-eval-source-map'519 | 'cheap-module-eval-source-map'520 | 'cheap-module-source-map'521 | 'cheap-source-map'522 | 'eval-source-map'523 | 'eval'524 | 'hidden-source-map'525 | 'inline-source-map'526 | 'nosources-source-map'527 | 'source-map'528 | false,529 entry?: Entry,530 externals?: Externals,531 loader?: { [k: string]: any, ... },532 mode?: 'development' | 'production' | 'none',533 module?: ModuleOptions,534 name?: string,535 node?: false | NodeOptions,536 optimization?: OptimizationOptions,537 output?: OutputOptions,538 parallelism?: number,539 performance?: false | PerformanceOptions,540 plugins?: Array<WebpackPluginInstance | WebpackPluginFunction>,541 profile?: boolean,542 recordsInputPath?: string,543 recordsOutputPath?: string,544 recordsPath?: string,545 resolve?: ResolveOptions,546 resolveLoader?: ResolveOptions,547 serve?: { [k: string]: any, ... },548 stats?: StatsOptions,549 target?:550 | 'web'551 | 'webworker'552 | 'node'553 | 'async-node'554 | 'node-webkit'555 | 'electron-main'556 | 'electron-renderer'557 | ((compiler: WebpackCompiler) => void),558 watch?: boolean,559 watchOptions?: WatchOptions,560 ...561 };562 declare class EnvironmentPlugin {563 constructor(env: { [string]: mixed, ... } | string[]): $ElementType<564 $NonMaybeType<$PropertyType<ResolveOptions, 'plugins'>>,565 number566 >;567 }568 declare class DefinePlugin {569 constructor({ [string]: string, ... }): $ElementType<570 $NonMaybeType<$PropertyType<ResolveOptions, 'plugins'>>,571 number572 >;573 }574 declare class IgnorePlugin {575 constructor(RegExp | {|576 resourceRegExp: RegExp,577 contextRegExp?: RegExp,578 |}, void | RegExp): $ElementType<579 $NonMaybeType<$PropertyType<ResolveOptions, 'plugins'>>,580 number581 >;582 }583 declare class SourceMapDevToolPlugin {584 constructor({|585 test?: ?(string | RegExp | Array<string | RegExp>),586 include?: ?(string | RegExp | Array<string | RegExp>),587 exclude?: ?(string | RegExp | Array<string | RegExp>),588 filename?: ?string,589 append?: ?(string | false),590 moduleFilenameTemplate?: ?string,591 fallbackModuleFilenameTemplate?: ?string,592 namespace?: ?string,593 module?: ?boolean,594 columns?: ?boolean,595 lineToLine?: ?(boolean | {|596 test?: ?(string | RegExp | Array<string | RegExp>),597 include?: ?(string | RegExp | Array<string | RegExp>),598 exclude?: ?(string | RegExp | Array<string | RegExp>),599 |}),600 noSources?: ?boolean,601 publicPath?: ?string,602 fileContext?: ?string,603 |}): $ElementType<604 $NonMaybeType<$PropertyType<ResolveOptions, 'plugins'>>,605 number606 >;607 }608 declare class HotModuleReplacementPlugin {609 constructor(): $ElementType<610 $NonMaybeType<$PropertyType<ResolveOptions, 'plugins'>>,611 number612 >;613 }614 declare class ContextReplacementPlugin {615 constructor(616 resourceRegExp: RegExp,617 newContentRegExp?: RegExp618 ): $ElementType<619 $NonMaybeType<$PropertyType<ResolveOptions, 'plugins'>>,620 number621 >;622 }623 declare function builder(624 options: WebpackOptions,625 callback?: Callback626 ): WebpackCompiler;627 declare function builder(628 options: WebpackOptions[],629 callback?: Callback630 ): WebpackMultiCompiler;631 declare module.exports: typeof builder & {632 EnvironmentPlugin: typeof EnvironmentPlugin,633 DefinePlugin: typeof DefinePlugin,634 IgnorePlugin: typeof IgnorePlugin,635 SourceMapDevToolPlugin: typeof SourceMapDevToolPlugin,636 HotModuleReplacementPlugin: typeof HotModuleReplacementPlugin,637 ContextReplacementPlugin: typeof ContextReplacementPlugin,638 ...639 };...

Full Screen

Full Screen

15.6.2.js

Source:15.6.2.js Github

copy

Full Screen

1/* The contents of this file are subject to the Netscape Public2 * License Version 1.1 (the "License"); you may not use this file3 * except in compliance with the License. You may obtain a copy of4 * the License at http://www.mozilla.org/NPL/5 *6 * Software distributed under the License is distributed on an "AS7 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or8 * implied. See the License for the specific language governing9 * rights and limitations under the License.10 *11 * The Original Code is Mozilla Communicator client code, released March12 * 31, 1998.13 *14 * The Initial Developer of the Original Code is Netscape Communications15 * Corporation. Portions created by Netscape are16 * Copyright (C) 1998 Netscape Communications Corporation. All17 * Rights Reserved.18 *19 * Contributor(s): 20 * 21 */22/**23 File Name: 15.6.2.js24 ECMA Section: 15.6.2 The Boolean Constructor25 15.6.2.1 new Boolean( value )26 15.6.2.2 new Boolean()27 This test verifies that the Boolean constructor28 initializes a new object (typeof should return29 "object"). The prototype of the new object should30 be Boolean.prototype. The value of the object31 should be ToBoolean( value ) (a boolean value).32 Description:33 Author: christine@netscape.com34 Date: june 27, 199735*/36 var SECTION = "15.6.2";37 var VERSION = "ECMA_1";38 startTest();39 var TITLE = "15.6.2 The Boolean Constructor; 15.6.2.1 new Boolean( value ); 15.6.2.2 new Boolean()";40 writeHeaderToLog( SECTION + " "+ TITLE);41 var testcases = getTestCases();42 test();43function getTestCases() {44 var array = new Array();45 var item = 0;46 array[item++] = new TestCase( SECTION, "typeof (new Boolean(1))", "object", typeof (new Boolean(1)) );47 array[item++] = new TestCase( SECTION, "(new Boolean(1)).constructor", Boolean.prototype.constructor, (new Boolean(1)).constructor );48 array[item++] = new TestCase( SECTION,49 "TESTBOOL=new Boolean(1);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()",50 "[object Boolean]",51 eval("TESTBOOL=new Boolean(1);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()") );52 array[item++] = new TestCase( SECTION, "(new Boolean(1)).valueOf()", true, (new Boolean(1)).valueOf() );53 array[item++] = new TestCase( SECTION, "typeof new Boolean(1)", "object", typeof new Boolean(1) );54 array[item++] = new TestCase( SECTION, "(new Boolean(0)).constructor", Boolean.prototype.constructor, (new Boolean(0)).constructor );55 array[item++] = new TestCase( SECTION,56 "TESTBOOL=new Boolean(0);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()",57 "[object Boolean]",58 eval("TESTBOOL=new Boolean(0);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()") );59 array[item++] = new TestCase( SECTION, "(new Boolean(0)).valueOf()", false, (new Boolean(0)).valueOf() );60 array[item++] = new TestCase( SECTION, "typeof new Boolean(0)", "object", typeof new Boolean(0) );61 array[item++] = new TestCase( SECTION, "(new Boolean(-1)).constructor", Boolean.prototype.constructor, (new Boolean(-1)).constructor );62 array[item++] = new TestCase( SECTION,63 "TESTBOOL=new Boolean(-1);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()",64 "[object Boolean]",65 eval("TESTBOOL=new Boolean(-1);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()") );66 array[item++] = new TestCase( SECTION, "(new Boolean(-1)).valueOf()", true, (new Boolean(-1)).valueOf() );67 array[item++] = new TestCase( SECTION, "typeof new Boolean(-1)", "object", typeof new Boolean(-1) );68 array[item++] = new TestCase( SECTION, "(new Boolean('1')).constructor", Boolean.prototype.constructor, (new Boolean('1')).constructor );69 array[item++] = new TestCase( SECTION,70 "TESTBOOL=new Boolean('1');TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()",71 "[object Boolean]",72 eval("TESTBOOL=new Boolean('1');TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()") );73 array[item++] = new TestCase( SECTION, "(new Boolean('1')).valueOf()", true, (new Boolean('1')).valueOf() );74 array[item++] = new TestCase( SECTION, "typeof new Boolean('1')", "object", typeof new Boolean('1') );75 array[item++] = new TestCase( SECTION, "(new Boolean('0')).constructor", Boolean.prototype.constructor, (new Boolean('0')).constructor );76 array[item++] = new TestCase( SECTION,77 "TESTBOOL=new Boolean('0');TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()",78 "[object Boolean]",79 eval("TESTBOOL=new Boolean('0');TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()") );80 array[item++] = new TestCase( SECTION, "(new Boolean('0')).valueOf()", true, (new Boolean('0')).valueOf() );81 array[item++] = new TestCase( SECTION, "typeof new Boolean('0')", "object", typeof new Boolean('0') );82 array[item++] = new TestCase( SECTION, "(new Boolean('-1')).constructor", Boolean.prototype.constructor, (new Boolean('-1')).constructor );83 array[item++] = new TestCase( SECTION,84 "TESTBOOL=new Boolean('-1');TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()",85 "[object Boolean]",86 eval("TESTBOOL=new Boolean('-1');TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()") );87 array[item++] = new TestCase( SECTION, "(new Boolean('-1')).valueOf()", true, (new Boolean('-1')).valueOf() );88 array[item++] = new TestCase( SECTION, "typeof new Boolean('-1')", "object", typeof new Boolean('-1') );89 array[item++] = new TestCase( SECTION, "(new Boolean(new Boolean(true))).constructor", Boolean.prototype.constructor, (new Boolean(new Boolean(true))).constructor );90 array[item++] = new TestCase( SECTION,91 "TESTBOOL=new Boolean(new Boolean(true));TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()",92 "[object Boolean]",93 eval("TESTBOOL=new Boolean(new Boolean(true));TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()") );94 array[item++] = new TestCase( SECTION, "(new Boolean(new Boolean(true))).valueOf()", true, (new Boolean(new Boolean(true))).valueOf() );95 array[item++] = new TestCase( SECTION, "typeof new Boolean(new Boolean(true))", "object", typeof new Boolean(new Boolean(true)) );96 array[item++] = new TestCase( SECTION, "(new Boolean(Number.NaN)).constructor", Boolean.prototype.constructor, (new Boolean(Number.NaN)).constructor );97 array[item++] = new TestCase( SECTION,98 "TESTBOOL=new Boolean(Number.NaN);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()",99 "[object Boolean]",100 eval("TESTBOOL=new Boolean(Number.NaN);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()") );101 array[item++] = new TestCase( SECTION, "(new Boolean(Number.NaN)).valueOf()", false, (new Boolean(Number.NaN)).valueOf() );102 array[item++] = new TestCase( SECTION, "typeof new Boolean(Number.NaN)", "object", typeof new Boolean(Number.NaN) );103 array[item++] = new TestCase( SECTION, "(new Boolean(null)).constructor", Boolean.prototype.constructor, (new Boolean(null)).constructor );104 array[item++] = new TestCase( SECTION,105 "TESTBOOL=new Boolean(null);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()",106 "[object Boolean]",107 eval("TESTBOOL=new Boolean(null);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()") );108 array[item++] = new TestCase( SECTION, "(new Boolean(null)).valueOf()", false, (new Boolean(null)).valueOf() );109 array[item++] = new TestCase( SECTION, "typeof new Boolean(null)", "object", typeof new Boolean(null) );110 array[item++] = new TestCase( SECTION, "(new Boolean(void 0)).constructor", Boolean.prototype.constructor, (new Boolean(void 0)).constructor );111 array[item++] = new TestCase( SECTION,112 "TESTBOOL=new Boolean(void 0);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()",113 "[object Boolean]",114 eval("TESTBOOL=new Boolean(void 0);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()") );115 array[item++] = new TestCase( SECTION, "(new Boolean(void 0)).valueOf()", false, (new Boolean(void 0)).valueOf() );116 array[item++] = new TestCase( SECTION, "typeof new Boolean(void 0)", "object", typeof new Boolean(void 0) );117 array[item++] = new TestCase( SECTION, "(new Boolean(Number.POSITIVE_INFINITY)).constructor", Boolean.prototype.constructor, (new Boolean(Number.POSITIVE_INFINITY)).constructor );118 array[item++] = new TestCase( SECTION,119 "TESTBOOL=new Boolean(Number.POSITIVE_INFINITY);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()",120 "[object Boolean]",121 eval("TESTBOOL=new Boolean(Number.POSITIVE_INFINITY);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()") );122 array[item++] = new TestCase( SECTION, "(new Boolean(Number.POSITIVE_INFINITY)).valueOf()", true, (new Boolean(Number.POSITIVE_INFINITY)).valueOf() );123 array[item++] = new TestCase( SECTION, "typeof new Boolean(Number.POSITIVE_INFINITY)", "object", typeof new Boolean(Number.POSITIVE_INFINITY) );124 array[item++] = new TestCase( SECTION, "(new Boolean(Number.NEGATIVE_INFINITY)).constructor", Boolean.prototype.constructor, (new Boolean(Number.NEGATIVE_INFINITY)).constructor );125 array[item++] = new TestCase( SECTION,126 "TESTBOOL=new Boolean(Number.NEGATIVE_INFINITY);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()",127 "[object Boolean]",128 eval("TESTBOOL=new Boolean(Number.NEGATIVE_INFINITY);TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()") );129 array[item++] = new TestCase( SECTION, "(new Boolean(Number.NEGATIVE_INFINITY)).valueOf()", true, (new Boolean(Number.NEGATIVE_INFINITY)).valueOf() );130 array[item++] = new TestCase( SECTION, "typeof new Boolean(Number.NEGATIVE_INFINITY)", "object", typeof new Boolean(Number.NEGATIVE_INFINITY) );131 array[item++] = new TestCase( SECTION, "(new Boolean(Number.NEGATIVE_INFINITY)).constructor", Boolean.prototype.constructor, (new Boolean(Number.NEGATIVE_INFINITY)).constructor );132 array[item++] = new TestCase( "15.6.2.2",133 "TESTBOOL=new Boolean();TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()",134 "[object Boolean]",135 eval("TESTBOOL=new Boolean();TESTBOOL.toString=Object.prototype.toString;TESTBOOL.toString()") );136 array[item++] = new TestCase( "15.6.2.2", "(new Boolean()).valueOf()", false, (new Boolean()).valueOf() );137 array[item++] = new TestCase( "15.6.2.2", "typeof new Boolean()", "object", typeof new Boolean() );138 return ( array );139}140function test() {141 for ( tc = 0; tc < testcases.length; tc++ ) {142 testcases[tc].passed = writeTestCaseResult(143 testcases[tc].expect,144 testcases[tc].actual,145 testcases[tc].description +" = "+ testcases[tc].actual );146 testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value ";147 }148 stopTest();149 return ( testcases );...

Full Screen

Full Screen

toBoolean.js

Source:toBoolean.js Github

copy

Full Screen

1// приведения различных данных к boolean2// ==========================3// === число к булю ===4let value = "billi billi";5console.log(value);6console.log(typeof value);7// 1 способ конструктор Boolean8let toBoolean = Boolean(value);9console.log(`${value}, через конструктор Boolean(): `, toBoolean);10console.log(11 `тип данных ${value}, через конструктор Boolean(): `,12 typeof toBoolean13);14// 2 способ !!15toBoolean = !!value;16console.log(`${value}, через !! : `, toBoolean);17console.log(`тип данных ${value}, через !! : `, typeof toBoolean);18// ==========================19// === строчное число к булю ===20value = "1234";21console.log(value);22console.log(typeof value);23// 1 способ конструктор Boolean24toBoolean = Boolean(value);25console.log(`${value}, через конструктор Boolean(): `, toBoolean);26console.log(27 `тип данных ${value}, через конструктор Boolean(): `,28 typeof toBoolean29);30// 2 способ !!31toBoolean = !!value;32console.log(`${value}, через !! : `, toBoolean);33console.log(`тип данных ${value}, через !! : `, typeof toBoolean);34// ==========================35// === пустая строка к булю ===36value = "";37console.log(value);38console.log(typeof value);39// 1 способ конструктор Boolean40toBoolean = Boolean(value);41console.log(`пустая строка ${value}, через конструктор Boolean(): `, toBoolean);42console.log(43 `тип данных пустой строки ${value}, через конструктор Boolean(): `,44 typeof toBoolean45);46// 2 способ !!47toBoolean = !!value;48console.log(`пустая стррока ${value}, через !! : `, toBoolean);49console.log(`тип данных пустой строки ${value}, через !! : `, typeof toBoolean);50// ==========================51// === пустая строка с пробелом к булю ===52value = " ";53console.log(value);54console.log(typeof value);55// 1 способ конструктор Boolean56toBoolean = Boolean(value);57console.log(`пустая строка с пробелом ${value}, через конструктор Boolean(): `, toBoolean);58console.log(59 `тип данных пустой строки с пробелом ${value}, через конструктор Boolean(): `,60 typeof toBoolean61);62// 2 способ !!63toBoolean = !!value;64console.log(`пустая стррока с пробелом ${value}, через !! : `, toBoolean);65console.log(`тип данных пустой строки с пробелом ${value}, через !! : `, typeof toBoolean);66// ==========================67// === число к булю ===68value = 0;69console.log(value);70console.log(typeof value);71// 1 способ конструктор Boolean72toBoolean = Boolean(value);73console.log(`${value}, через конструктор Boolean(): `, toBoolean);74console.log(75 `тип данных ${value}, через конструктор Boolean(): `,76 typeof toBoolean77);78// 2 способ !!79toBoolean = !!value;80console.log(`${value}, через !! : `, toBoolean);81console.log(`тип данных ${value}, через !! : `, typeof toBoolean);82// ==========================83// === число к булю ===84value = 1;85console.log(value);86console.log(typeof value);87// 1 способ конструктор Boolean88toBoolean = Boolean(value);89console.log(`${value}, через конструктор Boolean(): `, toBoolean);90console.log(91 `тип данных ${value}, через конструктор Boolean(): `,92 typeof toBoolean93);94// 2 способ !!95toBoolean = !!value;96console.log(`${value}, через !! : `, toBoolean);97console.log(`тип данных ${value}, через !! : `, typeof toBoolean);98// ==========================99// === undefined к булю ===100value = undefined;101console.log(value);102console.log(typeof value);103// 1 способ конструктор Boolean104toBoolean = Boolean(value);105console.log(`${value}, через конструктор Boolean(): `, toBoolean);106console.log(107 `тип данных ${value}, через конструктор Boolean(): `,108 typeof toBoolean109);110// 2 способ !!111toBoolean = !!value;112console.log(`${value}, через !! : `, toBoolean);113console.log(`тип данных ${value}, через !! : `, typeof toBoolean);114// ==========================115// === null к булю ===116value = null;117console.log(value);118console.log(typeof value);119// 1 способ конструктор Boolean120toBoolean = Boolean(value);121console.log(`${value}, через конструктор Boolean(): `, toBoolean);122console.log(123 `тип данных ${value}, через конструктор Boolean(): `,124 typeof toBoolean125);126// 2 способ !!127toBoolean = !!value;128console.log(`${value}, через !! : `, toBoolean);129console.log(`тип данных ${value}, через !! : `, typeof toBoolean);130// ==========================131// === NaN к булю ===132value = NaN;133console.log(value);134console.log(typeof value);135// 1 способ конструктор Boolean136toBoolean = Boolean(value);137console.log(`${value}, через конструктор Boolean(): `, toBoolean);138console.log(139 `тип данных ${value}, через конструктор Boolean(): `,140 typeof toBoolean141);142// 2 способ !!143toBoolean = !!value;144console.log(`${value}, через !! : `, toBoolean);145console.log(`тип данных ${value}, через !! : `, typeof toBoolean);146// ==========================147// === Infinity к булю ===148value = Infinity;149console.log(value);150console.log(typeof value);151// 1 способ конструктор Boolean152toBoolean = Boolean(value);153console.log(`${value}, через конструктор Boolean(): `, toBoolean);154console.log(155 `тип данных ${value}, через конструктор Boolean(): `,156 typeof toBoolean157);158// 2 способ !!159toBoolean = !!value;160console.log(`${value}, через !! : `, toBoolean);...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run tox automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful