-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(flags): support multiple children prop in PostHogFeature (#1516)
* fix(flags): support multiple children prop in PostHogFeature * cleanup * return prop spread passthrough * tweak * non-optional onClick
- Loading branch information
1 parent
6299b7b
commit df21dc2
Showing
3 changed files
with
119 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// from a comment on http://dbj.org/dbj/?p=286 | ||
// fails on only one very rare and deliberate custom object: | ||
// let bomb = { toString : undefined, valueOf: function(o) { return "function BOMBA!"; }}; | ||
export const isFunction = function (f: any): f is (...args: any[]) => any { | ||
// eslint-disable-next-line posthog-js/no-direct-function-check | ||
return typeof f === 'function' | ||
} | ||
export const isUndefined = function (x: unknown): x is undefined { | ||
return x === void 0 | ||
} | ||
export const isNull = function (x: unknown): x is null { | ||
// eslint-disable-next-line posthog-js/no-direct-null-check | ||
return x === null | ||
} |