ghost-portal/packages/page-js/src/snippets/wrapping.ts
Jaco 4929b1c6fd
Update headers for 2023 (#8665)
* Update headers for 2023

* Adjust env-config
2023-01-01 10:32:05 +02:00

15 lines
431 B
TypeScript

// Copyright 2017-2023 @polkadot/app-js authors & contributors
// SPDX-License-Identifier: Apache-2.0
export default function makeWrapper (isDevelopment: boolean): string {
const args = `api, hashing, ${isDevelopment ? 'keyring, ' : ''}types, util`;
return `// All code is wrapped within an async closure,
// allowing access to ${args}.
// (async ({ ${args} }) => {
// ... any user code is executed here ...
// })();
`;
}