Passed
Push — trunk ( 5039ac...c81c28 )
by Christian
12:05 queued 14s
created

http.init.ts ➔ initializeHttpClient   A

Complexity

Conditions 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
/**
2
 * @package admin
3
 */
4
import type { AxiosInstance } from 'axios';
5
6
const HttpClient = Shopware.Classes._private.HttpFactory;
7
8
// eslint-disable-next-line sw-deprecation-rules/private-feature-declarations
9
export default function initializeHttpClient(): AxiosInstance {
10
    return HttpClient(Shopware.Context.api) as unknown as AxiosInstance;
11
}
12