Skip to content
Snippets Groups Projects

edit global Windoes interface to be compiled by typescript

1 file
+ 1
2
Compare changes
  • Side-by-side
  • Inline
+ 1
2
import { loadPolicy } from "@open-policy-agent/opa-wasm";
import { loadPolicy } from "@open-policy-agent/opa-wasm";
export async function createPolicyCheck(user?: Partial<Oidc.Profile>) {
export async function createPolicyCheck(user?: Partial<Oidc.Profile>) {
if (!user) {
if (!user) {
return () => true;
return () => true;
}
}
const opaBundletUrl = window.__env__.OPA_BUNDLE_URL;
const opaBundletUrl = window.__env__['OPA_BUNDLE_URL'];
if (typeof opaBundletUrl === 'undefined') {
if (typeof opaBundletUrl === 'undefined') {
console.log('OPA_BUNDLE_URL is not defined');
console.log('OPA_BUNDLE_URL is not defined');
Loading