Extra typings
This commit is contained in:
parent
d97c492d36
commit
bdd0d10d0d
|
@ -1,6 +1,6 @@
|
||||||
import { PlanType } from "@budibase/types"
|
import { PlanType } from "@budibase/types"
|
||||||
|
|
||||||
export function getFormattedPlanName(userPlanType) {
|
export function getFormattedPlanName(userPlanType: PlanType) {
|
||||||
let planName
|
let planName
|
||||||
switch (userPlanType) {
|
switch (userPlanType) {
|
||||||
case PlanType.PRO:
|
case PlanType.PRO:
|
||||||
|
@ -29,6 +29,6 @@ export function getFormattedPlanName(userPlanType) {
|
||||||
return `${planName} Plan`
|
return `${planName} Plan`
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isPremiumOrAbove(userPlanType) {
|
export function isPremiumOrAbove(userPlanType: PlanType) {
|
||||||
return ![PlanType.PRO, PlanType.TEAM, PlanType.FREE].includes(userPlanType)
|
return ![PlanType.PRO, PlanType.TEAM, PlanType.FREE].includes(userPlanType)
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
export default function (url) {
|
export default function (url: string) {
|
||||||
return url
|
return url
|
||||||
.split("/")
|
.split("/")
|
||||||
.map(part => {
|
.map(part => {
|
Loading…
Reference in New Issue