Giter Site home page Giter Site logo

Comments (5)

phimage avatar phimage commented on September 28, 2024 1

that's weird! ( swiftui Path ❤️ https://github.com/phimage/morphi )

did you try to do

import struct FileKit.Path
typealias FPath = FileKit.Path

in other file of your project, a file without SwiftUI? just to declare the alias and use it here

or add (based on https://stackoverflow.com/questions/39537103/is-it-possible-to-alias-an-import )

typealias Path = SwiftUI.Path

I do not think that aliased import exists ... (import struct FileKit.Path as FPath)

from filekit.

phimage avatar phimage commented on September 28, 2024

maybe try to import the struct

import struct FileKit.Path

https://andybargh.com/lifetime-scope-and-namespaces-in-swift/

from filekit.

nvzqz avatar nvzqz commented on September 28, 2024

Fixed with 9e075da

from filekit.

protosse avatar protosse commented on September 28, 2024
import struct FileKit.Path
typealias FPath = FileKit.Path

import SwiftUI

hello, I use SwiftUI and FileKit together, and SwiftUI also has a struct named Path.
The following code will report error
Binary operator '+(_:_:)' cannot be applied to operands of type 'Path' and 'String'

let outputPath = FPath.userDesktop + "output.mov"

from filekit.

protosse avatar protosse commented on September 28, 2024

@phimage thanks to replay, finally I add

import FileKit
import SwiftUI

//typealias FPath = FileKit.Path
typealias SPath = SwiftUI.Path

let outputPath = Path.userDesktop + "output.mov"

this works well.
but why
image

from filekit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.